diff --git a/docs/API.md b/docs/API.md index 2cdce6f0..fcb769f5 100644 --- a/docs/API.md +++ b/docs/API.md @@ -69,6 +69,8 @@ Maintainerr exposes lightweight health endpoints under `/api/health` (prefixed w | `POST /api/collections/:id/poster` | Upload a custom collection poster with multipart field `poster`; returns `{ pushed, attempted }` | | `DELETE /api/collections/:id/poster` | Clear the stored poster and return `{ cleared, refreshRequested }` | +The lower-level `POST /api/media-server/collection` request body matches `CreateCollectionParams`: `libraryId`, `title`, and `type` are required, with optional `summary`, `sortTitle`, and `initialItemId`. `initialItemId` is a single media-server item id used when a collection must be created with one initial member; remaining items are still added afterwards through the normal collection-sync path. + ### Metadata | Endpoint | Purpose | diff --git a/static/openapi-spec/maintainerr_api_specs.yaml b/static/openapi-spec/maintainerr_api_specs.yaml index f6deb1f7..b462b524 100644 --- a/static/openapi-spec/maintainerr_api_specs.yaml +++ b/static/openapi-spec/maintainerr_api_specs.yaml @@ -743,6 +743,12 @@ paths: post: operationId: MediaServerController_createCollection parameters: [] + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/CreateCollectionParams' responses: '201': description: '' @@ -2122,6 +2128,31 @@ components: type: boolean recommended: type: boolean + CreateCollectionParams: + type: object + properties: + libraryId: + type: string + title: + type: string + summary: + type: string + type: + type: string + enum: + - movie + - show + - season + - episode + sortTitle: + type: string + initialItemId: + type: string + description: Optional id of a single media-server item to include when the collection is created. + required: + - libraryId + - title + - type RulesDto: type: object properties: {}