openapi: 3.0.0 info: description: Specification for Cocina Models version: 1.0.0 title: Cocina Models license: name: Apache 2.0 url: 'http://www.apache.org/licenses/LICENSE-2.0.html' paths: /validate/DRO: post: summary: Validate a DRO requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DRO' responses: '200': description: noop /validate/RequestDRO: post: summary: Validate a Request DRO requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RequestDRO' responses: '200': description: noop /validate/Collection: post: summary: Validate a Collection requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Collection' responses: '200': description: noop /validate/RequestCollection: post: summary: Validate a Request Collection requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RequestCollection' responses: '200': description: noop /validate/AdminPolicy: post: summary: Validate an AdminPolicy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AdminPolicy' responses: '200': description: noop /validate/RequestAdminPolicy: post: summary: Validate a Request AdminPolicy requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RequestAdminPolicy' responses: '200': description: noop /validate/Description: post: summary: Validate a Description requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Description' responses: '200': description: noop components: schemas: Access: description: Access metadata type: object additionalProperties: false properties: access: description: Access level type: string enum: - 'world' - 'stanford' - 'location-based' - 'citation-only' - 'dark' default: 'dark' download: description: Download access level for a file type: string enum: - 'world' - 'stanford' - 'location-based' - 'none' default: 'none' readLocation: description: If access is "location-based", which location should have access. type: string enum: - 'spec' - 'music' - 'ars' - 'art' - 'hoover' - 'm&m' Administrative: type: object additionalProperties: false properties: hasAdminPolicy: $ref: '#/components/schemas/Druid' releaseTags: description: Tags for release type: array items: $ref: '#/components/schemas/ReleaseTag' partOfProject: description: Administrative or Internal project this resource is a part of example: Google Books type: string required: - hasAdminPolicy AdminPolicy: type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/admin_policy.jsonld' example: item externalIdentifier: $ref: '#/components/schemas/Druid' label: type: string version: type: integer administrative: $ref: '#/components/schemas/AdminPolicyAdministrative' description: $ref: '#/components/schemas/Description' required: - administrative - externalIdentifier - label - type - version AdminPolicyAdministrative: type: object additionalProperties: false properties: defaultObjectRights: type: string default: registrationWorkflow: type: string hasAdminPolicy: type: string required: - hasAdminPolicy AppliesTo: description: Property model for indicating the parts, aspects, or versions of the resource to which a descriptive element is applicable. type: object additionalProperties: false properties: appliesTo: type: array items: $ref: "#/components/schemas/DescriptiveBasicValue" CatalogLink: type: object additionalProperties: false required: - catalog - catalogRecordId properties: catalog: description: Catalog that is the source of the linked record. type: string example: symphony catalogRecordId: description: Record identifier that is unique within the context of the linked record's catalog. type: string example: 11403803 Collection: description: A group of Digital Repository Objects that indicate some type of conceptual grouping within the domain that is worth reusing across the system. type: object additionalProperties: false properties: type: description: The content type of the Collection. Selected from an established set of values. type: string enum: - 'http://cocina.sul.stanford.edu/models/collection.jsonld' - 'http://cocina.sul.stanford.edu/models/curated-collection.jsonld' - 'http://cocina.sul.stanford.edu/models/user-collection.jsonld' - 'http://cocina.sul.stanford.edu/models/exhibit.jsonld' - 'http://cocina.sul.stanford.edu/models/series.jsonld' example: item externalIdentifier: $ref: '#/components/schemas/Druid' label: description: Primary processing label (can be same as title) for a Collection. type: string version: description: Version for the Collection within SDR. type: integer access: $ref: '#/components/schemas/Access' administrative: $ref: '#/components/schemas/Administrative' description: $ref: '#/components/schemas/Description' identification: $ref: '#/components/schemas/CollectionIdentification' required: - externalIdentifier - label - type - version - access CollectionIdentification: type: object additionalProperties: false properties: catalogLinks: type: array items: $ref: '#/components/schemas/CatalogLink' Contributor: description: Property model for describing agents contributing in some way to the creation and history of the resource type: object additionalProperties: false properties: name: description: Names associated with a contributor. type: array items: $ref: "#/components/schemas/DescriptiveValue" type: description: Entity type of the contributor (person, organization, etc.). type: string status: description: Status of the contributor relative to other parallel contributors. type: string role: description: Relationships of the contributor to the resource or to an event in its history. type: array items: $ref: "#/components/schemas/DescriptiveValue" DescriptiveAdminMetadata: description: Information about this description of the resource. type: object additionalProperties: false properties: contributor: type: array items: $ref: "#/components/schemas/Contributor" event: type: array items: $ref: "#/components/schemas/Event" language: type: array items: $ref: "#/components/schemas/DescriptiveValue" note: type: array items: $ref: "#/components/schemas/DescriptiveValue" DescriptiveBasicValue: description: Value model for descriptive elements without recursive properties. type: object additionalProperties: false properties: value: description: String value of the descriptive element. type: string type: description: Type of value provided by the descriptive element. type: string status: description: Status of the descriptive element relative to other instances of the element. type: string code: description: Code value of the descriptive element. type: string uri: description: URI value of the descriptive element. type: string format: uri standard: description: Descriptive or content standard to which the value conforms. type: array items: type: string encoding: description: Encoding schema, standard, or syntax to which the value conforms. type: array items: type: string source: $ref: "#/components/schemas/Source" DescriptiveStructuredValue: description: Value model for descriptive elements structured as typed values. type: object additionalProperties: false properties: structuredValue: type: array items: $ref: "#/components/schemas/DescriptiveBasicValue" DescriptiveValue: description: Default value model for descriptive elements. type: object additionalProperties: false allOf: - $ref: "#/components/schemas/DescriptiveBasicValue" - $ref: "#/components/schemas/DescriptiveStructuredValue" - $ref: "#/components/schemas/AppliesTo" DescriptiveValueRequired: type: object additionalProperties: false allOf: - $ref: "#/components/schemas/DescriptiveValue" - anyOf: - type: object required: - value - type: object required: - structuredValue Description: type: object additionalProperties: false properties: title: description: Titles of the resource. type: array minItems: 1 items: $ref: "#/components/schemas/DescriptiveValueRequired" contributor: description: Agents contributing in some way to the creation and history of the resource. type: array items: $ref: "#/components/schemas/Contributor" event: description: Events in the history of the resource. type: array items: $ref: "#/components/schemas/Event" form: description: Characteristics of the resource's physical, digital, and intellectual form and genre. type: array items: $ref: "#/components/schemas/DescriptiveValue" language: description: Languages, scripts, and notations used in all or part of a resource. type: array items: $ref: "#/components/schemas/DescriptiveValue" note: description: Additional information relevant to a resource. type: array items: $ref: "#/components/schemas/DescriptiveValue" identifier: description: Unique strings associated with the resource. type: array items: $ref: "#/components/schemas/DescriptiveValue" purl: description: Stanford persistent URL associated with the resource. type: string format: uri url: description: URLs where the resource may be accessed in full or part. type: array items: $ref: "#/components/schemas/DescriptiveValue" marcEncodedData: description: Data about the resource represented in MARC fixed fields and codes. type: array items: $ref: "#/components/schemas/DescriptiveValue" adminMetadata: $ref: "#/components/schemas/DescriptiveAdminMetadata" required: - title DRO: description: Domain-defined abstraction of a 'work'. Digital Repository Objects' abstraction is describable for our domain’s purposes, i.e. for management needs within our system. type: object additionalProperties: false properties: type: description: The content type of the DRO. Selected from an established set of values. type: string enum: - 'http://cocina.sul.stanford.edu/models/object.jsonld' - 'http://cocina.sul.stanford.edu/models/3d.jsonld' - 'http://cocina.sul.stanford.edu/models/agreement.jsonld' - 'http://cocina.sul.stanford.edu/models/book.jsonld' - 'http://cocina.sul.stanford.edu/models/document.jsonld' - 'http://cocina.sul.stanford.edu/models/geo.jsonld' - 'http://cocina.sul.stanford.edu/models/image.jsonld' - 'http://cocina.sul.stanford.edu/models/page.jsonld' - 'http://cocina.sul.stanford.edu/models/photograph.jsonld' - 'http://cocina.sul.stanford.edu/models/manuscript.jsonld' - 'http://cocina.sul.stanford.edu/models/map.jsonld' - 'http://cocina.sul.stanford.edu/models/media.jsonld' - 'http://cocina.sul.stanford.edu/models/track.jsonld' - 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld' - 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld' example: item externalIdentifier: $ref: '#/components/schemas/Druid' label: description: Primary processing label (can be same as title) for a DRO. type: string version: description: Version for the DRO within SDR. type: integer access: $ref: '#/components/schemas/DROAccess' administrative: $ref: '#/components/schemas/Administrative' description: $ref: '#/components/schemas/Description' identification: $ref: '#/components/schemas/Identification' structural: $ref: '#/components/schemas/DROStructural' geographic: $ref: '#/components/schemas/Geographic' required: - access - administrative - externalIdentifier - label - type - version DROAccess: type: object additionalProperties: false properties: access: type: string enum: - 'world' - 'stanford' - 'location-based' - 'citation-only' - 'dark' default: 'dark' copyright: description: The human readable copyright statement that applies example: Copyright World Trade Organization type: string embargo: $ref: '#/components/schemas/Embargo' download: description: > Download access level. This is used in the transition from Fedora as a way to set a default download level at registration that is copied down to all the files. type: string enum: - 'world' - 'stanford' - 'location-based' - 'none' default: 'none' readLocation: description: > If access is "location-based", which location should have access. This is used in the transition from Fedora as a way to set a default readLocation at registration that is copied down to all the files. type: string enum: - 'spec' - 'music' - 'ars' - 'art' - 'hoover' - 'm&m' useAndReproductionStatement: description: The human readable use and reproduction statement that applies example: Property rights reside with the repository. Literary rights reside with the creators of the documents or their heirs. To obtain permission to publish or reproduce, please contact the Public Services Librarian of the Dept. of Special Collections (http://library.stanford.edu/spc). type: string DROStructural: description: Structural metadata type: object additionalProperties: false properties: contains: description: Filesets that contain the digital representations (Files) type: array items: $ref: '#/components/schemas/FileSet' hasMemberOrders: description: Provided sequences or orderings of members, including some metadata about each sequence (i.e. sequence label, sequence type, if the sequence is primary, etc.). type: array items: $ref: '#/components/schemas/Sequence' isMemberOf: $ref: '#/components/schemas/Druid' hasAgreement: description: Agreement that covers the deposit of the DRO into SDR. type: string Druid: type: string pattern: '^druid:[b-df-hjkmnp-tv-z]{2}[0-9]{3}[b-df-hjkmnp-tv-z]{2}[0-9]{4}$' example: 'druid:bc123df4567' Embargo: type: object additionalProperties: false properties: releaseDate: description: Date when the Collection is released from an embargo. type: string format: date-time example: '2029-06-22T07:00:00.000+00:00' access: description: Access level that applies when embargo expires. type: string enum: - world - stanford - location-based - citation-only - dark useAndReproductionStatement: description: The human readable use and reproduction statement that applies when the embargo expires. example: These materials are in the public domain. type: string required: - releaseDate - access Event: description: Property model for describing events in the history of the resource. type: object additionalProperties: false allOf: - $ref: "#/components/schemas/DescriptiveStructuredValue" - type: object additionalProperties: false properties: type: description: Description of the event (creation, publication, etc.). type: string date: description: Dates associated with the event. type: array items: $ref: "#/components/schemas/DescriptiveValue" contributor: description: Contributors associated with the event. type: array items: $ref: "#/components/schemas/Contributor" location: description: Locations associated with the event. type: array items: $ref: "#/components/schemas/DescriptiveValue" note: description: Other information about the event. type: array items: $ref: "#/components/schemas/DescriptiveValue" File: description: Binaries that are the basis of what our domain manages. Binaries here do not include metadata files generated for the domain's own management purposes. type: object additionalProperties: false properties: type: description: The content type of the File. type: string enum: - 'http://cocina.sul.stanford.edu/models/file.jsonld' externalIdentifier: description: Identifier for the resource within the SDR architecture but outside of the repository. UUID. Constant across resource versions. What clients will use calling the repository. type: string label: description: Primary processing label (can be same as title) for a File. type: string filename: description: Filename for a file. Can be same as label. type: string size: description: Size of the File (binary) in bytes. type: integer version: description: Version for the File within SDR. type: integer hasMimeType: description: MIME Type of the File. type: string use: description: Use for the File. type: string hasMessageDigests: type: array items: $ref: '#/components/schemas/MessageDigest' access: $ref: '#/components/schemas/Access' administrative: $ref: '#/components/schemas/FileAdministrative' presentation: $ref: '#/components/schemas/Presentation' required: - externalIdentifier - label - filename - type - version - access - administrative - hasMessageDigests FileAdministrative: type: object additionalProperties: false properties: sdrPreserve: type: boolean default: true shelve: type: boolean default: false required: - sdrPreserve - shelve FileSet: description: Relevant groupings of Files. Also called a File Grouping. type: object additionalProperties: false properties: type: description: The content type of the Fileset. type: string enum: - 'http://cocina.sul.stanford.edu/models/fileset.jsonld' externalIdentifier: type: string label: description: Primary processing label for a Fileset. type: string version: description: Version for the Fileset within SDR. type: integer structural: $ref: '#/components/schemas/FileSetStructural' required: - externalIdentifier - label - type - version FileSetStructural: description: Structural metadata type: object additionalProperties: false properties: contains: type: array items: $ref: '#/components/schemas/File' Geographic: description: Geographic metadata type: object additionalProperties: false properties: iso19139: description: Geographic ISO 19139 XML metadata type: string required: - iso19139 Identification: type: object additionalProperties: false properties: sourceId: type: string description: > Unique identifier in some other system. This is because a large proportion of what is deposited in SDR, historically and currently, are representations of objects that are also represented in other systems. For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to look for the original item if you're looking at its SDR representation. example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026' catalogLinks: type: array items: $ref: '#/components/schemas/CatalogLink' MessageDigest: description: The output of the message digest algorithm. type: object additionalProperties: false properties: type: description: The algorithm that was used type: string enum: - md5 - sha1 digest: description: The digest value Base64 encoded type: string required: - type - digest Presentation: description: Presentation data for the File. type: object additionalProperties: false properties: height: description: Height in pixels type: integer width: description: Width in pixels type: integer ReleaseTag: description: A tag that indicates the item or collection should be released. type: object additionalProperties: false required: - release properties: who: description: Who did this release type: string example: petucket what: description: What is being released. This item or the whole collection. type: string enum: - self - collection example: self date: description: When did this action happen type: string format: date-time to: description: What platform is it released to type: string example: Searchworks release: type: boolean RequestAdminPolicy: description: Same as an AdminPolicy, but doesn't have an externalIdentifier as one will be created type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/admin_policy.jsonld' example: item label: type: string version: type: integer administrative: $ref: '#/components/schemas/AdminPolicyAdministrative' description: $ref: '#/components/schemas/Description' required: - administrative - label - type - version RequestCollection: description: Same as a Collection, but doesn't have an externalIdentifier as one will be created type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/collection.jsonld' - 'http://cocina.sul.stanford.edu/models/curated-collection.jsonld' - 'http://cocina.sul.stanford.edu/models/user-collection.jsonld' - 'http://cocina.sul.stanford.edu/models/exhibit.jsonld' - 'http://cocina.sul.stanford.edu/models/series.jsonld' example: item label: type: string version: type: integer access: $ref: '#/components/schemas/Access' administrative: $ref: '#/components/schemas/Administrative' description: $ref: '#/components/schemas/Description' identification: $ref: '#/components/schemas/CollectionIdentification' required: - access - administrative - label - type - version RequestDRO: description: A request to create a DRO. This has the same general structure as a DRO but doesn't have externalIdentifier and doesn't require the access subschema. If no access subschema is provided, these values will be inherited from the AdminPolicy. type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/object.jsonld' - 'http://cocina.sul.stanford.edu/models/3d.jsonld' - 'http://cocina.sul.stanford.edu/models/agreement.jsonld' - 'http://cocina.sul.stanford.edu/models/book.jsonld' - 'http://cocina.sul.stanford.edu/models/document.jsonld' - 'http://cocina.sul.stanford.edu/models/geo.jsonld' - 'http://cocina.sul.stanford.edu/models/image.jsonld' - 'http://cocina.sul.stanford.edu/models/page.jsonld' - 'http://cocina.sul.stanford.edu/models/photograph.jsonld' - 'http://cocina.sul.stanford.edu/models/manuscript.jsonld' - 'http://cocina.sul.stanford.edu/models/map.jsonld' - 'http://cocina.sul.stanford.edu/models/media.jsonld' - 'http://cocina.sul.stanford.edu/models/track.jsonld' - 'http://cocina.sul.stanford.edu/models/webarchive-binary.jsonld' - 'http://cocina.sul.stanford.edu/models/webarchive-seed.jsonld' example: item label: type: string version: type: integer access: $ref: '#/components/schemas/DROAccess' administrative: $ref: '#/components/schemas/Administrative' description: $ref: '#/components/schemas/Description' identification: $ref: '#/components/schemas/RequestIdentification' structural: $ref: '#/components/schemas/RequestDROStructural' geographic: $ref: '#/components/schemas/Geographic' required: - administrative - identification - label - type - version RequestDROStructural: description: Structural metadata type: object additionalProperties: false properties: contains: type: array items: $ref: '#/components/schemas/RequestFileSet' hasMemberOrders: type: array items: $ref: '#/components/schemas/Sequence' isMemberOf: $ref: '#/components/schemas/Druid' hasAgreement: type: string RequestFile: type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/file.jsonld' label: type: string filename: type: string size: type: integer version: type: integer hasMimeType: type: string externalIdentifier: type: string use: type: string hasMessageDigests: type: array items: $ref: '#/components/schemas/MessageDigest' access: $ref: '#/components/schemas/Access' administrative: $ref: '#/components/schemas/FileAdministrative' presentation: $ref: '#/components/schemas/Presentation' required: - label - type - version - filename - access - administrative - hasMessageDigests RequestFileSet: type: object additionalProperties: false properties: type: type: string enum: - 'http://cocina.sul.stanford.edu/models/fileset.jsonld' label: type: string version: type: integer structural: $ref: '#/components/schemas/RequestFileSetStructural' required: - label - type - version - structural RequestFileSetStructural: description: Structural metadata type: object additionalProperties: false properties: contains: type: array items: $ref: '#/components/schemas/RequestFile' RequestIdentification: description: Same as a Identification, but requires a sourceId. type: object additionalProperties: false properties: sourceId: type: string description: > Unique identifier in some other system. This is because a large proportion of what is deposited in SDR, historically and currently, are representations of objects that are also represented in other systems. For example, digitized paper and A/V collections have physical manifestations, and those physical objects are managed in systems that have their own identifiers. Similarly, books have barcodes, archival materials have collection numbers and physical locations, etc. The sourceId allows determining if an item has been deposited before and where to look for the original item if you're looking at its SDR representation. example: 'sul:PC0170_s3_Fiesta_Bowl_2012-01-02_210609_2026' catalogLinks: type: array items: $ref: '#/components/schemas/CatalogLink' required: - sourceId Sequence: description: A sequence or ordering of resources within a Collection or Object. type: object additionalProperties: false properties: members: description: "Identifiers for Members in their stated Order for the Sequence." type: array items: type: string viewingDirection: description: The direction that a sequence of canvases should be displayed to the user type: string enum: - right-to-left - left-to-right Source: description: Property model for indicating the vocabulary, authority, or other origin for a term, code, or identifier. type: object additionalProperties: false properties: code: description: Code representing the value source. type: string uri: description: URI for the value source. type: string format: uri value: description: String describing the value source. type: string