openapi: 3.2.0 info: title: Folio Works API version: 3.2.0 contact: name: Knowledge Integration url: https://www.k-int.com description: 'Operations tagged Works across 2 of this provider''s published API definitions: folio-mod-oa-openapi.json, folio-mod-oa-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org security: - accessToken: [] - okapiToken: [] tags: - name: Works paths: /oa/works: description: Supports search and creation of works. parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - Works summary: Get a set of work records operationId: getWorks parameters: - $ref: '#/components/parameters/filters' - $ref: '#/components/parameters/match' - $ref: '#/components/parameters/term' - $ref: '#/components/parameters/sort' - $ref: '#/components/parameters/stats' - $ref: '#/components/parameters/perPage' - $ref: '#/components/parameters/offset' - $ref: '#/components/parameters/page' responses: '200': description: OK content: application/json: schema: oneOf: - $ref: '#/components/schemas/WorkResults' - $ref: '#/components/schemas/WorkResultsArray' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '500': description: Internal server error servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org /oa/works/{id}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/workId' get: tags: - Works summary: Get a specified work record operationId: getWork responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Work' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '500': description: Internal server error put: tags: - Works summary: Update work record operationId: putWork requestBody: content: application/json: schema: $ref: '#/components/schemas/Work' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Work' '400': description: Bad request error '401': description: Unauthorized '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '422': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ValidationErrorResponse' '500': description: Internal server error servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org /oa/works/citation: description: Import or resolve a Work and its TitleInstances from bibliographic citation metadata (title, type, DOAJ/OA status, and one or more instances identified by ns/id pairs such as ISSN). Existing TitleInstances are matched by identifier where possible, rather than always creating new records. parameters: - $ref: '#/components/parameters/x-okapi-tenant' post: tags: - Works summary: Import a Work and TitleInstances from citation metadata operationId: postWorkCitation requestBody: content: application/json: schema: $ref: '#/components/schemas/WorkCitation' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Work' '400': description: Bad request error '401': description: Unauthorized '403': description: Forbidden '404': description: Not found error - returned when `instances` is empty, or when the instances provided resolve to more than one distinct Work. content: application/json: schema: $ref: '#/components/schemas/SpringBootErrorResponse' '500': description: Internal server error - also returned for malformed instance data, e.g. an instance with no `ids`/`title`, a `title` that conflicts with an existing matched TitleInstance, or identifiers that match more than one existing TitleInstance. content: application/json: schema: $ref: '#/components/schemas/GrailsErrorResponse' servers: - url: https://folio-snapshot-okapi.dev.folio.org - url: https://folio-snapshot-2-okapi.dev.folio.org - url: https://folio-etesting-snapshot-kong.ci.folio.org components: schemas: WorkCitationInstance: type: object required: - ids properties: ids: type: array minItems: 1 items: $ref: '#/components/schemas/WorkCitationIdentifier' description: Identifiers used to match this instance against an existing TitleInstance. A new TitleInstance is created if none match; if more than one matches, the request fails. title: type: string description: Overrides the citation's top-level title for this instance. If this instance matches an existing TitleInstance, its title must equal the resolved title or the request fails. type: type: string description: Overrides the citation's top-level type for this instance, e.g. `serial` or `monograph`. Also drives the derived publicationType (`serial` -> Journal, `monograph` -> Book) when publicationType is not set. subType: type: string description: Refdata value for the TitleInstance's subType category. publicationType: type: string description: Refdata value for the TitleInstance's publicationType category. Derived from `type` when not set. indexedInDOAJ: type: string description: Overrides the citation's top-level indexedInDOAJ for this instance's Work. oaStatus: type: string description: Overrides the citation's top-level oaStatus for this instance's Work. IdentifierOccurrence: type: object required: - identifier properties: id: type: string format: uuid readOnly: true description: Present when reached via /oa/publicationRequest or /oa/works; absent via /oa/titleInstances identifier: $ref: '#/components/schemas/Identifier' title: type: object readOnly: true description: Present when reached via /oa/titleInstances; absent via /oa/publicationRequest or /oa/works properties: id: type: string format: uuid status: description: Present when reached via /oa/titleInstances; absent via /oa/publicationRequest or /oa/works oneOf: - type: string - $ref: '#/components/schemas/Refdata' selected: type: boolean description: Present when reached via /oa/titleInstances; absent via /oa/publicationRequest or /oa/works GrailsErrorResponse: type: object description: Error-handler body for an uncaught exception raised during request processing. `exception` and `stackTrace` usually suppressed in production systems required: - error - timestamp - message properties: error: type: integer description: HTTP status code timestamp: type: string format: date-time message: type: string exception: type: string description: Exception class and message. stackTrace: type: array items: type: string WorkResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/WorkResultsArray' WorkCitationIdentifier: type: object required: - ns - id properties: ns: type: string description: Identifier namespace value, e.g. `issn` id: type: string description: Identifier value WorkTitleInstance: description: A more limited TitleInstance representation used for TitleInstance nested under Work.instances prop type: object required: - id - title properties: id: type: string format: uuid readOnly: true title: type: string identifiers: type: array items: $ref: '#/components/schemas/IdentifierOccurrence' publicationType: $ref: '#/components/schemas/Refdata' type: $ref: '#/components/schemas/Refdata' subType: $ref: '#/components/schemas/Refdata' ValidationErrorResponse: description: 'Validation error body returned when a create/update request fails domain-object validation. Shape depends on the number of errors: a single ValidationError when there is exactly one, otherwise a wrapper with a count and an embedded array.' oneOf: - $ref: '#/components/schemas/ValidationError' - type: object required: - total - _embedded properties: total: type: integer _embedded: type: object properties: errors: type: array items: $ref: '#/components/schemas/ValidationError' Work: type: object required: - id - title properties: id: type: string format: uuid readOnly: true title: type: string indexedInDOAJ: oneOf: - type: string - $ref: '#/components/schemas/Refdata' oaStatus: oneOf: - type: string - $ref: '#/components/schemas/Refdata' instances: type: array items: $ref: '#/components/schemas/WorkTitleInstance' Refdata: type: object required: - id properties: id: type: string readOnly: true label: type: string value: type: string SpringBootErrorResponse: type: object description: Spring Boot's default error body. Emitted by the servlet container itself when a request ends in an error status with no response body written by the application, rather than by this app's own error handling - so it does not match the `HttpError` shape used elsewhere in this API. properties: timestamp: type: integer description: Epoch milliseconds status: type: integer error: type: string path: type: string ResultsMeta: type: object properties: meta: type: object page: type: integer pageSize: type: integer total: type: integer totalPages: type: integer totalRecords: type: integer WorkCitation: type: object required: - title - instances properties: title: type: string type: type: string description: e.g. `serial` or `monograph`. Used as the default `type` for each instance in `instances` that does not set its own. indexedInDOAJ: type: string description: Refdata value for the `Global.Yes_No` category, e.g. `Yes`/`No`. Used as the default for each instance's Work that does not set its own. oaStatus: type: string description: Refdata value for the Work's oaStatus category, e.g. `Gold`/`Hybrid`. Used as the default for each instance's Work that does not set its own. instances: type: array minItems: 1 items: $ref: '#/components/schemas/WorkCitationInstance' WorkResultsArray: type: array items: $ref: '#/components/schemas/Work' ValidationError: type: object required: - message - path - _links properties: message: type: string path: type: string _links: type: object required: - self properties: self: type: object required: - href properties: href: type: string format: uri Identifier: type: object required: - value - ns properties: id: type: string format: uuid readOnly: true description: Present when reached via /oa/publicationRequest or /oa/works; absent via /oa/titleInstances value: type: string ns: type: object required: - value properties: id: type: string format: uuid readOnly: true description: Present when reached via /oa/publicationRequest or /oa/works; absent via /oa/titleInstances value: type: string parameters: filters: in: query name: filters required: false schema: type: string sort: in: query name: sort required: false schema: type: string page: in: query name: page required: false schema: type: integer perPage: in: query name: perPage required: false schema: type: integer x-okapi-tenant: in: header name: x-okapi-tenant required: true schema: type: string offset: in: query name: offset required: false schema: type: integer term: in: query name: term required: false schema: type: string workId: in: path name: id description: UUID for a work required: true schema: type: string format: uuid stats: in: query name: stats required: false schema: type: boolean match: in: query name: match required: false schema: type: string securitySchemes: okapiToken: type: apiKey in: header name: x-okapi-token accessToken: type: apiKey in: cookie name: folioAccessToken x-refined-from: - folio-mod-oa-openapi.json - folio-mod-oa-openapi.yml