> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/studio/integrations-and-apis/origin-studio-production-api/records.md).

# Records

Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups.

## Get core attributes for many records by id

> Get the core attributes of up to 100 records by id. Returns no field values: use \`POST /records/search\` for many records or \`GET /records/{recordId}\` for one. Both cost more per record, so prefer this endpoint when core attributes are enough.\
> \
> \- Requires \`filter.id\`. To list or filter records, use \`POST /records/search\`.\
> \- Leaves out ids that don't exist in the tenant.\
> \- Answers 403 if the caller can't read any one of the records.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordFindManyByIdsResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordFindManyByIdsResponse","description":"Core attributes and ancestry for a batch of records, by id. Doesn't include field values: use `POST /records/search` for many records, or `GET /records/{recordId}` for one record in full.\n- Leaves out of `data` the ids not found in the tenant. Absence never means not allowed.\n- If you can't read even one of the requested records, the whole request answers 403.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"type":"array","description":"One entry per record found, not in request order.","items":{"type":"object","additionalProperties":false,"required":["id","type","attributes","meta"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]},"attributes":{"$ref":"#/components/schemas/RecordAttributes"},"meta":{"type":"object","additionalProperties":false,"required":["path","status"],"properties":{"path":{"type":"array","description":"The record's ancestry, root first, ending with the record itself. Carries only `id`, without ancestor titles: use `GET /records/{recordId}` for titles.","items":{"type":"object","additionalProperties":false,"required":["id"],"properties":{"id":{"type":"string"},"primaryTitle":{"type":"string"}}}},"status":{"type":"string","enum":["ACTIVE","DELETED"],"description":"The record's lifecycle status. `DELETED` means soft-deleted: the record still exists."}}},"relationships":{"type":"object","additionalProperties":false,"description":"`securityTags` is always present, with at least one tag. `parent` appears only when the record has one; top-level records such as a Movie or Series omit it.","properties":{"parent":{"$ref":"#/components/schemas/RecordRelationship"},"securityTags":{"$ref":"#/components/schemas/SecurityTagsRelationship"}},"required":["securityTags"]}}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordAttributes","description":"A record's attributes: timestamps, lifecycle state and, as additional properties, custom field values.","type":"object","required":["created","updated","lifecycleStatus","lifecyclePhase"],"additionalProperties":true,"properties":{"created":{"type":"string","format":"date-time","description":"When the record was created."},"updated":{"type":"string","format":"date-time","description":"When the record was last updated."},"deletedAt":{"type":"string","format":"date-time","description":"When the record was soft-deleted, if it was."},"lifecycleStatus":{"type":"string","description":"The current lifecycle status, such as draft, in-review or published."},"lifecyclePhase":{"type":"string","enum":["drafting","published"],"description":"The lifecycle phase used for authorization"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"SecurityTagsRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationship","description":"A relationship to one or more security tags","type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records":{"get":{"summary":"Get core attributes for many records by id","operationId":"recordFindManyByIds","description":"Get the core attributes of up to 100 records by id. Returns no field values: use `POST /records/search` for many records or `GET /records/{recordId}` for one. Both cost more per record, so prefer this endpoint when core attributes are enough.\n\n- Requires `filter.id`. To list or filter records, use `POST /records/search`.\n- Leaves out ids that don't exist in the tenant.\n- Answers 403 if the caller can't read any one of the records.","tags":["Records"],"parameters":[{"name":"filter.id","description":"Comma-separated record ids, at most 100. Each id is 16 lowercase hex characters. Ignores whitespace around ids and collapses duplicates. A malformed id answers 400 naming the id and its length; more than 100 ids answers 400 naming the limit.","in":"query","required":true,"schema":{"type":"string","pattern":"^\\s*[^,\\s]+(\\s*,\\s*[^,\\s]+)*\\s*$"}}],"responses":{"200":{"description":"Records found. Empty if no id matched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordFindManyByIdsResponse"}}}},"400":{"description":"`filter.id` is missing, malformed or has more than 100 ids.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The caller can't read at least one of the records. Returns no partial result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create a record

> Create a record with its metadata and relationships in one atomic write: it either fully succeeds or has no effect.\
> \
> A request allows at most 100 write operations, or it answers 400. Each of these counts as one:\
> \- The record itself.\
> \- Each collection link.\
> \- Each non-localized field value.\
> \- Each locale of a localized field value.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"NewRecordCreateRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordCreateRequest","description":"Creates a record in the v2 format, with its work type, initial metadata, and optional parent and security tags.","type":"object","properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]},"attributes":{"$ref":"#/components/schemas/RecordMetadataAttributes","required":["workType","primaryTitle"]},"relationships":{"description":"Relationships to set on creation.","type":"object","properties":{"parent":{"description":"The parent record, such as a Season's Series. Omit it for a standalone record: a Movie, MovieEdit, Series, Compilation, or a limited-series Episode created directly under its Series.","$ref":"#/components/schemas/RecordRelationship"},"securityTags":{"description":"Security tags (permission groups) to apply. Defaults to the tenant's default security tag.","$ref":"#/components/schemas/SecurityTagsRelationshipRequest"},"collections":{"description":"Existing collection records, such as Compilations, to add this record to as a member. A record that is not of a collection work type answers 400. At most 99 linkages in total across `collections` and `collectionMembers`, fewer when the request also writes field values.","type":"array","maxItems":99,"items":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"collectionMembers":{"description":"This record's initial members. Only a record of a collection work type, such as `Compilation`, takes members: a non-empty list on any other answers 400. `ranking` sets each member's sort order. At most 99 linkages in total across `collections` and `collectionMembers`, fewer when the request also writes field values.","type":"array","maxItems":99,"items":{"type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"},"ranking":{"type":"number"}},"required":["type","id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}},"additionalProperties":false}},"required":["type","attributes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"RecordMetadataAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordMetadataAttributes","description":"Custom field values on a record, keyed by the field's `key`. Each value is a string, number, boolean, object or array, as the field defines.","type":"object","patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","items":{"type":"string"},"nullable":true},{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"additionalProperties":false}]}},"properties":{"primaryTitle":{"type":"string"},"workType":{"$ref":"#/components/schemas/WorkTypes"},"workTypeDetail":{"type":"string"},"lifecycleStatus":{"type":"string","description":"The current lifecycle status, such as draft, in-review or published."},"lifecyclePhase":{"type":"string","enum":["drafting","published"],"description":"The lifecycle phase used for authorization"},"sequenceNumber":{"type":"integer","minimum":1},"genres":{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"runLength":{"type":"number"},"releaseYear":{"type":"number"},"releaseDate":{"type":"string"},"countriesOfOrigin":{"type":"array","items":{"type":"string"}},"primarySpokenLanguage":{"type":"string"},"originNexusId":{"type":"string"},"eidrId":{"type":"string"},"imdbId":{"type":"string"},"gracenoteId":{"type":"string"},"tmdbId":{"type":"string"},"wikidataId":{"type":"string"},"wikipediaId":{"type":"string"},"facebookId":{"type":"string"},"xId":{"type":"string"},"instagramId":{"type":"string"},"upstreamId":{"type":"string"}}},"WorkTypes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"WorkTypes","description":"The key of one of the tenant's work types. Every tenant has seven built-in work types:\n- `Movie`: a standalone feature-length film\n- `MovieEdit`: a variation of a Movie\n- `Series`: a TV or streaming series\n- `Season`: a season within a Series\n- `Episode`: a single episode\n- `EpisodeEdit`: a variation of an Episode\n- `Compilation`: an editorially curated collection of existing records\n\nTenants can also define custom work types; list them with `GET /workTypes`.","type":"string","pattern":"^[A-Z][A-Za-z0-9]{1,39}$"},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"SecurityTagsRelationshipRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationshipRequest","description":"The security tags to set on a record. At least one is required.","type":"object","properties":{"data":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"NewRecordFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordFindOneResponse","description":"One record in the v2 format, with its hierarchy path in `meta` and a self link.","type":"object","required":["data","meta","links","jsonapi"],"properties":{"data":{"type":"object","allOf":[{"$ref":"#/components/schemas/BaseResource"},{"type":"object","properties":{"type":{"type":"string","const":"records"},"attributes":{"$ref":"#/components/schemas/RecordMetadataAttributes","required":["workType","primaryTitle"]},"relationships":{"$ref":"#/components/schemas/RecordRelationships","required":["tenant"],"additionalProperties":false}},"required":["attributes","relationships"],"additionalProperties":false}]},"meta":{"$ref":"#/components/schemas/NewRecordMeta"},"links":{"type":"object","properties":{"self":{"type":"string"}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"BaseResource":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResource","description":"A resource identifier. Every resource object carries a unique `id` and a `type`, the resource type name such as `records` or `contributors`.","type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"additionalProperties":false},"RecordRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationships","description":"JSON:API relationships for a record resource.","type":"object","properties":{"parent":{"description":"The parent record in the hierarchy, such as an Episode's Season or a Season's Series. Absent for top-level records such as a Movie or Series.","$ref":"#/components/schemas/RecordRelationship"},"collections":{"description":"The collections this record is a member of. Fetch with `GET /records/{recordId}/collections`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"collectionMembers":{"description":"This record's collection members. Present only when the record's work type is a collection, such as `Compilation`. Fetch with `GET /records/{recordId}/collectionMembers`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"securityTags":{"description":"The security tags (permission groups) that control access to this record. Always at least one.","$ref":"#/components/schemas/SecurityTagsRelationship"},"creditLists":{"description":"The record's credit lists (cast and crew).","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"poster":{"description":"The record's poster media asset, if it has one. Follow `links.related` for the full media resource. In search responses, `meta` carries a poster summary for thumbnails; it is absent when the record has no poster.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}},"meta":{"description":"Summary of the poster media resource. Each field matches the same-named attribute there.","type":"object","properties":{"fileUrl":{"description":"URL of the poster image.","type":"string"},"imageWidth":{"description":"Width of the poster image in pixels.","type":"number","minimum":0},"imageHeight":{"description":"Height of the poster image in pixels.","type":"number","minimum":0}},"required":["fileUrl"],"additionalProperties":false}},"required":["links"],"additionalProperties":false},"tenant":{"description":"The tenant that owns this record.","$ref":"#/components/schemas/TenantRelationship"},"prevRecord":{"description":"The previous sibling under the same parent by `sequenceNumber`, such as the prior Episode in a Season. Absent for the first sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"},"nextRecord":{"description":"The next sibling under the same parent by `sequenceNumber`, such as the following Episode in a Season. Absent for the last sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant"],"additionalProperties":false},"SecurityTagsRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationship","description":"A relationship to one or more security tags","type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"NewRecordMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordMeta","description":"Meta for v2 record responses, including `path`: the record's ancestors from the root down to this record.","type":"object","properties":{"path":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"primaryTitle":{"type":"string"},"workType":{"type":"string","description":"The ancestor's work type key. Absent, with its title, for a restricted ancestor."},"restricted":{"type":"boolean","enum":[true],"description":"Set when you cannot read this ancestor. Its title is omitted."}},"required":["id"],"additionalProperties":false}},"status":{"type":"string","enum":["ACTIVE","DELETED"]},"availableLocales":{"type":"array","items":{"type":"string"}},"viewingLocale":{"type":"string","description":"The locale that decides which sections and fields the response redacts. Echoes the `viewingLocale` query parameter, default `en`. It doesn't filter content: the response always carries all locales."},"redactions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string"},"reason":{"type":"string","enum":["unauthorized","stale"]}}}},"permissions":{"type":"object","additionalProperties":false,"description":"Hints for disabling UI actions on this record. Not an authorization decision: the server checks every action again when it runs.","properties":{"history":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may read this record's change history."}}},"move":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may move this record to another parent."}}}}}},"required":["path","status","availableLocales"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records":{"post":{"summary":"Create a record","operationId":"newRecordCreateOne","description":"Create a record with its metadata and relationships in one atomic write: it either fully succeeds or has no effect.\n\nA request allows at most 100 write operations, or it answers 400. Each of these counts as one:\n- The record itself.\n- Each collection link.\n- Each non-localized field value.\n- Each locale of a localized field value.","tags":["Records"],"requestBody":{"description":"The record to create: core attributes, relationships and custom field values.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecordCreateRequest"}}},"required":true},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecordFindOneResponse"}}}},"400":{"description":"Validation failed, for example a parent `workType` that is invalid for the child `workType`, or more than 100 write operations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The parent record does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"One of:\n- A record with the client-supplied `data.id` already exists.\n- `data.type` is not `records`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get a record by id

> Get one record by its id.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"NewRecordFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordFindOneResponse","description":"One record in the v2 format, with its hierarchy path in `meta` and a self link.","type":"object","required":["data","meta","links","jsonapi"],"properties":{"data":{"type":"object","allOf":[{"$ref":"#/components/schemas/BaseResource"},{"type":"object","properties":{"type":{"type":"string","const":"records"},"attributes":{"$ref":"#/components/schemas/RecordMetadataAttributes","required":["workType","primaryTitle"]},"relationships":{"$ref":"#/components/schemas/RecordRelationships","required":["tenant"],"additionalProperties":false}},"required":["attributes","relationships"],"additionalProperties":false}]},"meta":{"$ref":"#/components/schemas/NewRecordMeta"},"links":{"type":"object","properties":{"self":{"type":"string"}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"BaseResource":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResource","description":"A resource identifier. Every resource object carries a unique `id` and a `type`, the resource type name such as `records` or `contributors`.","type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"additionalProperties":false},"RecordMetadataAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordMetadataAttributes","description":"Custom field values on a record, keyed by the field's `key`. Each value is a string, number, boolean, object or array, as the field defines.","type":"object","patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","items":{"type":"string"},"nullable":true},{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"additionalProperties":false}]}},"properties":{"primaryTitle":{"type":"string"},"workType":{"$ref":"#/components/schemas/WorkTypes"},"workTypeDetail":{"type":"string"},"lifecycleStatus":{"type":"string","description":"The current lifecycle status, such as draft, in-review or published."},"lifecyclePhase":{"type":"string","enum":["drafting","published"],"description":"The lifecycle phase used for authorization"},"sequenceNumber":{"type":"integer","minimum":1},"genres":{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"runLength":{"type":"number"},"releaseYear":{"type":"number"},"releaseDate":{"type":"string"},"countriesOfOrigin":{"type":"array","items":{"type":"string"}},"primarySpokenLanguage":{"type":"string"},"originNexusId":{"type":"string"},"eidrId":{"type":"string"},"imdbId":{"type":"string"},"gracenoteId":{"type":"string"},"tmdbId":{"type":"string"},"wikidataId":{"type":"string"},"wikipediaId":{"type":"string"},"facebookId":{"type":"string"},"xId":{"type":"string"},"instagramId":{"type":"string"},"upstreamId":{"type":"string"}}},"WorkTypes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"WorkTypes","description":"The key of one of the tenant's work types. Every tenant has seven built-in work types:\n- `Movie`: a standalone feature-length film\n- `MovieEdit`: a variation of a Movie\n- `Series`: a TV or streaming series\n- `Season`: a season within a Series\n- `Episode`: a single episode\n- `EpisodeEdit`: a variation of an Episode\n- `Compilation`: an editorially curated collection of existing records\n\nTenants can also define custom work types; list them with `GET /workTypes`.","type":"string","pattern":"^[A-Z][A-Za-z0-9]{1,39}$"},"RecordRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationships","description":"JSON:API relationships for a record resource.","type":"object","properties":{"parent":{"description":"The parent record in the hierarchy, such as an Episode's Season or a Season's Series. Absent for top-level records such as a Movie or Series.","$ref":"#/components/schemas/RecordRelationship"},"collections":{"description":"The collections this record is a member of. Fetch with `GET /records/{recordId}/collections`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"collectionMembers":{"description":"This record's collection members. Present only when the record's work type is a collection, such as `Compilation`. Fetch with `GET /records/{recordId}/collectionMembers`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"securityTags":{"description":"The security tags (permission groups) that control access to this record. Always at least one.","$ref":"#/components/schemas/SecurityTagsRelationship"},"creditLists":{"description":"The record's credit lists (cast and crew).","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"poster":{"description":"The record's poster media asset, if it has one. Follow `links.related` for the full media resource. In search responses, `meta` carries a poster summary for thumbnails; it is absent when the record has no poster.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}},"meta":{"description":"Summary of the poster media resource. Each field matches the same-named attribute there.","type":"object","properties":{"fileUrl":{"description":"URL of the poster image.","type":"string"},"imageWidth":{"description":"Width of the poster image in pixels.","type":"number","minimum":0},"imageHeight":{"description":"Height of the poster image in pixels.","type":"number","minimum":0}},"required":["fileUrl"],"additionalProperties":false}},"required":["links"],"additionalProperties":false},"tenant":{"description":"The tenant that owns this record.","$ref":"#/components/schemas/TenantRelationship"},"prevRecord":{"description":"The previous sibling under the same parent by `sequenceNumber`, such as the prior Episode in a Season. Absent for the first sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"},"nextRecord":{"description":"The next sibling under the same parent by `sequenceNumber`, such as the following Episode in a Season. Absent for the last sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant"],"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"SecurityTagsRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationship","description":"A relationship to one or more security tags","type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"NewRecordMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordMeta","description":"Meta for v2 record responses, including `path`: the record's ancestors from the root down to this record.","type":"object","properties":{"path":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"primaryTitle":{"type":"string"},"workType":{"type":"string","description":"The ancestor's work type key. Absent, with its title, for a restricted ancestor."},"restricted":{"type":"boolean","enum":[true],"description":"Set when you cannot read this ancestor. Its title is omitted."}},"required":["id"],"additionalProperties":false}},"status":{"type":"string","enum":["ACTIVE","DELETED"]},"availableLocales":{"type":"array","items":{"type":"string"}},"viewingLocale":{"type":"string","description":"The locale that decides which sections and fields the response redacts. Echoes the `viewingLocale` query parameter, default `en`. It doesn't filter content: the response always carries all locales."},"redactions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string"},"reason":{"type":"string","enum":["unauthorized","stale"]}}}},"permissions":{"type":"object","additionalProperties":false,"description":"Hints for disabling UI actions on this record. Not an authorization decision: the server checks every action again when it runs.","properties":{"history":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may read this record's change history."}}},"move":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may move this record to another parent."}}}}}},"required":["path","status","availableLocales"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}":{"get":{"summary":"Get a record by id","operationId":"newRecordFindOne","description":"Get one record by its id.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record to get.","in":"path","required":true,"schema":{"type":"string"}},{"name":"tenantId","description":"Read the record from this tenant instead of the caller's own. The caller needs permission in the target tenant.","in":"query","required":false,"schema":{"type":"string"}},{"name":"viewingLocale","description":"The locale to view. Defaults to `en`. The response always holds all locales: this only sets the perspective for hiding sections and fields the caller can't see (`meta.redactions`), even in locales with no data yet. `meta.viewingLocale` echoes it.","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecordFindOneResponse"}}}},"400":{"description":"An unknown query parameter, or an invalid value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Update a record's core metadata or relationships

> Update a record's core metadata, field values or relationships. Field value and core metadata writes are atomic: the request either fully succeeds or has no effect.\
> \
> A request allows at most 99 field write operations, or it answers 400. Each non-localized field value counts as one, and each locale of a localized field value counts as one.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"NewRecordUpdateOneRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordUpdateOneRequest","description":"Partially updates a record in the v2 format: core attributes, its security tags, or both.","type":"object","required":["data"],"additionalProperties":false,"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","required":["id","type"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]},"attributes":{"description":"Attributes to change: `primaryTitle`, `sequenceNumber`, `lifecycleStatus`, and the field keys in the tenant's record layout. Any other attribute, such as `workType`, `parentId`, `status` or timestamps, returns `400`.\n- `workType` can't change after creation.\n- To change the parent, move the record.\n- To change security tags, use `relationships.securityTags`.","type":"object","additionalProperties":true,"minProperties":1,"patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number","nullable":true},{"type":"null"},{"type":"boolean","nullable":true},{"type":"array","items":{"type":"string"},"nullable":true},{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"additionalProperties":false}]}},"properties":{"primaryTitle":{"type":"string","nullable":true},"workTypeDetail":{"type":"string","nullable":true},"lifecycleStatus":{"type":"string","description":"The lifecycle status, such as draft, in-review or published.","nullable":true},"sequenceNumber":{"type":"integer","nullable":true,"minimum":1},"genres":{"type":"object","minProperties":1,"nullable":true,"patternProperties":{"^.*$":{"oneOf":[{"type":"array","nullable":true,"items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},"runLength":{"type":"number","nullable":true},"releaseYear":{"type":"number","nullable":true},"releaseDate":{"type":"string","nullable":true},"countriesOfOrigin":{"type":"array","items":{"type":"string"},"nullable":true},"primarySpokenLanguage":{"type":"string","nullable":true},"originNexusId":{"type":"string","nullable":true},"eidrId":{"type":"string","nullable":true},"imdbId":{"type":"string","nullable":true},"gracenoteId":{"type":"string","nullable":true},"tmdbId":{"type":"string","nullable":true},"wikidataId":{"type":"string","nullable":true},"wikipediaId":{"type":"string","nullable":true},"facebookId":{"type":"string","nullable":true},"xId":{"type":"string","nullable":true},"instagramId":{"type":"string","nullable":true}}},"relationships":{"description":"Relationships to replace on the record.","type":"object","additionalProperties":false,"properties":{"securityTags":{"description":"Replaces all the record's security tags with this list; `POST .../relationships/securityTags` appends instead. The list may drop tags that were since deleted. At least one existing tag must remain.","$ref":"#/components/schemas/SecurityTagsRelationshipRequest"}}}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"SecurityTagsRelationshipRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationshipRequest","description":"The security tags to set on a record. At least one is required.","type":"object","properties":{"data":{"type":"array","minItems":1,"maxItems":100,"uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"NewRecordFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordFindOneResponse","description":"One record in the v2 format, with its hierarchy path in `meta` and a self link.","type":"object","required":["data","meta","links","jsonapi"],"properties":{"data":{"type":"object","allOf":[{"$ref":"#/components/schemas/BaseResource"},{"type":"object","properties":{"type":{"type":"string","const":"records"},"attributes":{"$ref":"#/components/schemas/RecordMetadataAttributes","required":["workType","primaryTitle"]},"relationships":{"$ref":"#/components/schemas/RecordRelationships","required":["tenant"],"additionalProperties":false}},"required":["attributes","relationships"],"additionalProperties":false}]},"meta":{"$ref":"#/components/schemas/NewRecordMeta"},"links":{"type":"object","properties":{"self":{"type":"string"}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"BaseResource":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResource","description":"A resource identifier. Every resource object carries a unique `id` and a `type`, the resource type name such as `records` or `contributors`.","type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"additionalProperties":false},"RecordMetadataAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordMetadataAttributes","description":"Custom field values on a record, keyed by the field's `key`. Each value is a string, number, boolean, object or array, as the field defines.","type":"object","patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number","nullable":true},{"type":"boolean","nullable":true},{"type":"array","items":{"type":"string"},"nullable":true},{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"additionalProperties":false}]}},"properties":{"primaryTitle":{"type":"string"},"workType":{"$ref":"#/components/schemas/WorkTypes"},"workTypeDetail":{"type":"string"},"lifecycleStatus":{"type":"string","description":"The current lifecycle status, such as draft, in-review or published."},"lifecyclePhase":{"type":"string","enum":["drafting","published"],"description":"The lifecycle phase used for authorization"},"sequenceNumber":{"type":"integer","minimum":1},"genres":{"type":"object","minProperties":1,"patternProperties":{"^.*$":{"type":"array","items":{"type":"string"}}},"additionalProperties":false},"runLength":{"type":"number"},"releaseYear":{"type":"number"},"releaseDate":{"type":"string"},"countriesOfOrigin":{"type":"array","items":{"type":"string"}},"primarySpokenLanguage":{"type":"string"},"originNexusId":{"type":"string"},"eidrId":{"type":"string"},"imdbId":{"type":"string"},"gracenoteId":{"type":"string"},"tmdbId":{"type":"string"},"wikidataId":{"type":"string"},"wikipediaId":{"type":"string"},"facebookId":{"type":"string"},"xId":{"type":"string"},"instagramId":{"type":"string"},"upstreamId":{"type":"string"}}},"WorkTypes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"WorkTypes","description":"The key of one of the tenant's work types. Every tenant has seven built-in work types:\n- `Movie`: a standalone feature-length film\n- `MovieEdit`: a variation of a Movie\n- `Series`: a TV or streaming series\n- `Season`: a season within a Series\n- `Episode`: a single episode\n- `EpisodeEdit`: a variation of an Episode\n- `Compilation`: an editorially curated collection of existing records\n\nTenants can also define custom work types; list them with `GET /workTypes`.","type":"string","pattern":"^[A-Z][A-Za-z0-9]{1,39}$"},"RecordRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationships","description":"JSON:API relationships for a record resource.","type":"object","properties":{"parent":{"description":"The parent record in the hierarchy, such as an Episode's Season or a Season's Series. Absent for top-level records such as a Movie or Series.","$ref":"#/components/schemas/RecordRelationship"},"collections":{"description":"The collections this record is a member of. Fetch with `GET /records/{recordId}/collections`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"collectionMembers":{"description":"This record's collection members. Present only when the record's work type is a collection, such as `Compilation`. Fetch with `GET /records/{recordId}/collectionMembers`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"securityTags":{"description":"The security tags (permission groups) that control access to this record. Always at least one.","$ref":"#/components/schemas/SecurityTagsRelationship"},"creditLists":{"description":"The record's credit lists (cast and crew).","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"poster":{"description":"The record's poster media asset, if it has one. Follow `links.related` for the full media resource. In search responses, `meta` carries a poster summary for thumbnails; it is absent when the record has no poster.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}},"meta":{"description":"Summary of the poster media resource. Each field matches the same-named attribute there.","type":"object","properties":{"fileUrl":{"description":"URL of the poster image.","type":"string"},"imageWidth":{"description":"Width of the poster image in pixels.","type":"number","minimum":0},"imageHeight":{"description":"Height of the poster image in pixels.","type":"number","minimum":0}},"required":["fileUrl"],"additionalProperties":false}},"required":["links"],"additionalProperties":false},"tenant":{"description":"The tenant that owns this record.","$ref":"#/components/schemas/TenantRelationship"},"prevRecord":{"description":"The previous sibling under the same parent by `sequenceNumber`, such as the prior Episode in a Season. Absent for the first sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"},"nextRecord":{"description":"The next sibling under the same parent by `sequenceNumber`, such as the following Episode in a Season. Absent for the last sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant"],"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"SecurityTagsRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationship","description":"A relationship to one or more security tags","type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"NewRecordMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"INewRecordMeta","description":"Meta for v2 record responses, including `path`: the record's ancestors from the root down to this record.","type":"object","properties":{"path":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"primaryTitle":{"type":"string"},"workType":{"type":"string","description":"The ancestor's work type key. Absent, with its title, for a restricted ancestor."},"restricted":{"type":"boolean","enum":[true],"description":"Set when you cannot read this ancestor. Its title is omitted."}},"required":["id"],"additionalProperties":false}},"status":{"type":"string","enum":["ACTIVE","DELETED"]},"availableLocales":{"type":"array","items":{"type":"string"}},"viewingLocale":{"type":"string","description":"The locale that decides which sections and fields the response redacts. Echoes the `viewingLocale` query parameter, default `en`. It doesn't filter content: the response always carries all locales."},"redactions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string"},"reason":{"type":"string","enum":["unauthorized","stale"]}}}},"permissions":{"type":"object","additionalProperties":false,"description":"Hints for disabling UI actions on this record. Not an authorization decision: the server checks every action again when it runs.","properties":{"history":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may read this record's change history."}}},"move":{"type":"object","additionalProperties":false,"required":["canAccess"],"properties":{"canAccess":{"type":"boolean","description":"Whether you may move this record to another parent."}}}}}},"required":["path","status","availableLocales"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}":{"patch":{"summary":"Update a record's core metadata or relationships","operationId":"newRecordUpdateOne","description":"Update a record's core metadata, field values or relationships. Field value and core metadata writes are atomic: the request either fully succeeds or has no effect.\n\nA request allows at most 99 field write operations, or it answers 400. Each non-localized field value counts as one, and each locale of a localized field value counts as one.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record to update.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The metadata or relationships to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecordUpdateOneRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecordFindOneResponse"}}}},"400":{"description":"Validation failed, for example:\n- An attribute that can't change, such as `workType`.\n- A field key not in the tenant's record layout.\n- Mixed update kinds.\n- Too many write operations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"The record does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"One of:\n- `data.id` names a different record than the URL.\n- `data.type` is not `records`.\n- The record changed while this update was applied. Re-read it and retry.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Search the tenant's records

> Search and filter the tenant's records. A result the caller can't read comes back as a restricted entry with only its id and status.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"TenantLibrarySearchRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantLibrarySearchRequest","type":"object","description":"A tenant library search. `data.attributes.group` is a boolean tree of filters. See ITenantLibrarySearchQueryGroup and ITenantLibrarySearchCondition for fields and operators, and the examples for nested AND/OR/NOT, genres and hierarchy traversal.","properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","properties":{"type":{"type":"string","enum":["searchQueries"]},"attributes":{"type":"object","properties":{"group":{"$ref":"#/components/schemas/ITenantLibrarySearchQueryGroup"}},"required":["group"],"additionalProperties":false}},"required":["type","attributes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false,"definitions":{"ITenantLibrarySearchOperator":{"type":"string","description":"Comparison for one condition.\n- `eq`: exact match.\n- `ne`: not equal; records without a value match.\n- `contains`: token match on text fields; exact match on keyword fields such as `genres` and `path`. Prefer `eq` or `starts_with` on keyword fields.\n- `not_contains`: negation of `contains`; records without a value match.\n- `starts_with`: prefix match. Not on numeric fields, or on text fields without keyword search enabled.\n- `lt`, `lte`, `gt`, `gte`: number or date range.\n- `exists`: the field has a value.\n- `not_exists`: the field is absent or null. Use it to test for absence; `ne` also matches absent fields.","enum":["eq","ne","contains","not_contains","starts_with","lt","lte","gt","gte","exists","not_exists"]},"ITenantLibrarySearchCondition":{"type":"object","properties":{"field":{"description":"A system field name or a tenant custom field key. Any name not in the enum is a custom field key; get valid keys from `GET /fields`.\n- `genres`: matched in the request's `filter.locale` (default `en`), like a localized custom field.\n- `parentId`: matches the immediate parent only.\n- `path`: the full ancestor chain, including the record's own id, joined with `|`. To match a whole subtree at any depth, such as every Season and Episode under a Series, use `starts_with` with the ancestor's record id.","oneOf":[{"type":"string","enum":["workType","workTypeDetail","primaryTitle","originNexusId","upstreamId","genres","releaseYear","sequenceNumber","created","updated","deletedAt","tenantId","recordId","status","lifecycleStatus","lifecyclePhase","parentId","path","securityTagIds","dataDeliveryPackages","workingSets","eidrId","imdbId","gracenoteId","tmdbId","wikidataId","wikipediaId","facebookId","xId","instagramId"]},{"type":"string","pattern":"^[a-z][a-zA-Z0-9_-]{2,49}$","description":"Tenant custom field key"}]},"operator":{"$ref":"#/components/schemas/ITenantLibrarySearchOperator"},"value":{"description":"The value to match. An array with `eq` matches any of its values, not the exact array. Omit for `exists` and `not_exists`.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["field","operator"],"additionalProperties":false},"ITenantLibrarySearchQueryGroup":{"type":"object","properties":{"operator":{"type":"string","description":"How this node's conditions and groups combine.\n- `AND`: all must match.\n- `OR`: at least one must match.\n- `NOT`: ANDs them, then negates the result. To negate one condition alone, put it in its own `NOT` group.","enum":["AND","OR","NOT"]},"conditions":{"type":"array","description":"Leaf filters at this node, combined by its `operator`.","items":{"$ref":"#/components/schemas/ITenantLibrarySearchCondition"}},"groups":{"type":"array","description":"Nested groups, combined with this node's `conditions` by its `operator`.","items":{"$ref":"#/components/schemas/ITenantLibrarySearchQueryGroup"}}},"required":["operator"],"anyOf":[{"required":["conditions"]},{"required":["groups"]}],"additionalProperties":false}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"ITenantLibrarySearchQueryGroup":{"type":"object","properties":{"operator":{"type":"string","description":"How this node's conditions and groups combine.\n- `AND`: all must match.\n- `OR`: at least one must match.\n- `NOT`: ANDs them, then negates the result. To negate one condition alone, put it in its own `NOT` group.","enum":["AND","OR","NOT"]},"conditions":{"type":"array","description":"Leaf filters at this node, combined by its `operator`.","items":{"$ref":"#/components/schemas/ITenantLibrarySearchCondition"}},"groups":{"type":"array","description":"Nested groups, combined with this node's `conditions` by its `operator`.","items":{"$ref":"#/components/schemas/ITenantLibrarySearchQueryGroup"}}},"required":["operator"],"anyOf":[{"required":["conditions"]},{"required":["groups"]}],"additionalProperties":false},"ITenantLibrarySearchCondition":{"type":"object","properties":{"field":{"description":"A system field name or a tenant custom field key. Any name not in the enum is a custom field key; get valid keys from `GET /fields`.\n- `genres`: matched in the request's `filter.locale` (default `en`), like a localized custom field.\n- `parentId`: matches the immediate parent only.\n- `path`: the full ancestor chain, including the record's own id, joined with `|`. To match a whole subtree at any depth, such as every Season and Episode under a Series, use `starts_with` with the ancestor's record id.","oneOf":[{"type":"string","enum":["workType","workTypeDetail","primaryTitle","originNexusId","upstreamId","genres","releaseYear","sequenceNumber","created","updated","deletedAt","tenantId","recordId","status","lifecycleStatus","lifecyclePhase","parentId","path","securityTagIds","dataDeliveryPackages","workingSets","eidrId","imdbId","gracenoteId","tmdbId","wikidataId","wikipediaId","facebookId","xId","instagramId"]},{"type":"string","pattern":"^[a-z][a-zA-Z0-9_-]{2,49}$","description":"Tenant custom field key"}]},"operator":{"$ref":"#/components/schemas/ITenantLibrarySearchOperator"},"value":{"description":"The value to match. An array with `eq` matches any of its values, not the exact array. Omit for `exists` and `not_exists`.","oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"type":"string"}}]}},"required":["field","operator"],"additionalProperties":false},"ITenantLibrarySearchOperator":{"type":"string","description":"Comparison for one condition.\n- `eq`: exact match.\n- `ne`: not equal; records without a value match.\n- `contains`: token match on text fields; exact match on keyword fields such as `genres` and `path`. Prefer `eq` or `starts_with` on keyword fields.\n- `not_contains`: negation of `contains`; records without a value match.\n- `starts_with`: prefix match. Not on numeric fields, or on text fields without keyword search enabled.\n- `lt`, `lte`, `gt`, `gte`: number or date range.\n- `exists`: the field has a value.\n- `not_exists`: the field is absent or null. Use it to test for absence; `ne` also matches absent fields.","enum":["eq","ne","contains","not_contains","starts_with","lt","lte","gt","gte","exists","not_exists"]},"TenantLibrarySearchResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantLibrarySearchResponse","description":"A page of matching records, with the total count in `meta`.","type":"object","properties":{"data":{"type":"array","items":{"type":"object","required":["id","type","attributes","meta"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]},"attributes":{"$ref":"#/components/schemas/TenantLibraryRecordAttributes"},"relationships":{"$ref":"#/components/schemas/RecordRelationships"},"meta":{"$ref":"#/components/schemas/RecordMeta"},"links":{"$ref":"#/components/schemas/LinksSelf"}}},"additionalProperties":false},"meta":{"type":"object","properties":{"total":{"type":"integer"},"page":{"type":"integer"},"perPage":{"type":"integer"},"unauthorizedCount":{"type":"integer"},"sort":{"$ref":"#/components/schemas/SearchSortMeta"}},"additionalProperties":false},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}},"required":["data","meta","jsonapi"],"additionalProperties":false},"TenantLibraryRecordAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantLibraryRecordAttributes","description":"A record's fields in a library search result. Empty when you cannot read the record.","type":"object","allOf":[{"$ref":"#/components/schemas/OpenSearchTenantLibraryCommonFields"},{"$ref":"#/components/schemas/RecordCommonIdentifierAttributes"},{"type":"object","properties":{"genres":{"type":"object","patternProperties":{"^.*$":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false}]},"OpenSearchTenantLibraryCommonFields":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IOpenSearchTenantLibraryCommonFields","description":"Fields every library search index entry shares: timestamps, work type, lifecycle state and primary title.","type":"object","properties":{"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"deletedAt":{"type":"string","format":"date-time"},"workType":{"type":"string"},"workTypeDetail":{"type":"string"},"lifecycleStatus":{"type":"string","description":"The current lifecycle status"},"lifecyclePhase":{"type":"string","description":"The current lifecycle phase"},"primaryTitle":{"type":"string"},"sequenceNumber":{"type":"integer"},"releaseYear":{"type":"integer"}},"additionalProperties":false},"RecordCommonIdentifierAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordCommonIdentifierAttributes","description":"Identifier attributes common to all records.","type":"object","properties":{"originNexusId":{"type":"string"},"eidrId":{"type":"string"},"imdbId":{"type":"string"},"gracenoteId":{"type":"string"},"tmdbId":{"type":"string"},"wikidataId":{"type":"string"},"wikipediaId":{"type":"string"},"facebookId":{"type":"string"},"xId":{"type":"string"},"instagramId":{"type":"string"},"upstreamId":{"type":"string"}},"additionalProperties":false},"RecordRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationships","description":"JSON:API relationships for a record resource.","type":"object","properties":{"parent":{"description":"The parent record in the hierarchy, such as an Episode's Season or a Season's Series. Absent for top-level records such as a Movie or Series.","$ref":"#/components/schemas/RecordRelationship"},"collections":{"description":"The collections this record is a member of. Fetch with `GET /records/{recordId}/collections`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"collectionMembers":{"description":"This record's collection members. Present only when the record's work type is a collection, such as `Compilation`. Fetch with `GET /records/{recordId}/collectionMembers`.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"securityTags":{"description":"The security tags (permission groups) that control access to this record. Always at least one.","$ref":"#/components/schemas/SecurityTagsRelationship"},"creditLists":{"description":"The record's credit lists (cast and crew).","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}}},"required":["links"],"additionalProperties":false},"poster":{"description":"The record's poster media asset, if it has one. Follow `links.related` for the full media resource. In search responses, `meta` carries a poster summary for thumbnails; it is absent when the record has no poster.","type":"object","properties":{"links":{"type":"object","properties":{"related":{"type":"string"}}},"meta":{"description":"Summary of the poster media resource. Each field matches the same-named attribute there.","type":"object","properties":{"fileUrl":{"description":"URL of the poster image.","type":"string"},"imageWidth":{"description":"Width of the poster image in pixels.","type":"number","minimum":0},"imageHeight":{"description":"Height of the poster image in pixels.","type":"number","minimum":0}},"required":["fileUrl"],"additionalProperties":false}},"required":["links"],"additionalProperties":false},"tenant":{"description":"The tenant that owns this record.","$ref":"#/components/schemas/TenantRelationship"},"prevRecord":{"description":"The previous sibling under the same parent by `sequenceNumber`, such as the prior Episode in a Season. Absent for the first sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"},"nextRecord":{"description":"The next sibling under the same parent by `sequenceNumber`, such as the following Episode in a Season. Absent for the last sibling or a record without siblings.","$ref":"#/components/schemas/RecordRelationship"}},"required":["tenant"],"additionalProperties":false},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"SecurityTagsRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISecurityTagsRelationship","description":"A relationship to one or more security tags","type":"object","properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}},"additionalProperties":false,"required":["data"]},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"RecordMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordMeta","description":"Record metadata outside its attributes. `path` is the record's ancestry, such as Series, then Season, for an Episode.","type":"object","properties":{"path":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"primaryTitle":{"type":"string"},"restricted":{"type":"boolean","enum":[true],"description":"Set when you cannot read this ancestor. Its title is omitted."}},"required":["id"],"additionalProperties":false}},"status":{"type":"string","enum":["ACTIVE","DELETED"]},"availableLocales":{"type":"array","items":{"type":"string"}},"tenantId":{"type":"string"},"childrenStats":{"type":"object","properties":{"count":{"type":"object","additionalProperties":{"type":"number"}}},"additionalProperties":false},"redactions":{"type":"array","items":{"type":"object","additionalProperties":false,"properties":{"path":{"type":"string"},"reason":{"type":"string","enum":["unauthorized"]}}}}},"required":["path","status","availableLocales"],"additionalProperties":false},"LinksSelf":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinksSelf","description":"A JSON:API links object with an absolute or relative 'self' link","type":"object","required":["self"],"properties":{"self":{"type":"string"}},"additionalProperties":false},"SearchSortMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ISearchSortMeta","description":"The ordering applied to the search results. Every search response carries it, whether or not the request asked for an ordering.","type":"object","properties":{"applied":{"type":"string","description":"The ordering applied, in the `sort` parameter's comma-separated syntax. Pass it back as `sort` to keep the ordering fixed across later requests."},"default":{"type":"boolean","description":"`true` when the request had no `sort` and the server chose the ordering; `false` when it reflects the `sort` you sent."}},"required":["applied","default"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/search":{"post":{"summary":"Search the tenant's records","operationId":"searchTenantLibraryRecords","description":"Search and filter the tenant's records. A result the caller can't read comes back as a restricted entry with only its id and status.","tags":["Records"],"parameters":[{"name":"page.size","description":"Results per page. Default 25, maximum 25.","in":"query","required":false,"schema":{"type":"integer","default":25,"maximum":25}},{"name":"page.number","description":"Page number. Default 0.","in":"query","required":false,"schema":{"type":"integer","default":0}},{"name":"includeChildrenCount","description":"Include the total result count in the response.","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"filter.locale","description":"BCP 47 language tag, such as `en`, `fr` or `pt-br`. Defaults to `en`. Sets the locale that `where` conditions on localized fields match against, and the locale of localized fields in the response. Doesn't affect non-localized fields.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","description":"Comma-separated fields to sort by; prefix `-` for descending. Defaults to `-updated,-created` (most recently updated first).\n- An explicit sort replaces the default entirely, so restate any ordering you rely on.\n- To list one parent's children in running order, pass `sequenceNumber,-updated,-created`.\n- `meta.sort` reports the ordering applied.","in":"query","required":false,"schema":{"type":"string"}}],"requestBody":{"description":"Search conditions, filters and nested groups.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLibrarySearchRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TenantLibrarySearchResponse"}}}},"400":{"description":"An unknown query parameter, an invalid value, or an invalid search body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create a record job

> Start a record background job. \`type\` selects the job.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CreateRecordJobRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordCreateJobRequest","description":"Starts a record background job. Set `type` and its `parameters`, then poll `GET /backgroundJobs/{jobId}`.","type":"object","definitions":{"IRecordIdJobParameters":{"type":"object","description":"Parameters for `deleteRecord`, `restoreRecord` and `permanentlyDeleteRecord`: the target record id only.","properties":{"recordId":{"type":"string"}},"required":["recordId"],"additionalProperties":false},"IRecordCreateRecordFromScratchJobParameters":{"description":"Creates records and the records under them, up to three levels: `records`, their `children`, and those children's `children`.","type":"object","properties":{"parentRecordId":{"description":"An existing record to create `records` under. Required when `records` holds more than one record.","type":"string"},"collections":{"description":"Collections every record in `records` joins. Records below them join none.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"records":{"description":"The top-level records: one, or several under `parentRecordId`. Every record in the tree counts toward the limit of 500.","type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/IRecordCreateFromScratchRecord"}}},"required":["records"],"additionalProperties":false},"IRecordCreateFromScratchRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}},"children":{"description":"Records to create under this one. Each child's work type must list this record's work type among its valid parents.","type":"array","items":{"$ref":"#/components/schemas/IRecordCreateFromScratchChildRecord"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"IRecordCreateFromScratchChildRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}},"children":{"description":"Records to create under this one. Each child's work type must list this record's work type among its valid parents.","type":"array","items":{"$ref":"#/components/schemas/IRecordCreateFromScratchLeafRecord"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"IRecordCreateFromScratchLeafRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"IRecordCreateMediaFromUrlJobParameters":{"type":"object","properties":{"urls":{"description":"Media URLs to fetch and attach, at least one. Each must be `https` on an approved media host; the job rejects any other URL without fetching it, reports each rejection, and still runs the other URLs.","type":"array","items":{"type":"string","format":"uri"},"maxItems":100},"recordId":{"type":"string"},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"},"locale":{"description":"BCP 47 language tag of the fetched media, such as `en`, `pt-br` or `zh-Hans`. Applies to every URL in `urls`. The server maps it to a supported locale and drops an unrecognized value rather than defaulting it.","type":"string"}},"required":["urls","recordId","imageType"],"additionalProperties":false},"IRecordMigrateLifecycleStatusJobParameters":{"type":"object","properties":{"oldLifecycleStatus":{"type":"string"},"newLifecycleStatus":{"type":"string"},"workType":{"$ref":"#/components/schemas/WorkTypes"}},"required":["oldLifecycleStatus","newLifecycleStatus","workType"],"additionalProperties":false},"IImportSeriesOriginNexusJobParameters":{"type":"object","properties":{"seriesId":{"type":"string"},"securityTags":{"type":"array","items":{"type":"string"}},"importOptions":{"type":"object","description":"Controls Origin Nexus import depth and series-level media/credits.","properties":{"seriesOnly":{"type":"boolean","description":"`true` imports the series record only, without seasons and episodes. Defaults to the full hierarchy."},"importCredits":{"type":"boolean","description":"`false` skips credits and linked contributors from Origin Nexus. Defaults to importing them."},"importImages":{"type":"boolean","description":"`false` skips poster and cover images. Defaults to importing them."}},"additionalProperties":false}},"required":["seriesId"],"additionalProperties":false},"IImportMoviesOriginNexusJobParameters":{"type":"object","properties":{"movieId":{"type":"string"},"securityTags":{"type":"array","items":{"type":"string"}},"importOptions":{"type":"object","description":"Controls movie-level media/credits import.","properties":{"importCredits":{"type":"boolean","description":"`false` skips credits and linked contributors from Origin Nexus. Defaults to importing them."},"importImages":{"type":"boolean","description":"`false` skips poster and cover images. Defaults to importing them."}},"additionalProperties":false}},"required":["movieId"],"additionalProperties":false},"IRecordBulkEditJobParameters":{"type":"object","description":"Applies the same field edits, in one locale, to every record the selection matches. The server resolves the selection to record ids, then edits each record.","properties":{"locale":{"type":"string","description":"The locale all edits target, such as `en`. Required only when an edit targets a localized field; without it, that field's edit fails."},"edits":{"type":"array","minItems":1,"description":"Field edits applied to every selected record.\n- `overwrite`: replaces the field value in the job locale. Needs `value`.\n- `delete`: clears it.","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"action":{"type":"string","enum":["overwrite","delete"]},"value":{"description":"New value for `overwrite`; `delete` ignores it. Any JSON; the server validates it against the field on write."}},"required":["fieldKey","action"],"additionalProperties":false}},"selection":{"type":"object","description":"The Library selection to edit.\n- With `searchGroup`: every matching record, minus `excludeRecordIds`, plus `includeRecordIds`.\n- Without it: only `includeRecordIds`.","properties":{"searchGroup":{"type":"object","description":"Boolean query tree (ITenantLibrarySearchQueryGroup) for an all-in-view or hierarchy selection; omit it for a manual selection. The job validates it when it runs the search.","additionalProperties":true},"includeRecordIds":{"type":"array","items":{"type":"string"}},"excludeRecordIds":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"required":["edits","selection"],"additionalProperties":false},"IRecordBulkEditPermissionGroupsJobParameters":{"type":"object","description":"Adds and removes permission groups on every record the selection matches. The server resolves the selection to record ids, then changes each record. Groups not listed stay as they are, including groups you can't read. A record you can't edit, one that would end with no group or more than 100, or one deleted before the job reaches it is skipped and reported.","properties":{"addSecurityTagIds":{"type":"array","description":"Permission groups to add to every selected record. A record that already has one is left as it is for that group. Send `[]` to add none.","items":{"type":"string"},"maxItems":100,"uniqueItems":true},"removeSecurityTagIds":{"type":"array","description":"Permission groups to remove from every selected record. A record without one is left as it is for that group. Send `[]` to remove none. A group can't be in both lists.","items":{"type":"string"},"maxItems":100,"uniqueItems":true},"selection":{"type":"object","description":"The Library selection to change.\n- With `searchGroup`: every matching record, minus `excludeRecordIds`, plus `includeRecordIds`.\n- Without it: only `includeRecordIds`.","properties":{"searchGroup":{"type":"object","description":"Boolean query tree (ITenantLibrarySearchQueryGroup) for an all-in-view or hierarchy selection; omit it for a manual selection. The job validates it when it runs the search.","additionalProperties":true},"includeRecordIds":{"type":"array","items":{"type":"string"}},"excludeRecordIds":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"required":["addSecurityTagIds","removeSecurityTagIds","selection"],"additionalProperties":false},"IDeleteAlternateRunningOrderJobParameters":{"type":"object","description":"Identifies one alternate running order to delete.","additionalProperties":false,"required":["recordId","alternateRunningOrderId"],"properties":{"recordId":{"type":"string","description":"The parent Season, or seasonless Series, that owns the running order."},"alternateRunningOrderId":{"type":"string","description":"The alternate running order to delete."}}},"IMoveRecordJobParameters":{"type":"object","description":"Moves one or more records that share a parent, together with every record below them, under another parent.","additionalProperties":false,"required":["recordIds","targetParentId"],"properties":{"recordIds":{"type":"array","description":"The records to move, at most 25. They must all have the same current parent. Their descendants move with them.","items":{"type":"string"},"minItems":1,"maxItems":25,"uniqueItems":true},"targetParentId":{"type":"string","description":"The new parent. It must be an active record whose work type may hold every moved record's work type, and it cannot be one of the moved records, one of their descendants, or their current parent."}}}},"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"allOf":[{"$ref":"#/components/schemas/BaseCreateRequest"},{"type":"object","properties":{"attributes":{"type":"object","properties":{"type":{"type":"string","description":"The job to run; it decides the shape of `parameters`.\n- `deleteRecord`: deletes the record and its whole hierarchy (a Series with its Seasons and Episodes). Takes `recordId`.\n- `restoreRecord`: restores that hierarchy. Takes `recordId`.\n- `permanentlyDeleteRecord`: deletes the record and its whole hierarchy for good; you can't undo it. Takes `recordId`.\n- `createRecordFromScratch`: creates records with the records under them (up to three levels), optionally under an existing parent and in collections.\n- `createMediaFromUrl`: fetches media from external URLs and attaches it.\n- `migrateRecordLifecycleStatus`: moves every record of a work type from one lifecycle status to another.\n- `importSeriesOriginNexus`, `importMoviesOriginNexus`: imports a Series or Movie, with its hierarchy, from Origin Nexus by its Origin Nexus id.\n- `deleteAlternateRunningOrder`: deletes one alternate running order and all its Episode entries for good. Takes `recordId` (the parent Season or seasonless Series) and `alternateRunningOrderId`. Deletes no Episode record and leaves the canonical order unchanged.\n- `moveRecord`: moves `recordIds` (records that share a parent) and their whole hierarchies under `targetParentId`, keeping every id, field value, sequence number and relationship.\n- `bulkEditPermissionGroups`: adds `addSecurityTagIds` to, and removes `removeSecurityTagIds` from, the permission groups of every record in `selection`.","enum":["deleteRecord","restoreRecord","permanentlyDeleteRecord","createRecordFromScratch","createMediaFromUrl","migrateRecordLifecycleStatus","importSeriesOriginNexus","importMoviesOriginNexus","bulkEditRecords","deleteAlternateRunningOrder","moveRecord","bulkEditPermissionGroups"]},"parameters":{"description":"Job parameters; the shape depends on `type`.","oneOf":[{"$ref":"#/components/schemas/IRecordIdJobParameters"},{"$ref":"#/components/schemas/IRecordCreateRecordFromScratchJobParameters"},{"$ref":"#/components/schemas/IRecordCreateMediaFromUrlJobParameters"},{"$ref":"#/components/schemas/IRecordMigrateLifecycleStatusJobParameters"},{"$ref":"#/components/schemas/IImportSeriesOriginNexusJobParameters"},{"$ref":"#/components/schemas/IImportMoviesOriginNexusJobParameters"},{"$ref":"#/components/schemas/IRecordBulkEditJobParameters"},{"$ref":"#/components/schemas/IDeleteAlternateRunningOrderJobParameters"},{"$ref":"#/components/schemas/IMoveRecordJobParameters"},{"$ref":"#/components/schemas/IRecordBulkEditPermissionGroupsJobParameters"}]}},"required":["type","parameters"],"additionalProperties":false}},"required":["attributes"],"additionalProperties":false}]}},"required":["data"],"additionalProperties":false},"IRecordCreateFromScratchRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}},"children":{"description":"Records to create under this one. Each child's work type must list this record's work type among its valid parents.","type":"array","items":{"$ref":"#/components/schemas/IRecordCreateFromScratchChildRecord"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"WorkTypes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"WorkTypes","description":"The key of one of the tenant's work types. Every tenant has seven built-in work types:\n- `Movie`: a standalone feature-length film\n- `MovieEdit`: a variation of a Movie\n- `Series`: a TV or streaming series\n- `Season`: a season within a Series\n- `Episode`: a single episode\n- `EpisodeEdit`: a variation of an Episode\n- `Compilation`: an editorially curated collection of existing records\n\nTenants can also define custom work types; list them with `GET /workTypes`.","type":"string","pattern":"^[A-Z][A-Za-z0-9]{1,39}$"},"IRecordCreateFromScratchChildRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}},"children":{"description":"Records to create under this one. Each child's work type must list this record's work type among its valid parents.","type":"array","items":{"$ref":"#/components/schemas/IRecordCreateFromScratchLeafRecord"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"IRecordCreateFromScratchLeafRecord":{"type":"object","properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string","minLength":1},"sequenceNumber":{"description":"Sequence No. among this record's siblings of the same work type, for a numbered work type (Season, Episode, or a numbered custom type). Defaults to the next free number.","type":"integer","minimum":0},"releaseYear":{"type":"number"},"workTypeDetail":{"type":"string"},"securityTags":{"description":"Permission group ids. Defaults to the parent's: the record above it, or `parentRecordId` for a top-level record, or the main catalog without a parent.","type":"array","items":{"type":"string"}},"editClass":{"description":"Built-in work types only.","type":"string"},"intendedTerritories":{"description":"Built-in work types only.","type":"array","items":{"type":"string"}}},"required":["workType","primaryTitle"],"additionalProperties":false},"MediaAttributeImageType":{"$id":"media_attribute_image_type","$schema":"http://json-schema.org/draft-07/schema#","title":"IMediaAttributeImageType","description":"Editorial classification for an image asset associated with a record. Used to distinguish between general photos, talent portraits, theatrical marketing posters, and tile/thumbnail formats.","type":"string","enum":["Photo","Portrait","Poster","Theatrical Poster","Tile"]},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"BaseCreateRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseCreateRequest","description":"Base shape for create requests. `type` must match the target resource type. Omit `id` to let the server generate one.","type":"object","additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type"]},"IRecordIdJobParameters":{"type":"object","description":"Parameters for `deleteRecord`, `restoreRecord` and `permanentlyDeleteRecord`: the target record id only.","properties":{"recordId":{"type":"string"}},"required":["recordId"],"additionalProperties":false},"IRecordCreateRecordFromScratchJobParameters":{"description":"Creates records and the records under them, up to three levels: `records`, their `children`, and those children's `children`.","type":"object","properties":{"parentRecordId":{"description":"An existing record to create `records` under. Required when `records` holds more than one record.","type":"string"},"collections":{"description":"Collections every record in `records` joins. Records below them join none.","type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false}},"records":{"description":"The top-level records: one, or several under `parentRecordId`. Every record in the tree counts toward the limit of 500.","type":"array","minItems":1,"maxItems":500,"items":{"$ref":"#/components/schemas/IRecordCreateFromScratchRecord"}}},"required":["records"],"additionalProperties":false},"IRecordCreateMediaFromUrlJobParameters":{"type":"object","properties":{"urls":{"description":"Media URLs to fetch and attach, at least one. Each must be `https` on an approved media host; the job rejects any other URL without fetching it, reports each rejection, and still runs the other URLs.","type":"array","items":{"type":"string","format":"uri"},"maxItems":100},"recordId":{"type":"string"},"imageType":{"$ref":"#/components/schemas/MediaAttributeImageType"},"locale":{"description":"BCP 47 language tag of the fetched media, such as `en`, `pt-br` or `zh-Hans`. Applies to every URL in `urls`. The server maps it to a supported locale and drops an unrecognized value rather than defaulting it.","type":"string"}},"required":["urls","recordId","imageType"],"additionalProperties":false},"IRecordMigrateLifecycleStatusJobParameters":{"type":"object","properties":{"oldLifecycleStatus":{"type":"string"},"newLifecycleStatus":{"type":"string"},"workType":{"$ref":"#/components/schemas/WorkTypes"}},"required":["oldLifecycleStatus","newLifecycleStatus","workType"],"additionalProperties":false},"IImportSeriesOriginNexusJobParameters":{"type":"object","properties":{"seriesId":{"type":"string"},"securityTags":{"type":"array","items":{"type":"string"}},"importOptions":{"type":"object","description":"Controls Origin Nexus import depth and series-level media/credits.","properties":{"seriesOnly":{"type":"boolean","description":"`true` imports the series record only, without seasons and episodes. Defaults to the full hierarchy."},"importCredits":{"type":"boolean","description":"`false` skips credits and linked contributors from Origin Nexus. Defaults to importing them."},"importImages":{"type":"boolean","description":"`false` skips poster and cover images. Defaults to importing them."}},"additionalProperties":false}},"required":["seriesId"],"additionalProperties":false},"IImportMoviesOriginNexusJobParameters":{"type":"object","properties":{"movieId":{"type":"string"},"securityTags":{"type":"array","items":{"type":"string"}},"importOptions":{"type":"object","description":"Controls movie-level media/credits import.","properties":{"importCredits":{"type":"boolean","description":"`false` skips credits and linked contributors from Origin Nexus. Defaults to importing them."},"importImages":{"type":"boolean","description":"`false` skips poster and cover images. Defaults to importing them."}},"additionalProperties":false}},"required":["movieId"],"additionalProperties":false},"IRecordBulkEditJobParameters":{"type":"object","description":"Applies the same field edits, in one locale, to every record the selection matches. The server resolves the selection to record ids, then edits each record.","properties":{"locale":{"type":"string","description":"The locale all edits target, such as `en`. Required only when an edit targets a localized field; without it, that field's edit fails."},"edits":{"type":"array","minItems":1,"description":"Field edits applied to every selected record.\n- `overwrite`: replaces the field value in the job locale. Needs `value`.\n- `delete`: clears it.","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"action":{"type":"string","enum":["overwrite","delete"]},"value":{"description":"New value for `overwrite`; `delete` ignores it. Any JSON; the server validates it against the field on write."}},"required":["fieldKey","action"],"additionalProperties":false}},"selection":{"type":"object","description":"The Library selection to edit.\n- With `searchGroup`: every matching record, minus `excludeRecordIds`, plus `includeRecordIds`.\n- Without it: only `includeRecordIds`.","properties":{"searchGroup":{"type":"object","description":"Boolean query tree (ITenantLibrarySearchQueryGroup) for an all-in-view or hierarchy selection; omit it for a manual selection. The job validates it when it runs the search.","additionalProperties":true},"includeRecordIds":{"type":"array","items":{"type":"string"}},"excludeRecordIds":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"required":["edits","selection"],"additionalProperties":false},"IDeleteAlternateRunningOrderJobParameters":{"type":"object","description":"Identifies one alternate running order to delete.","additionalProperties":false,"required":["recordId","alternateRunningOrderId"],"properties":{"recordId":{"type":"string","description":"The parent Season, or seasonless Series, that owns the running order."},"alternateRunningOrderId":{"type":"string","description":"The alternate running order to delete."}}},"IMoveRecordJobParameters":{"type":"object","description":"Moves one or more records that share a parent, together with every record below them, under another parent.","additionalProperties":false,"required":["recordIds","targetParentId"],"properties":{"recordIds":{"type":"array","description":"The records to move, at most 25. They must all have the same current parent. Their descendants move with them.","items":{"type":"string"},"minItems":1,"maxItems":25,"uniqueItems":true},"targetParentId":{"type":"string","description":"The new parent. It must be an active record whose work type may hold every moved record's work type, and it cannot be one of the moved records, one of their descendants, or their current parent."}}},"IRecordBulkEditPermissionGroupsJobParameters":{"type":"object","description":"Adds and removes permission groups on every record the selection matches. The server resolves the selection to record ids, then changes each record. Groups not listed stay as they are, including groups you can't read. A record you can't edit, one that would end with no group or more than 100, or one deleted before the job reaches it is skipped and reported.","properties":{"addSecurityTagIds":{"type":"array","description":"Permission groups to add to every selected record. A record that already has one is left as it is for that group. Send `[]` to add none.","items":{"type":"string"},"maxItems":100,"uniqueItems":true},"removeSecurityTagIds":{"type":"array","description":"Permission groups to remove from every selected record. A record without one is left as it is for that group. Send `[]` to remove none. A group can't be in both lists.","items":{"type":"string"},"maxItems":100,"uniqueItems":true},"selection":{"type":"object","description":"The Library selection to change.\n- With `searchGroup`: every matching record, minus `excludeRecordIds`, plus `includeRecordIds`.\n- Without it: only `includeRecordIds`.","properties":{"searchGroup":{"type":"object","description":"Boolean query tree (ITenantLibrarySearchQueryGroup) for an all-in-view or hierarchy selection; omit it for a manual selection. The job validates it when it runs the search.","additionalProperties":true},"includeRecordIds":{"type":"array","items":{"type":"string"}},"excludeRecordIds":{"type":"array","items":{"type":"string"}}},"required":[],"additionalProperties":false}},"required":["addSecurityTagIds","removeSecurityTagIds","selection"],"additionalProperties":false},"CreateRecordJobResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ICreateRecordJobResponse","description":"The created job, with its id and initial status.","type":"object","properties":{"data":{"allOf":[{"$ref":"#/components/schemas/BaseCreateRequest"},{"additionalProperties":false,"properties":{"id":{"type":"string"},"attributes":{"$ref":"#/components/schemas/RecordJob"}},"required":["id","attributes"]}]},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}},"required":["data","jsonapi"],"additionalProperties":false},"RecordJob":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordJob","description":"A record background job: the base job attributes plus a record job `type` and its `parameters`.","type":"object","allOf":[{"$ref":"#/components/schemas/BackgroundJobAttributes"},{"type":"object","properties":{"type":{"type":"string","enum":["deleteRecord","restoreRecord","permanentlyDeleteRecord","createRecordFromScratch","createMediaFromUrl","migrateRecordLifecycleStatus","importSeriesOriginNexus","importMoviesOriginNexus","bulkEditRecords","deleteAlternateRunningOrder","moveRecord","bulkEditPermissionGroups"]},"parameters":{"type":"object","oneOf":[{"properties":{"recordId":{"type":"string"},"tenantId":{"type":"string"},"subject":{"type":"string","description":"Display label: the target record's primary title at job creation, so it stays readable after a delete. Display only."}},"required":["recordId","tenantId"],"additionalProperties":false},{"properties":{"seriesId":{"type":"string"},"tenantId":{"type":"string"},"subject":{"type":"string","description":"Display label: the primary title of the Origin Nexus record to import, at job creation. Display only."}},"required":["seriesId","tenantId"],"additionalProperties":false},{"properties":{"movieId":{"type":"string"},"tenantId":{"type":"string"},"subject":{"type":"string","description":"Display label: the primary title of the Origin Nexus record to import, at job creation. Display only."}},"required":["movieId","tenantId"],"additionalProperties":false},{"properties":{"workType":{"$ref":"#/components/schemas/WorkTypes"},"primaryTitle":{"type":"string"},"tenantId":{"type":"string"},"subject":{"type":"string","description":"Display label: the target record's primary title at job creation. Display only."}},"required":["recordId","workType","tenantId"],"additionalProperties":false},{"properties":{"tenantId":{"type":"string"},"recordId":{"type":"string"},"urls":{"type":"array","items":{"type":"string"}},"subject":{"type":"string","description":"Display label: the target record's primary title at job creation. Display only."}},"required":["urls","tenantId","recordId"],"additionalProperties":false},{"properties":{"tenantId":{"type":"string"},"oldLifecycleStatus":{"type":"string"},"newLifecycleStatus":{"type":"string"}},"required":["tenantId","oldLifecycleStatus","newLifecycleStatus"],"additionalProperties":false},{"description":"`bulkEditRecords` parameters as stored on the job, including the server-set `tenantId` and `jobId`.","properties":{"tenantId":{"type":"string"},"jobId":{"type":"string"},"locale":{"type":"string"},"edits":{"type":"array","items":{"type":"object","properties":{"fieldKey":{"type":"string"},"action":{"type":"string","enum":["overwrite","delete"]},"value":{}},"required":["fieldKey","action"],"additionalProperties":false}},"selection":{"type":"object","additionalProperties":true}},"required":["tenantId","edits","selection"],"additionalProperties":true},{"properties":{"targetParentId":{"type":"string"},"previousParentId":{"type":"string","description":"The moved records' shared parent before the move."},"moves":{"type":"array","description":"One entry per moved record.","items":{"type":"object","properties":{"recordId":{"type":"string"},"previousPath":{"type":"string","description":"The record's hierarchy path (ancestor ids, root first) before the move."},"newPath":{"type":"string","description":"The record's hierarchy path once the move completes."}},"required":["recordId","previousPath","newPath"],"additionalProperties":false}},"tenantId":{"type":"string"},"subject":{"type":"string","description":"Display label: the first moved record's primary title plus the count of the others, at job creation. Display only."}},"required":["targetParentId","previousParentId","moves","tenantId"],"additionalProperties":false},{"description":"`bulkEditPermissionGroups` parameters as stored on the job: the permission groups added and removed. The selection is not stored.","properties":{"addSecurityTagIds":{"type":"array","items":{"type":"string"}},"removeSecurityTagIds":{"type":"array","items":{"type":"string"}}},"required":["addSecurityTagIds","removeSecurityTagIds"],"additionalProperties":false}]}},"required":["type","parameters"],"additionalProperties":false}],"required":["arn","status","created","updated","type","parameters"],"additionalProperties":false},"BackgroundJobAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBackgroundJobAttributes","description":"Attributes of a background job, a long-running operation such as a contributor delete or tenant data export. They carry the status, job type and parameters, plus the output on completion, error details on failure, and item counts for batch jobs.","type":"object","allOf":[{"$ref":"#/components/schemas/BaseResourceAttributes"},{"type":"object","properties":{"type":{"type":"string"},"parameters":{"type":"object"},"status":{"$ref":"#/components/schemas/BackgroundJobStatus"},"output":{"type":"object","properties":{"errorsAvailable":{"type":"boolean","description":"True when GET /backgroundJobs/{jobId}/errors can download the job's per-item error files."}}},"totalItemsCount":{"type":"integer","minimum":0,"description":"Total items in a batch job, when applicable."},"successItemsCount":{"type":"integer","minimum":0,"description":"Items the batch job processed successfully, when applicable."},"failedItemsCount":{"type":"integer","minimum":0,"description":"Items that failed in a batch job, when applicable."},"error":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"}},"required":["message","code"],"additionalProperties":false}},"required":["type","parameters","status"],"additionalProperties":false}],"additionalProperties":false},"BaseResourceAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBaseResourceAttributes","description":"Timestamps on every resource's attributes, as ISO 8601 date-times. `created` marks the resource's creation; `updated` marks its last change.","type":"object","additionalProperties":false,"required":["created","updated"],"properties":{"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"}}},"BackgroundJobStatus":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IBackgroundJobStatus","description":"A background job's status. `RUNNING` and `PENDING_REDRIVE` (queued for retry) are still in progress; `SUCCEEDED`, `FAILED`, `TIMED_OUT` and `ABORTED` are final.","type":"string","enum":["ABORTED","FAILED","PENDING_REDRIVE","RUNNING","SUCCEEDED","TIMED_OUT"]},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/record-jobs":{"post":{"summary":"Create a record job","operationId":"createRecordJob","description":"Start a record background job. `type` selects the job.","tags":["Records"],"requestBody":{"description":"The job to start: its type, tenant and job-specific parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordJobRequest"}}}},"responses":{"201":{"description":"Record job created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRecordJobResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List ancestors of a record

> List the record's ancestors, root first. Excludes the record itself. Returns all ancestors unless \`filter.status\` is set.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordGetDeletedAncestorsResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordGetDeletedAncestorsResponse","description":"A record's ancestors, top-down. Filter by status with `filter.status`, for example `filter.status=DELETED`. Empty when no ancestor matches.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]},"attributes":{"type":"object","properties":{"primaryTitle":{"type":"string"},"workType":{"type":"string"},"sequenceNumber":{"type":"integer"},"status":{"type":"string","enum":["ACTIVE","DELETED"]}},"additionalProperties":false,"required":["primaryTitle","workType","sequenceNumber","status"]},"relationships":{"type":"object","properties":{"parent":{"description":"This ancestor's parent, one level up. Absent for the root ancestor.","$ref":"#/components/schemas/RecordRelationship"}},"additionalProperties":false}},"additionalProperties":false,"required":["id","type","attributes"]}},"meta":{"type":"object","properties":{"workTypeCounts":{"type":"object","description":"Number of returned ancestors per work type.","additionalProperties":{"type":"integer"}}},"additionalProperties":false},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/ancestors":{"get":{"summary":"List ancestors of a record","operationId":"recordGetDeletedAncestors","description":"List the record's ancestors, root first. Excludes the record itself. Returns all ancestors unless `filter.status` is set.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record whose ancestors to list.","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter.status","description":"Return only ancestors with this record status. Omit for all. `DELETED` previews which parents a restore brings back with the record.","in":"query","required":false,"style":"form","explode":false,"schema":{"type":"string","enum":["ACTIVE","DELETED"]}}],"responses":{"200":{"description":"Ancestors, possibly empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordGetDeletedAncestorsResponse"}}}},"400":{"description":"An unknown query parameter, or an invalid value.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List direct child record identifiers

> List the ids of the record's active direct children, such as a Series' Seasons, or a Season's or Series' Episodes. Empty when the record has none, such as a Movie. Excludes collection members: use \`GET /records/{recordId}/collectionMembers\`.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordChildrenFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordChildrenFindManyResponse","description":"Identifiers of the parent's direct active children. Excludes collection members: use `GET /records/{recordId}/collectionMembers`. Empty when the parent has no hierarchical children, such as a Movie, a leaf Episode or a Compilation.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"additionalProperties":false,"required":["id","type"]}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/children":{"get":{"summary":"List direct child record identifiers","operationId":"recordChildrenFindMany","description":"List the ids of the record's active direct children, such as a Series' Seasons, or a Season's or Series' Episodes. Empty when the record has none, such as a Movie. Excludes collection members: use `GET /records/{recordId}/collectionMembers`.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record whose direct children to list.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Child record ids, possibly empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordChildrenFindManyResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List a record's collection members

> List the collection members of a record.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordCollectionMemberFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordCollectionMemberFindManyResponse","description":"The member records of a collection.","type":"object","additionalProperties":false,"required":["data","meta","links","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["collectionLinkageItems"]},"attributes":{"type":"object","properties":{"ranking":{"type":"number"}},"additionalProperties":false,"required":["ranking"]},"relationships":{"type":"object","properties":{"record":{"description":"The member record.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this collection membership.","$ref":"#/components/schemas/TenantRelationship"}},"additionalProperties":false,"required":["record","tenant"]}},"additionalProperties":false,"required":["id","type","attributes","relationships"]},"additionalProperties":false},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/collectionMembers":{"get":{"summary":"List a record's collection members","operationId":"recordCollectionMemberFindMany","description":"List the collection members of a record.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record whose collection members to list.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Collection members.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCollectionMemberFindManyResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List a record's collections

> List the collections a record is a member of, across every collection work type. Collections you cannot read are left out.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordCollectionFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordCollectionFindManyResponse","description":"The collections a record belongs to.","type":"object","additionalProperties":false,"required":["data","meta","links","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["collectionLinkageItems"]},"attributes":{"type":"object","properties":{"ranking":{"type":"number"}},"additionalProperties":false,"required":["ranking"]},"relationships":{"type":"object","properties":{"collection":{"description":"The collection this record is a member of.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this collection membership.","$ref":"#/components/schemas/TenantRelationship"}},"additionalProperties":false,"required":["collection","tenant"]}},"additionalProperties":false,"required":["id","type","attributes","relationships"]},"additionalProperties":false},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/collections":{"get":{"summary":"List a record's collections","operationId":"recordCollectionFindMany","description":"List the collections a record is a member of, across every collection work type. Collections you cannot read are left out.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record whose collections to list.","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter.collection.workType","description":"Return only collections of this work type, such as `Compilation`.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Collections.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordCollectionFindManyResponse"}}}},"400":{"description":"`filter.collection.workType` is not a work type key, or the request has an unknown query parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Add, reorder or remove collection members

> Apply add, update and remove operations to a collection's members atomically. The record must be of a collection work type, such as \`Compilation\`. Needs permission to change the collection and to read each record added. An \`update\` or \`remove\` of a member of another collection answers 404. An \`update\` whose \`data.id\` differs from its \`ref.id\` answers 409.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"CollectionMembersAtomicOperationsRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ICollectionMembersAtomicOperationsRequest","description":"Adds, reorders and removes collection members in one transactional call.\n- `add`: adds a record as a new member.\n- `update`: changes a member's `ranking`.\n- `remove`: removes a member.","type":"object","properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"atomic:operations":{"type":"array","items":{"type":"object","oneOf":[{"type":"object","description":"Adds a record as a new collection member. Fails if it is already a member: use `update` to change its ranking, not remove and re-add.","properties":{"op":{"const":"add"},"data":{"$ref":"#/components/schemas/collectionLinkageItemDataObject"}},"required":["op","data"],"additionalProperties":false},{"type":"object","description":"Changes a member's ranking, by its linkage-item id in `ref`, without changing membership. Use it to reorder members.","properties":{"op":{"const":"update"},"ref":{"$ref":"#/components/schemas/collectionLinkageItemRefObject"},"data":{"$ref":"#/components/schemas/collectionLinkageItemUpdateDataObject"}},"required":["op","ref","data"],"additionalProperties":false},{"type":"object","description":"Remove an existing member by its own linkage-item id.","properties":{"op":{"const":"remove"},"ref":{"$ref":"#/components/schemas/collectionLinkageItemRefObject"}},"required":["op","ref"],"additionalProperties":false}]}}},"required":["atomic:operations"],"additionalProperties":false,"definitions":{"collectionLinkageItemDataObject":{"type":"object","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"},"attributes":{"type":"object","properties":{"ranking":{"type":"number","minimum":0}},"additionalProperties":false},"relationships":{"description":"The record to add as a collection member.","type":"object","properties":{"record":{"description":"An existing record to add, by type and id. This call doesn't create it.","type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"records"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"required":["record"],"additionalProperties":false}},"required":["type","attributes","relationships"],"additionalProperties":false},"collectionLinkageItemUpdateDataObject":{"type":"object","description":"The member to re-rank, as a resource object. `type` and `id` must equal the operation's `ref`.","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"},"attributes":{"type":"object","properties":{"ranking":{"type":"number","minimum":0}},"additionalProperties":false}},"required":["type","id","attributes"],"additionalProperties":false},"collectionLinkageItemRefObject":{"type":"object","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"collectionLinkageItemDataObject":{"type":"object","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"},"attributes":{"type":"object","properties":{"ranking":{"type":"number","minimum":0}},"additionalProperties":false},"relationships":{"description":"The record to add as a collection member.","type":"object","properties":{"record":{"description":"An existing record to add, by type and id. This call doesn't create it.","type":"object","properties":{"data":{"type":"object","properties":{"type":{"type":"string","const":"records"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"required":["record"],"additionalProperties":false}},"required":["type","attributes","relationships"],"additionalProperties":false},"collectionLinkageItemRefObject":{"type":"object","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"collectionLinkageItemUpdateDataObject":{"type":"object","description":"The member to re-rank, as a resource object. `type` and `id` must equal the operation's `ref`.","properties":{"type":{"type":"string","const":"collectionLinkageItems"},"id":{"type":"string"},"attributes":{"type":"object","properties":{"ranking":{"type":"number","minimum":0}},"additionalProperties":false}},"required":["type","id","attributes"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}}},"paths":{"/records/{recordId}/collectionMembers/operations":{"post":{"summary":"Add, reorder or remove collection members","operationId":"collectionMembersAtomicOperations","description":"Apply add, update and remove operations to a collection's members atomically. The record must be of a collection work type, such as `Compilation`. Needs permission to change the collection and to read each record added. An `update` or `remove` of a member of another collection answers 404. An `update` whose `data.id` differs from its `ref.id` answers 409.","tags":["Records"],"parameters":[{"name":"recordId","description":"The collection record to change.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Operations (`add`, `update`, `remove`) to apply to the members. Use `update`, not remove and add, to reorder members. Full rules: `ICollectionMembersAtomicOperationsRequest`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CollectionMembersAtomicOperationsRequest"}}},"required":true},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Payload Too Large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List a record's Alternate Running Orders

> List the Alternate Running Orders of a Season, or of a Series with seasonless Episodes. A running order re-sequences the record's direct Episodes for distribution without changing canonical metadata.\
> \- Excludes the canonical order (the Master): the Episodes sorted by \`sequenceNumber\`.\
> \- Returns an empty list when the record has none or can't own running orders: a Movie or Episode answers 200 with no data.\
> \- Still lists the running orders of a soft-deleted record the caller can read.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderFindManyResponse","description":"Every Alternate Running Order belonging to a parent record, ordered by id. Empty when the record has none, or when its work type cannot own running orders.","type":"object","additionalProperties":false,"required":["data","meta","jsonapi"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AlternateRunningOrder"}},"meta":{"type":"object","additionalProperties":false,"required":["count"],"properties":{"count":{"type":"number","description":"Number of running orders returned."}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/alternateRunningOrders":{"get":{"summary":"List a record's Alternate Running Orders","operationId":"alternateRunningOrderFindMany","description":"List the Alternate Running Orders of a Season, or of a Series with seasonless Episodes. A running order re-sequences the record's direct Episodes for distribution without changing canonical metadata.\n- Excludes the canonical order (the Master): the Episodes sorted by `sequenceNumber`.\n- Returns an empty list when the record has none or can't own running orders: a Movie or Episode answers 200 with no data.\n- Still lists the running orders of a soft-deleted record the caller can read.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record whose running orders to list.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Running orders, possibly empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderFindManyResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Create an Alternate Running Order

> Create an Alternate Running Order on a Season, or on a Series with seasonless Episodes.\
> \- Seed it in the same atomic write with \`relationships.items\`: send the parent's Episodes in \`sequenceNumber\` order to copy the Master. Omit it to start empty.\
> \- Names must be unique within the parent, compared case-insensitively after trimming.\
> \- A record holds at most 9 running orders.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderCreateRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderCreateRequest","description":"Creates an Alternate Running Order on a Season, or on a Series with seasonless Episodes.\n- Send `relationships.items` to seed it in the same atomic write; send the parent's Episodes in `sequenceNumber` order to copy the Master. Omit it to start empty.\n- Seeded Episodes keep the order sent. The server assigns their rankings from a microsecond clock, with gaps so you can later move an Episode between two neighbours without renumbering the rest. Read `position` for the 1-based place.\n- Every Episode must be an active direct child of the parent record.","type":"object","additionalProperties":false,"required":["data"],"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","additionalProperties":false,"required":["type","attributes"],"properties":{"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"description":"Optional note. `null` is the same as omitting it.","type":["string","null"],"maxLength":500}}},"relationships":{"type":"object","additionalProperties":false,"properties":{"items":{"description":"Episodes to seed the running order with, in order.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"array","maxItems":95,"uniqueItems":true,"items":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}}}}}}}}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"AlternateRunningOrderFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderFindOneResponse","description":"A single Alternate Running Order.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"$ref":"#/components/schemas/AlternateRunningOrder"},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/alternateRunningOrders":{"post":{"summary":"Create an Alternate Running Order","operationId":"alternateRunningOrderCreateOne","description":"Create an Alternate Running Order on a Season, or on a Series with seasonless Episodes.\n- Seed it in the same atomic write with `relationships.items`: send the parent's Episodes in `sequenceNumber` order to copy the Master. Omit it to start empty.\n- Names must be unique within the parent, compared case-insensitively after trimming.\n- A record holds at most 9 running orders.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record to create the running order on.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The running order to create, optionally seeded with ordered Episodes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderCreateRequest"}}},"required":true},"responses":{"201":{"description":"Alternate Running Order created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderFindOneResponse"}}}},"400":{"description":"The parent can't own running orders, or a seeded Episode is not an eligible active direct child.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"A running order with this name already exists on the record, or the record already holds the maximum number of running orders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get one Alternate Running Order

> Get one Alternate Running Order of the parent record. Get its Episodes from \`GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items\`.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderFindOneResponse","description":"A single Alternate Running Order.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"$ref":"#/components/schemas/AlternateRunningOrder"},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}":{"get":{"summary":"Get one Alternate Running Order","operationId":"alternateRunningOrderFindOne","description":"Get one Alternate Running Order of the parent record. Get its Episodes from `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record that owns the running order.","in":"path","required":true,"schema":{"type":"string"}},{"name":"alternateRunningOrderId","description":"The running order to get.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The running order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderFindOneResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record or Alternate Running Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Rename an Alternate Running Order

> Change a running order's \`name\`, \`description\` or both. Send at least one.\
> \- \`description: null\` clears the description.\
> \- A null \`name\` answers 400: you can't clear it.\
> \- A new name must be unique among the record's other running orders.\
> \- Episodes don't change here: use \`POST /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items/operations\`.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderUpdateRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderUpdateRequest","description":"Renames an Alternate Running Order, changes its description, or both; send at least one. You can't clear `name`. A new name must be unique among the parent record's other running orders. To change Episodes, use the items atomic-operations endpoint.","type":"object","additionalProperties":false,"required":["data"],"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"object","additionalProperties":false,"required":["id","type","attributes"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"type":"object","additionalProperties":false,"minProperties":1,"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"description":"`null` clears the description; omit it to keep the current one.","type":["string","null"],"maxLength":500}}}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"AlternateRunningOrderFindOneResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderFindOneResponse","description":"A single Alternate Running Order.","type":"object","additionalProperties":false,"required":["data","jsonapi"],"properties":{"data":{"$ref":"#/components/schemas/AlternateRunningOrder"},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}":{"patch":{"summary":"Rename an Alternate Running Order","operationId":"alternateRunningOrderUpdateOne","description":"Change a running order's `name`, `description` or both. Send at least one.\n- `description: null` clears the description.\n- A null `name` answers 400: you can't clear it.\n- A new name must be unique among the record's other running orders.\n- Episodes don't change here: use `POST /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items/operations`.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record that owns the running order.","in":"path","required":true,"schema":{"type":"string"}},{"name":"alternateRunningOrderId","description":"The running order to update.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"The attributes to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderUpdateRequest"}}},"required":true},"responses":{"200":{"description":"Alternate Running Order updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderFindOneResponse"}}}},"400":{"description":"No attributes supplied.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record or Alternate Running Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Another running order on this record already uses the new name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List the Episodes of an Alternate Running Order

> List one running order's Episodes, sorted by ranking. Returns ids only: get each Episode with \`GET /records/{recordId}\`, which applies per-record authorization. An item's id is the Episode's record id.\
> \- Fewer items than the running order's \`itemCount\` means some Episodes were hard-deleted.\
> \- Lists entries for Episodes the caller can't read; resolving them answers 403 or 404.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderItemFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderItemFindManyResponse","description":"The Episodes of one Alternate Running Order, sorted by ranking. Returns identifiers only, without titles or canonical sequence numbers: fetch each Episode with `GET /records/{recordId}`. An item's id is the Episode's record id; an Episode appears at most once per running order.","type":"object","additionalProperties":false,"required":["data","meta","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string","description":"The Episode's record id. Use it as `ref.id` in atomic operations."},"type":{"type":"string","enum":["alternateRunningOrderItems"]},"attributes":{"type":"object","additionalProperties":false,"required":["ranking","position"],"properties":{"ranking":{"type":"number","description":"The sort value. Gaps are allowed, so a single move is one `update` operation."},"position":{"type":"number","description":"The Episode's 1-based place in this running order. Read-only.","readOnly":true}}},"relationships":{"type":"object","additionalProperties":false,"required":["record","alternateRunningOrder"],"properties":{"record":{"description":"The Episode this entry places in the running order.","$ref":"#/components/schemas/RecordRelationship"},"alternateRunningOrder":{"description":"The running order this entry belongs to.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]}}}}}}}}}},"included":{"type":"array","description":"The running order these Episodes belong to.","items":{"$ref":"#/components/schemas/AlternateRunningOrder"}},"meta":{"type":"object","additionalProperties":false,"required":["count"],"properties":{"count":{"type":"number","description":"Number of Episodes in this running order."}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items":{"get":{"summary":"List the Episodes of an Alternate Running Order","operationId":"alternateRunningOrderItemFindMany","description":"List one running order's Episodes, sorted by ranking. Returns ids only: get each Episode with `GET /records/{recordId}`, which applies per-record authorization. An item's id is the Episode's record id.\n- Fewer items than the running order's `itemCount` means some Episodes were hard-deleted.\n- Lists entries for Episodes the caller can't read; resolving them answers 403 or 404.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record that owns the running order.","in":"path","required":true,"schema":{"type":"string"}},{"name":"alternateRunningOrderId","description":"The running order whose Episodes to list.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The running order's Episodes, possibly empty.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderItemFindManyResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record or Alternate Running Order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## List the Episodes of an Alternate Running Order by its id alone

> Same response as \`GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items\`, for when the owning Season or Series is unknown. Requires permission to read alternate running orders on the owning Season or Series. Answers 404 for a running order with no Episodes: list it through the record-scoped endpoint.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderItemFindManyResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderItemFindManyResponse","description":"The Episodes of one Alternate Running Order, sorted by ranking. Returns identifiers only, without titles or canonical sequence numbers: fetch each Episode with `GET /records/{recordId}`. An item's id is the Episode's record id; an Episode appears at most once per running order.","type":"object","additionalProperties":false,"required":["data","meta","jsonapi"],"properties":{"data":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string","description":"The Episode's record id. Use it as `ref.id` in atomic operations."},"type":{"type":"string","enum":["alternateRunningOrderItems"]},"attributes":{"type":"object","additionalProperties":false,"required":["ranking","position"],"properties":{"ranking":{"type":"number","description":"The sort value. Gaps are allowed, so a single move is one `update` operation."},"position":{"type":"number","description":"The Episode's 1-based place in this running order. Read-only.","readOnly":true}}},"relationships":{"type":"object","additionalProperties":false,"required":["record","alternateRunningOrder"],"properties":{"record":{"description":"The Episode this entry places in the running order.","$ref":"#/components/schemas/RecordRelationship"},"alternateRunningOrder":{"description":"The running order this entry belongs to.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]}}}}}}}}}},"included":{"type":"array","description":"The running order these Episodes belong to.","items":{"$ref":"#/components/schemas/AlternateRunningOrder"}},"meta":{"type":"object","additionalProperties":false,"required":["count"],"properties":{"count":{"type":"number","description":"Number of Episodes in this running order."}}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"RecordRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordRelationship","description":"A relationship to a record","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["records"]}},"required":["id","type"]},"meta":{"type":"object","properties":{"primaryTitle":{"type":"string"}}},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data"]},"LinksRelated":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ILinks","description":"A JSON:API links object with an absolute or relative 'related' link","type":"object","required":["related"],"properties":{"related":{"type":"string"}},"additionalProperties":false},"AlternateRunningOrder":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrder","description":"An Alternate Running Order: a re-sequencing of a record's direct Episode children for distribution. It never changes an Episode's `sequenceNumber`, `parentId` or `path`. The canonical order (the Master) has no resource: it is the Episodes sorted by `sequenceNumber`.","type":"object","additionalProperties":false,"required":["id","type","attributes","relationships"],"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["alternateRunningOrders"]},"attributes":{"$ref":"#/components/schemas/AlternateRunningOrderAttributes"},"relationships":{"$ref":"#/components/schemas/AlternateRunningOrderRelationships"}}},"AlternateRunningOrderAttributes":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderAttributes","description":"Attributes of an Alternate Running Order: a named, reusable Episode sequence owned by one Season, or by one Series with seasonless Episodes.","type":"object","additionalProperties":false,"required":["name","itemCount","created","updated"],"properties":{"name":{"type":"string","description":"Display name, unique within the parent record, ignoring case and surrounding whitespace.","minLength":1,"maxLength":120},"description":{"type":"string","description":"Free-text note describing what this order is for.","maxLength":500},"itemCount":{"type":"number","description":"Number of Episodes in this running order. Read-only.","readOnly":true},"created":{"type":"string"},"updated":{"type":"string"}}},"AlternateRunningOrderRelationships":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderRelationships","description":"Relationships of an Alternate Running Order.","type":"object","additionalProperties":false,"required":["record","tenant"],"properties":{"record":{"description":"The parent Season, or seasonless Series, that owns this running order.","$ref":"#/components/schemas/RecordRelationship"},"tenant":{"description":"The tenant that owns this running order.","$ref":"#/components/schemas/TenantRelationship"},"items":{"description":"Link to this running order's Episodes, in order: `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`.","type":"object","additionalProperties":false,"required":["links"],"properties":{"links":{"$ref":"#/components/schemas/LinksRelated"}}}}},"TenantRelationship":{"$schema":"http://json-schema.org/draft-07/schema#","title":"ITenantRelationship","description":"A relationship to a tenant","type":"object","properties":{"data":{"additionalProperties":false,"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["tenants"]}},"required":["id","type"]},"links":{"$ref":"#/components/schemas/LinksRelated"}},"required":["data","links"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/alternateRunningOrders/{alternateRunningOrderId}/items":{"get":{"summary":"List the Episodes of an Alternate Running Order by its id alone","operationId":"alternateRunningOrderItemFindManyByAlternateRunningOrder","description":"Same response as `GET /records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items`, for when the owning Season or Series is unknown. Requires permission to read alternate running orders on the owning Season or Series. Answers 404 for a running order with no Episodes: list it through the record-scoped endpoint.","tags":["Records"],"parameters":[{"name":"alternateRunningOrderId","description":"The running order whose Episodes to list.","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The running order's Episodes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderItemFindManyResponse"}}}},"400":{"description":"This operation accepts no query parameters.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Alternate Running Order not found, or it holds no Episodes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Add, reorder and remove the Episodes of an Alternate Running Order

> Apply \`add\`, \`update\` and \`remove\` operations to one running order's Episodes in a single transaction: all succeed or none apply. Never changes canonical metadata.\
> \- Use \`update\`, not remove and add, to move an Episode.\
> \- \`ref.id\` is the Episode's record id; an Episode appears at most once per running order.\
> \- At most 99 operations per call. Rankings need not be contiguous: leave gaps so a move is a single \`update\`.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"AlternateRunningOrderItemsAtomicOperationsRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IAlternateRunningOrderItemsAtomicOperationsRequest","description":"Adds, reorders and removes the Episodes of one Alternate Running Order in one transactional call of 1 to 99 operations.\n- `add`: places an Episode at `ranking`, or at the end when `ranking` is omitted. Fails if the Episode is already present: use `update` to move it, not remove and add.\n- `update`: changes an Episode's ranking.\n- `remove`: takes an Episode out of the order. The Episode record stays; you can add it back later.\n\n`ref.id` is the Episode's record id, since an Episode appears at most once per running order. Rankings need not be contiguous: leave gaps (100, 200, 300, ...) so a drag is one `update` instead of renumbering every row below it. Never changes an Episode's `sequenceNumber`, `parentId` or `path`.","type":"object","additionalProperties":false,"required":["atomic:operations"],"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"atomic:operations":{"type":"array","maxItems":99,"items":{"type":"object","oneOf":[{"type":"object","description":"Add an Episode to the running order. Fails with 409 if it is already present.","additionalProperties":false,"required":["op","data"],"properties":{"op":{"type":"string","const":"add"},"data":{"$ref":"#/components/schemas/alternateRunningOrderItemDataObject"}}},{"type":"object","description":"Change an existing Episode's ranking within the running order.","additionalProperties":false,"required":["op","ref","data"],"properties":{"op":{"type":"string","const":"update"},"ref":{"$ref":"#/components/schemas/alternateRunningOrderItemRefObject"},"data":{"$ref":"#/components/schemas/alternateRunningOrderItemUpdateDataObject"}}},{"type":"object","description":"Remove an Episode from the running order. Doesn't delete the Episode record.","additionalProperties":false,"required":["op","ref"],"properties":{"op":{"type":"string","const":"remove"},"ref":{"$ref":"#/components/schemas/alternateRunningOrderItemRefObject"}}}]}}},"definitions":{"alternateRunningOrderItemDataObject":{"type":"object","additionalProperties":false,"required":["type","attributes","relationships"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"attributes":{"type":"object","additionalProperties":false,"properties":{"ranking":{"description":"Where the Episode sits in the running order; lower comes first. A positive integer up to 9007199254740991. Omit it to append the Episode at the end, with a microsecond timestamp as its ranking.","type":"integer","minimum":1,"maximum":9007199254740991}}},"relationships":{"type":"object","additionalProperties":false,"required":["record"],"properties":{"record":{"description":"The Episode to place. It must be an active direct child of the running order's parent record with work type Episode; you can't add EpisodeEdits.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","const":"records"},"id":{"type":"string"}}}}}}}}},"alternateRunningOrderItemUpdateDataObject":{"type":"object","description":"The entry to move, as a resource object. `type` and `id` must equal the operation's `ref`.","additionalProperties":false,"required":["type","id","attributes"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"id":{"type":"string","description":"The Episode's record id."},"attributes":{"type":"object","additionalProperties":false,"required":["ranking"],"properties":{"ranking":{"description":"Where the Episode sits in the running order; lower comes first. A positive integer up to 9007199254740991.","type":"integer","minimum":1,"maximum":9007199254740991}}}}},"alternateRunningOrderItemRefObject":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"id":{"type":"string","description":"The Episode's record id."}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"alternateRunningOrderItemDataObject":{"type":"object","additionalProperties":false,"required":["type","attributes","relationships"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"attributes":{"type":"object","additionalProperties":false,"properties":{"ranking":{"description":"Where the Episode sits in the running order; lower comes first. A positive integer up to 9007199254740991. Omit it to append the Episode at the end, with a microsecond timestamp as its ranking.","type":"integer","minimum":1,"maximum":9007199254740991}}},"relationships":{"type":"object","additionalProperties":false,"required":["record"],"properties":{"record":{"description":"The Episode to place. It must be an active direct child of the running order's parent record with work type Episode; you can't add EpisodeEdits.","type":"object","additionalProperties":false,"required":["data"],"properties":{"data":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","const":"records"},"id":{"type":"string"}}}}}}}}},"alternateRunningOrderItemRefObject":{"type":"object","additionalProperties":false,"required":["type","id"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"id":{"type":"string","description":"The Episode's record id."}}},"alternateRunningOrderItemUpdateDataObject":{"type":"object","description":"The entry to move, as a resource object. `type` and `id` must equal the operation's `ref`.","additionalProperties":false,"required":["type","id","attributes"],"properties":{"type":{"type":"string","const":"alternateRunningOrderItems"},"id":{"type":"string","description":"The Episode's record id."},"attributes":{"type":"object","additionalProperties":false,"required":["ranking"],"properties":{"ranking":{"description":"Where the Episode sits in the running order; lower comes first. A positive integer up to 9007199254740991.","type":"integer","minimum":1,"maximum":9007199254740991}}}}},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}}},"paths":{"/records/{recordId}/alternateRunningOrders/{alternateRunningOrderId}/items/operations":{"post":{"summary":"Add, reorder and remove the Episodes of an Alternate Running Order","operationId":"alternateRunningOrderItemsAtomicOperations","description":"Apply `add`, `update` and `remove` operations to one running order's Episodes in a single transaction: all succeed or none apply. Never changes canonical metadata.\n- Use `update`, not remove and add, to move an Episode.\n- `ref.id` is the Episode's record id; an Episode appears at most once per running order.\n- At most 99 operations per call. Rankings need not be contiguous: leave gaps so a move is a single `update`.","tags":["Records"],"parameters":[{"name":"recordId","description":"The parent record that owns the running order.","in":"path","required":true,"schema":{"type":"string"}},{"name":"alternateRunningOrderId","description":"The running order to change.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Operations to apply atomically to the running order's Episodes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlternateRunningOrderItemsAtomicOperationsRequest"}}},"required":true},"responses":{"204":{"description":"Operations applied"},"400":{"description":"An Episode is not an eligible active direct child, or the result would have duplicate rankings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Parent record, Alternate Running Order, or a referenced Episode entry not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"One of:\n- An Episode is already in the running order.\n- Two operations target the same Episode.\n- An `update`'s `data.id` differs from its `ref.id`.\n- Someone else changed the running order during this batch. Retryable: re-read the order and reapply.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Too many operations in one request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Get external field data for a record

> Get a record's field data from an external provider: Origin Nexus, IMDB or EIDR. Matches the record by its id in that system (Origin Nexus id, IMDB id or EIDR id). Read-only. Covers synopses, alternate titles, primary title, release metadata, runtime, countries of origin, languages, genres, keywords and tag fields.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"ExternalDataFieldsFindManyResponse":{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"IExternalDataFieldsFindManyResponse","title":"IExternalDataFieldsFindManyResponse","description":"A record's field data from an external provider, such as Origin Nexus, as a flat list of typed field resources.","type":"object","properties":{"data":{"type":"array","description":"External field resources for this record and provider.","items":{"$ref":"#/components/schemas/IExternalDataFieldItem"}},"meta":{"type":"object","description":"Document-level meta for the external data request","properties":{"total":{"type":"integer","description":"Total number of field items returned"},"provider":{"type":"string","enum":["OriginNexus","IMDB","EIDR","Gracenote"],"description":"Provider identifier"},"availableLocales":{"type":"array","items":{"type":"string"},"description":"Locale codes that have data in at least one external source (synopses or titles)"}},"required":["total","provider"]},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"},"links":{"type":"object","description":"JSON:API document-level links"}},"required":["data","meta","jsonapi"],"$defs":{"IExternalDataFieldItem":{"type":"object","description":"One external field resource","properties":{"type":{"type":"string","enum":["externalSynopses","externalTitles","externalPrimaryTitle","externalReleaseYear","externalReleaseDate","externalRunLength","externalCountryOfOrigin","externalPrimarySpokenLanguage","externalOriginalLanguage","externalGenre","externalKeyword"],"description":"Discriminator for item shape"},"id":{"type":"string","description":"Stable compound id: recordId:provider:itemKey"},"attributes":{"type":"object","description":"Item fields (varies by type)","properties":{"field":{"type":"string","enum":["synopses","titles","primaryTitle","releaseYear","releaseDate","runLength","countriesOfOrigin","primarySpokenLanguage","originalLanguage","genres","keywords"],"description":"Field group this item belongs to"},"value":{"type":"string","description":"Primary value for this item (title text, synopsis body, year, date, duration, language code, etc.)"},"language":{"type":"string","description":"Locale / language tag (present on synopses and titles)"},"source":{"type":"string","description":"The provider, such as Origin Nexus."},"attribution":{"type":"string","description":"Attribution / credit for the source value"},"synopsisType":{"type":"string","description":"Synopsis kind (e.g. short, long, log line)"},"titleType":{"type":"string","description":"Title kind (e.g. primary, alternative)"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"characterCount":{"type":"integer","description":"Character length of the value for UI hints"},"key":{"type":"string","description":"Sub-key disambiguating multi-valued items"}},"required":["field","source"],"additionalProperties":false}},"required":["type","id","attributes"],"additionalProperties":false}}},"IExternalDataFieldItem":{"type":"object","description":"One external field resource","properties":{"type":{"type":"string","enum":["externalSynopses","externalTitles","externalPrimaryTitle","externalReleaseYear","externalReleaseDate","externalRunLength","externalCountryOfOrigin","externalPrimarySpokenLanguage","externalOriginalLanguage","externalGenre","externalKeyword"],"description":"Discriminator for item shape"},"id":{"type":"string","description":"Stable compound id: recordId:provider:itemKey"},"attributes":{"type":"object","description":"Item fields (varies by type)","properties":{"field":{"type":"string","enum":["synopses","titles","primaryTitle","releaseYear","releaseDate","runLength","countriesOfOrigin","primarySpokenLanguage","originalLanguage","genres","keywords"],"description":"Field group this item belongs to"},"value":{"type":"string","description":"Primary value for this item (title text, synopsis body, year, date, duration, language code, etc.)"},"language":{"type":"string","description":"Locale / language tag (present on synopses and titles)"},"source":{"type":"string","description":"The provider, such as Origin Nexus."},"attribution":{"type":"string","description":"Attribution / credit for the source value"},"synopsisType":{"type":"string","description":"Synopsis kind (e.g. short, long, log line)"},"titleType":{"type":"string","description":"Title kind (e.g. primary, alternative)"},"country":{"type":"string","description":"ISO 3166-1 alpha-2 country code"},"characterCount":{"type":"integer","description":"Character length of the value for UI hints"},"key":{"type":"string","description":"Sub-key disambiguating multi-valued items"}},"required":["field","source"],"additionalProperties":false}},"required":["type","id","attributes"],"additionalProperties":false},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}}}},"paths":{"/records/{recordId}/externalData":{"get":{"summary":"Get external field data for a record","operationId":"externalDataFieldsFindMany","description":"Get a record's field data from an external provider: Origin Nexus, IMDB or EIDR. Matches the record by its id in that system (Origin Nexus id, IMDB id or EIDR id). Read-only. Covers synopses, alternate titles, primary title, release metadata, runtime, countries of origin, languages, genres, keywords and tag fields.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record.","in":"path","required":true,"schema":{"type":"string"}},{"name":"filter.provider","description":"The external data provider to query.","in":"query","required":true,"schema":{"type":"string","enum":["OriginNexus","IMDB","EIDR","Gracenote"]}},{"name":"filter.fieldGroup","description":"Return only this field group. Omit for all groups.","in":"query","required":false,"schema":{"type":"string","enum":["synopses","titles","primaryTitle","releaseYear","releaseDate","runLength","countriesOfOrigin","primarySpokenLanguage","originalLanguage","genres","keywords"]}},{"name":"filter.locale","description":"Return data for this locale only, such as `en-US`.","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"External field data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalDataFieldsFindManyResponse"}}}},"400":{"description":"Invalid provider or field group.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"The caller has no access to external data.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Record not found, or it has no Origin Nexus id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Add security tags to a record

> Append security tags to the record, keeping existing ones. Skips tags already present. A record holds at most 100 security tags.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordAddSecurityTagsRelationshipRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordAddSecurityTagsRelationshipRequest","description":"Adds security tags to a record.","type":"object","required":["data"],"additionalProperties":false,"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"array","minItems":1,"maxItems":99,"uniqueItems":true,"items":{"type":"object","required":["id","type"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}}},"paths":{"/records/{recordId}/relationships/securityTags":{"post":{"summary":"Add security tags to a record","operationId":"recordAddSecurityTagsRelationship","description":"Append security tags to the record, keeping existing ones. Skips tags already present. A record holds at most 100 security tags.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordAddSecurityTagsRelationshipRequest"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```

## Remove security tags from a record

> Remove security tags from the record, including tags that were since deleted. Ignores tags not on the record. At least one existing tag must remain; otherwise the API rejects the request.

```json
{"openapi":"3.0.3","info":{"title":"Fabric API - Audit","version":"0.9.2817"},"tags":[{"name":"Records","description":"Manage a tenant's records. A record holds a title's core metadata and links to its field values and credits lists. Also covers record background jobs (create a record from scratch, create a Series with its hierarchy from global metadata, delete a record with all its children), collections and their members, and external data lookups."}],"servers":[{"url":"{protocol}://{domain}/{basePath}","variables":{"protocol":{"enum":["http","https"],"default":"https"},"domain":{"default":"api.studio.fabricdata.com"},"basePath":{"default":"v1"}}}],"security":[{"jwt-apikey-authorizer":[]}],"components":{"securitySchemes":{"jwt-apikey-authorizer":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"RecordDeleteSecurityTagsRelationshipRequest":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IRecordDeleteSecurityTagsRelationshipRequest","description":"The security tags to remove from a record.","type":"object","required":["data"],"additionalProperties":false,"properties":{"meta":{"$ref":"#/components/schemas/WriteRequestMeta"},"data":{"type":"array","minItems":1,"maxItems":99,"uniqueItems":true,"items":{"type":"object","required":["id","type"],"additionalProperties":false,"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["securityTags"]}}}}}},"WriteRequestMeta":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IWriteRequestMeta","description":"Audit metadata for a write request. `audit.source` names the surface that sent it, such as `studio-web`, `studio-mcp`, `api` or `system`; `audit.reason` is a free-text justification.","type":"object","additionalProperties":false,"properties":{"audit":{"type":"object","additionalProperties":false,"properties":{"source":{"type":"string","maxLength":64},"reason":{"type":"string","maxLength":256}}}}},"ErrorResponse":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IErrorResponse","description":"The body of a failed request: an `errors` array with one or more error objects.","type":"object","required":["errors","jsonapi"],"additionalProperties":false,"properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/Error"}},"jsonapi":{"$ref":"#/components/schemas/JsonApiVersion"}}},"Error":{"$schema":"http://json-schema.org/draft-07/schema#","title":"IError","description":"One JSON:API error object. `status` is the HTTP status code as a string, `title` a short summary and `detail` optional context. `meta` can carry structured conflict or authorization details.","type":"object","additionalProperties":false,"required":["status","title"],"properties":{"status":{"type":"string"},"title":{"type":"string"},"code":{"type":"string","description":"A stable code for the problem that you can act on, when the operation documents one."},"detail":{"type":"string"},"source":{"type":"object","description":"A JSON Pointer to the request field that caused the error, such as `/data/attributes/title`.","properties":{"pointer":{"type":"string"}}},"meta":{"type":"object","additionalProperties":true,"properties":{"stack":{"type":"string","description":"The error's stack trace. Non-production environments only."},"conflictItems":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}}}},"unauthorizedItems":{"type":"array","items":{"type":"string"}}}}}},"JsonApiVersion":{"type":"object","description":"The JSON:API version this document conforms to.","properties":{"version":{"type":"string"}},"required":["version"],"additionalProperties":false}}},"paths":{"/records/{recordId}/relationships/securityTags":{"delete":{"summary":"Remove security tags from a record","operationId":"recordDeleteSecurityTagsRelationship","description":"Remove security tags from the record, including tags that were since deleted. Ignores tags not on the record. At least one existing tag must remain; otherwise the API rejects the request.","tags":["Records"],"parameters":[{"name":"recordId","description":"The record.","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordDeleteSecurityTagsRelationshipRequest"}}}},"responses":{"204":{"description":"No Content"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}}}
```
