aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/doc/api
diff options
context:
space:
mode:
authorFrank Sträter <fstrater@beeldengeluid.nl>2019-08-22 13:33:07 +0200
committerChocobozzz <me@florianbigard.com>2019-08-22 13:33:07 +0200
commit2a8ae7595c1b7853c47955b4b9ecb4a7f7a68fc0 (patch)
treee34f2344a1b3d03d036f6d2de8010626fa541d4f /support/doc/api
parentd636ab58d042494ef9d17b2d9c4c841bae01c897 (diff)
downloadPeerTube-2a8ae7595c1b7853c47955b4b9ecb4a7f7a68fc0.tar.gz
PeerTube-2a8ae7595c1b7853c47955b4b9ecb4a7f7a68fc0.tar.zst
PeerTube-2a8ae7595c1b7853c47955b4b9ecb4a7f7a68fc0.zip
Update API documentation for accounts and config (#2072)
* Update Actor and Account schemas * Fix mixed up paramaters for /accounts * Update ServerConfig schema * Add ServerConfigAbout and ServerConfigCustom schemas
Diffstat (limited to 'support/doc/api')
-rw-r--r--support/doc/api/openapi.yaml313
1 files changed, 308 insertions, 5 deletions
diff --git a/support/doc/api/openapi.yaml b/support/doc/api/openapi.yaml
index 89d440748..baea3710d 100644
--- a/support/doc/api/openapi.yaml
+++ b/support/doc/api/openapi.yaml
@@ -130,9 +130,6 @@ paths:
130 summary: Get the account by name 130 summary: Get the account by name
131 parameters: 131 parameters:
132 - $ref: '#/components/parameters/name' 132 - $ref: '#/components/parameters/name'
133 - $ref: '#/components/parameters/start'
134 - $ref: '#/components/parameters/count'
135 - $ref: '#/components/parameters/sort'
136 responses: 133 responses:
137 '200': 134 '200':
138 description: successful operation 135 description: successful operation
@@ -204,6 +201,10 @@ paths:
204 tags: 201 tags:
205 - Accounts 202 - Accounts
206 summary: Get all accounts 203 summary: Get all accounts
204 parameters:
205 - $ref: '#/components/parameters/start'
206 - $ref: '#/components/parameters/count'
207 - $ref: '#/components/parameters/sort'
207 responses: 208 responses:
208 '200': 209 '200':
209 description: successful operation 210 description: successful operation
@@ -233,6 +234,10 @@ paths:
233 responses: 234 responses:
234 '200': 235 '200':
235 description: successful operation 236 description: successful operation
237 content:
238 application/json:
239 schema:
240 $ref: '#/components/schemas/ServerConfigAbout'
236 /config/custom: 241 /config/custom:
237 get: 242 get:
238 summary: Get the runtime configuration of the server 243 summary: Get the runtime configuration of the server
@@ -244,6 +249,10 @@ paths:
244 responses: 249 responses:
245 '200': 250 '200':
246 description: successful operation 251 description: successful operation
252 content:
253 application/json:
254 schema:
255 $ref: '#/components/schemas/ServerConfigCustom'
247 put: 256 put:
248 summary: Set the runtime configuration of the server 257 summary: Set the runtime configuration of the server
249 tags: 258 tags:
@@ -2254,8 +2263,6 @@ components:
2254 properties: 2263 properties:
2255 id: 2264 id:
2256 type: number 2265 type: number
2257 uuid:
2258 type: string
2259 url: 2266 url:
2260 type: string 2267 type: string
2261 name: 2268 name:
@@ -2276,8 +2283,12 @@ components:
2276 allOf: 2283 allOf:
2277 - $ref: '#/components/schemas/Actor' 2284 - $ref: '#/components/schemas/Actor'
2278 - properties: 2285 - properties:
2286 userId:
2287 type: string
2279 displayName: 2288 displayName:
2280 type: string 2289 type: string
2290 description:
2291 type: string
2281 User: 2292 User:
2282 properties: 2293 properties:
2283 id: 2294 id:
@@ -2321,18 +2332,102 @@ components:
2321 type: number 2332 type: number
2322 ServerConfig: 2333 ServerConfig:
2323 properties: 2334 properties:
2335 instance:
2336 type: object
2337 properties:
2338 name:
2339 type: string
2340 shortDescription:
2341 type: string
2342 defaultClientRoute:
2343 type: string
2344 isNSFW:
2345 type: boolean
2346 defaultNSFWPolicy:
2347 type: string
2348 customizations:
2349 type: object
2350 properties:
2351 javascript:
2352 type: string
2353 css:
2354 type: string
2355 plugin:
2356 type: object
2357 properties:
2358 registered:
2359 type: array
2360 items:
2361 type: string
2362 theme:
2363 type: object
2364 properties:
2365 registered:
2366 type: array
2367 items:
2368 type: string
2369 email:
2370 type: object
2371 properties:
2372 enabled:
2373 type: boolean
2374 contactForm:
2375 type: object
2376 properties:
2377 enabled:
2378 type: boolean
2379 serverVersion:
2380 type: string
2381 serverCommit:
2382 type: string
2324 signup: 2383 signup:
2325 type: object 2384 type: object
2326 properties: 2385 properties:
2327 allowed: 2386 allowed:
2328 type: boolean 2387 type: boolean
2388 allowedForCurrentIP:
2389 type: boolean
2390 requiresEmailVerification:
2391 type: boolean
2329 transcoding: 2392 transcoding:
2330 type: object 2393 type: object
2331 properties: 2394 properties:
2395 hls:
2396 type: object
2397 properties:
2398 enabled:
2399 type: boolean
2332 enabledResolutions: 2400 enabledResolutions:
2333 type: array 2401 type: array
2334 items: 2402 items:
2335 type: number 2403 type: number
2404 import:
2405 type: object
2406 properties:
2407 videos:
2408 type: object
2409 properties:
2410 http:
2411 type: object
2412 properties:
2413 enabled:
2414 type: boolean
2415 torrent:
2416 type: object
2417 properties:
2418 enabled:
2419 type: boolean
2420 autoBlacklist:
2421 type: object
2422 properties:
2423 videos:
2424 type: object
2425 properties:
2426 ofUsers:
2427 type: object
2428 properties:
2429 enabled:
2430 type: boolean
2336 avatar: 2431 avatar:
2337 type: object 2432 type: object
2338 properties: 2433 properties:
@@ -2351,6 +2446,18 @@ components:
2351 video: 2446 video:
2352 type: object 2447 type: object
2353 properties: 2448 properties:
2449 image:
2450 type: object
2451 properties:
2452 extensions:
2453 type: array
2454 items:
2455 type: string
2456 size:
2457 type: object
2458 properties:
2459 max:
2460 type: number
2354 file: 2461 file:
2355 type: object 2462 type: object
2356 properties: 2463 properties:
@@ -2358,6 +2465,202 @@ components:
2358 type: array 2465 type: array
2359 items: 2466 items:
2360 type: string 2467 type: string
2468 videoCaption:
2469 type: object
2470 properties:
2471 file:
2472 type: object
2473 properties:
2474 size:
2475 type: object
2476 properties:
2477 max:
2478 type: number
2479 extensions:
2480 type: array
2481 items:
2482 type: string
2483 user:
2484 type: object
2485 properties:
2486 videoQuota:
2487 type: number
2488 videoQuotaDaily:
2489 type: number
2490 trending:
2491 type: object
2492 properties:
2493 videos:
2494 type: object
2495 properties:
2496 intervalDays:
2497 type: number
2498 tracker:
2499 ype: object
2500 properties:
2501 enabled:
2502 type: boolean
2503 ServerConfigAbout:
2504 properties:
2505 instance:
2506 type: object
2507 properties:
2508 name:
2509 type: string
2510 shortDescription:
2511 type: string
2512 description:
2513 type: string
2514 terms:
2515 type: string
2516 ServerConfigCustom:
2517 properties:
2518 instance:
2519 type: object
2520 properties:
2521 name:
2522 type: string
2523 shortDescription:
2524 type: string
2525 description:
2526 type: string
2527 terms:
2528 type: string
2529 defaultClientRoute:
2530 type: string
2531 isNSFW:
2532 type: boolean
2533 defaultNSFWPolicy:
2534 type: string
2535 customizations:
2536 type: object
2537 properties:
2538 javascript:
2539 type: string
2540 css:
2541 type: string
2542 theme:
2543 type: object
2544 properties:
2545 default:
2546 type: string
2547 services:
2548 type: object
2549 properties:
2550 twitter:
2551 type: object
2552 properties:
2553 username:
2554 type: string
2555 whitelisted:
2556 type: boolean
2557 cache:
2558 type: object
2559 properties:
2560 previews:
2561 type: object
2562 properties:
2563 size:
2564 type: number
2565 captions:
2566 type: object
2567 properties:
2568 size:
2569 type: number
2570 signup:
2571 type: object
2572 properties:
2573 enabled:
2574 type: boolean
2575 limit:
2576 type: number
2577 requiresEmailVerification:
2578 type: boolean
2579 admin:
2580 type: object
2581 properties:
2582 email:
2583 type: string
2584 contactForm:
2585 type: object
2586 properties:
2587 enabled:
2588 type: boolean
2589 user:
2590 type: object
2591 properties:
2592 videoQuota:
2593 type: number
2594 videoQuotaDaily:
2595 type: number
2596 transcoding:
2597 type: object
2598 properties:
2599 enabled:
2600 type: boolean
2601 allowAdditionalExtensions:
2602 type: boolean
2603 allowAudioFiles:
2604 type: boolean
2605 threads:
2606 type: number
2607 resolutions:
2608 type: object
2609 properties:
2610 240p:
2611 type: boolean
2612 360p:
2613 type: boolean
2614 480p:
2615 type: boolean
2616 720p:
2617 type: boolean
2618 1080p:
2619 type: boolean
2620 2160p:
2621 type: boolean
2622 hls:
2623 type: object
2624 properties:
2625 enabled:
2626 type: boolean
2627 import:
2628 type: object
2629 properties:
2630 videos:
2631 type: object
2632 properties:
2633 http:
2634 type: object
2635 properties:
2636 enabled:
2637 type: boolean
2638 torrent:
2639 type: object
2640 properties:
2641 enabled:
2642 type: boolean
2643 autoBlacklist:
2644 type: object
2645 properties:
2646 videos:
2647 type: object
2648 properties:
2649 ofUsers:
2650 type: object
2651 properties:
2652 enabled:
2653 type: boolean
2654 followers:
2655 type: object
2656 properties:
2657 instance:
2658 type: object
2659 properties:
2660 enabled:
2661 type: boolean
2662 manualApproval:
2663 type: boolean
2361 Follow: 2664 Follow:
2362 properties: 2665 properties:
2363 id: 2666 id: