openapi: 3.2.0 info: title: Folio Packages API version: 7.3.0 contact: name: Knowledge Integration url: https://www.k-int.com description: 'Operations tagged Packages across 2 of this provider''s published API definitions: folio-mod-agreements-openapi.json, folio-mod-agreements-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: Packages paths: /erm/packages: description: Supports search of packages in the Agreements local knowledgebase parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - Packages summary: Get a set of package records operationId: getPackages 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/PackageResults' - $ref: '#/components/schemas/PackageResultsArray' '400': description: Bad request error '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 /erm/packages/{packageId}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get a specified package record operationId: getPackage responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Package' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '500': description: Internal server error put: tags: - Packages summary: Update package record operationId: putPackage requestBody: content: application/json: schema: $ref: '#/components/schemas/Package' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Package' '400': description: Bad request error '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '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 /erm/packages/{packageId}/content: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get content items for a specified package operationId: getPackageContent 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/PackageContentItemResults' - $ref: '#/components/schemas/PackageContentItemResultsArray' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '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 /erm/packages/{packageId}/content/{packageSubset}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/packageId' - $ref: '#/components/parameters/packageSubset' get: tags: - Packages summary: Get content items for a specified package operationId: getPackageContentSubset 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/PackageContentItemResults' - $ref: '#/components/schemas/PackageContentItemResultsArray' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '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 /erm/packages/{packageId}/metadata: description: Supports retrieval of ingress metadata for specified package parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/packageId' get: tags: - Packages summary: Get ingress metadata for package operationId: getPackageIngressMetadata responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PackageIngressMetadata' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error -- no ingress metadata exists for the specified package content: application/json: schema: $ref: '#/components/schemas/HttpError' '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 /erm/packages/import: parameters: - $ref: '#/components/parameters/x-okapi-tenant' post: tags: - Packages summary: Import a package from the POSTed JSON which must conform to the… operationId: postPackageimport requestBody: content: application/json: schema: $ref: '#/components/schemas/ImportPackageRecords' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/ImportPackageSuccess' '400': description: Bad request error '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 /erm/packages/sources: description: Supports retrieval of a deduplicated list of distinct, non-null source values from all Pkg (Package) records parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - Packages summary: Get a list of deduplicated list of distinct, non-null source values from all… operationId: getPackageSources responses: '200': description: OK content: application/json: schema: type: array items: type: string '400': description: Bad request error '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 /erm/packages/controlSync: parameters: - $ref: '#/components/parameters/x-okapi-tenant' post: tags: - Packages summary: Change the synchronisation status of a package description: In Harvest mode, changing a harvested package from PAUSED to SYNCHRONIZING requests a background resync that queues a one-time OAI GetRecord pull. This does not reset the source cursor or wait for the hourly harvest. An unchanged status does not request another resync. The response confirms the status change; monitor /erm/jobs for resync and pull completion or errors. operationId: postPackagecontrolSync requestBody: required: true content: application/json: schema: type: object required: - syncState - packageIds properties: syncState: type: string enum: - PAUSED - SYNCHRONIZING packageIds: type: array minItems: 1 items: type: string responses: '200': description: OK content: application/json: schema: type: object properties: packagesUpdated: type: integer packagesSkipped: type: integer success: type: boolean '400': description: Bad request error '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 /erm/packages/metadata: description: Supports search and creation of package ingress metadata records parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - Packages summary: Get a set of package ingress metadata records operationId: getPackagesMetadata 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/PackageIngressMetadataResults' - $ref: '#/components/schemas/PackageIngressMetadataResultsArray' '400': description: Bad request error '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 /erm/packages/metadata/{metadataId}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/metadataId' get: tags: - Packages summary: Get a specified package ingress metadata record operationId: getPackageMetadata responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/PackageIngressMetadata' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '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 components: schemas: ImportPlatformTitleInstance: type: object description: 'Either platform or platformUrl must be provided. ' required: - titleInstance properties: platform: type: string platformUrl: type: string format: uri url: type: string format: uri titleInstance: $ref: '#/components/schemas/ImportTitleInstance' IdentifierOccurrence: type: object properties: title: type: object properties: id: type: string format: uuid identifier: $ref: '#/components/schemas/Identifier' status: $ref: '#/components/schemas/Refdata' Embargo: type: object properties: id: type: string format: uuid movingWallStart: $ref: '#/components/schemas/EmbargoStatement' movingWallEnd: $ref: '#/components/schemas/EmbargoStatement' PackageDescriptionUrl: type: object required: - id properties: id: type: string format: uuid url: type: string format: uri ImportIdentifier: type: object required: - namespace - value properties: namespace: type: string value: type: string TitleInstanceRef: description: A lightweight representation of a title instance, used where a title references another title (e.g. `TitleInstance.relatedTitles`). Unlike the full `TitleInstance` representation, fields such as `class`, `dateCreated` and `coverage` are not populated on this partial view, and it does not nest further `relatedTitles`. allOf: - $ref: '#/components/schemas/ErmResource' - properties: dateMonographPublished: type: string pattern: ^\d{4}(-((0[0-9])|(1[0-2]))(-(([0-2][0-9])|3[0-1]))?)?\$ firstAuthor: type: string firstEditor: type: string longName: type: string readOnly: true monographEdition: type: string monographVolume: type: string work: type: object properties: id: type: string format: uuid ImportPackage: type: object required: - source - reference - name - contentItems properties: source: type: string reference: type: string name: type: string description: type: string syncContentsFromSource: type: boolean trustedSourceTI: type: boolean sourceDataCreated: type: string format: date-time sourceDataUpdated: type: string format: date-time sourceTitleCount: type: integer availabilityScope: type: string lifecycleStatus: type: string packageProvider: type: object properties: name: type: string reference: type: string identifiers: type: array items: $ref: '#/components/schemas/ImportIdentifier' contentTypes: type: array items: type: object required: - contentType properties: contentType: type: string alternateResourceNames: type: array items: type: object required: - name properties: name: type: string alternateSlugs: type: array items: type: object required: - slug properties: slug: type: string availabilityConstraints: type: array items: type: object required: - body properties: body: type: string packageDescriptionUrls: type: array items: type: object required: - url properties: url: type: string format: uri contentItems: type: array minItems: 1 items: $ref: '#/components/schemas/ImportContentItem' Package: type: object required: - name - source - reference - class allOf: - $ref: '#/components/schemas/ErmResource' - properties: class: enum: - org.olf.kb.Pkg source: type: string sourceDataCreated: type: string format: date-time sourceDataUpdated: type: string format: date-time sourceTitleCount: type: integer syncContentsFromSource: type: boolean reference: type: string nominalPlatform: $ref: '#/components/schemas/Platform' vendor: $ref: '#/components/schemas/Organisation' lifecycleStatus: oneOf: - type: string - $ref: '#/components/schemas/Refdata' availabilityScope: oneOf: - type: string - $ref: '#/components/schemas/Refdata' packageDescriptionUrls: type: array items: $ref: '#/components/schemas/PackageDescriptionUrl' contentTypes: type: array items: $ref: '#/components/schemas/ContentType' availabilityConstraints: type: array items: $ref: '#/components/schemas/AvailabilityConstraint' resourceCount: type: integer AlternateResourceName: type: object required: - id - name properties: id: type: string format: uuid name: type: string ErmResource: type: object properties: id: type: string format: uuid class: type: string enum: - org.olf.kb.TitleInstance - org.olf.kb.PlatformTitleInstance - org.olf.kb.PackageContentItem - org.olf.kb.Pkg coverage: type: array items: $ref: '#/components/schemas/CoverageStatement' customCoverage: type: boolean dateCreated: type: string format: date-time lastUpdated: type: string format: date-time name: type: string normalizedName: type: string readOnly: true description: type: string publicationType: oneOf: - type: string - $ref: '#/components/schemas/Refdata' suppressFromDiscovery: type: boolean subType: oneOf: - type: string - $ref: '#/components/schemas/Refdata' tags: type: array items: $ref: '#/components/schemas/Tag' type: oneOf: - type: string - $ref: '#/components/schemas/Refdata' alternateResourceNames: type: array items: $ref: '#/components/schemas/AlternateResourceName' identifiers: type: array items: $ref: '#/components/schemas/IdentifierOccurrence' _object: description: The full, type-specific representation of this resource (fields vary depending on `class`) oneOf: - $ref: '#/components/schemas/TitleInstance' - $ref: '#/components/schemas/PlatformTitleInstance' - $ref: '#/components/schemas/PackageContentItem' - $ref: '#/components/schemas/Package' discriminator: propertyName: class mapping: org.olf.kb.TitleInstance: '#/components/schemas/TitleInstance' org.olf.kb.PlatformTitleInstance: '#/components/schemas/PlatformTitleInstance' org.olf.kb.PackageContentItem: '#/components/schemas/PackageContentItem' org.olf.kb.Pkg: '#/components/schemas/Package' PackageContentItemResultsArray: type: array items: $ref: '#/components/schemas/PackageContentItem' PackageIngressMetadataResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/PackageIngressMetadataResultsArray' PackageResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/PackageResultsArray' PackageContentItemResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/PackageContentItemResultsArray' TitleInstance: type: object required: - name - class allOf: - $ref: '#/components/schemas/ErmResource' - properties: class: enum: - org.olf.kb.TitleInstance dateMonographPublished: type: string pattern: ^\d{4}(-((0[0-9])|(1[0-2]))(-(([0-2][0-9])|3[0-1]))?)?\$ firstAuthor: type: string firstEditor: type: string identifiers: type: array items: $ref: '#/components/schemas/IdentifierOccurrence' longName: type: string readOnly: true monographEdition: type: string monographVolume: type: string work: type: object properties: id: type: string format: uuid relatedTitles: type: array readOnly: true items: $ref: '#/components/schemas/TitleInstanceRef' CoverageStatement: type: object properties: id: type: string format: uuid startDate: type: string format: date endDate: type: string format: date summary: type: string startVolume: type: string startIssue: type: string endVolume: type: string endIssue: type: string PackageContentItem: type: object required: - class allOf: - $ref: '#/components/schemas/ErmResource' - properties: class: enum: - org.olf.kb.PackageContentItem accessStart: type: string format: date accessEnd: type: string format: date addedTimestamp: type: integer depth: type: string lastSeenTimestamp: type: integer longName: type: string note: type: string removedTimestamp: type: integer embargo: $ref: '#/components/schemas/Embargo' pkg: $ref: '#/components/schemas/Package' pti: $ref: '#/components/schemas/PlatformTitleInstance' ImportPackageSuccess: type: object properties: packageId: type: string format: uuid PackageIngressMetadata: type: object required: - resource properties: id: type: string format: uuid resource: $ref: '#/components/schemas/ErmResource' ingressType: type: string enum: - PUSHKB - HARVEST - JSON_IMPORT - KBART_IMPORT ingressId: type: string ingressUrl: type: string format: uri contentIngressId: type: string contentIngressUrl: type: string format: uri dateCreated: type: integer readOnly: true lastUpdated: type: integer readOnly: true PlatformTitleInstance: type: object required: - platform - titleInstance - class allOf: - $ref: '#/components/schemas/ErmResource' - properties: class: enum: - org.olf.kb.PlatformTitleInstance longName: type: string platform: $ref: '#/components/schemas/Platform' titleInstance: $ref: '#/components/schemas/TitleInstance' url: type: string format: uri Refdata: type: object properties: id: type: string label: type: string value: type: string ImportTitleInstance: type: object properties: name: type: string type: type: string subType: type: string publicationType: type: string dateMonographPublished: type: string firstAuthor: type: string firstEditor: type: string monographEdition: type: string monographVolume: type: string identifiers: type: array items: $ref: '#/components/schemas/ImportIdentifier' PackageIngressMetadataResultsArray: type: array items: $ref: '#/components/schemas/PackageIngressMetadata' EmbargoStatement: type: object properties: unit: type: string enum: - days - months - years length: type: integer AvailabilityConstraint: type: object required: - id - body properties: id: type: string format: uuid body: oneOf: - type: string - $ref: '#/components/schemas/Refdata' ImportPackageRecords: type: object description: Envelope for importing one or more packages using the mod-agreements-package schema v2 required: - records properties: records: type: array minItems: 1 items: $ref: '#/components/schemas/ImportPackage' PackageResultsArray: type: array items: $ref: '#/components/schemas/Package' ImportContentItem: type: object required: - sourceIdentifier - sourceIdentifierNamespace - platformTitleInstance properties: sourceIdentifier: type: string sourceIdentifierNamespace: type: string note: type: string depth: type: string accessStart: type: string format: date accessEnd: type: string format: date embargo: type: string removedTimestamp: type: integer format: int64 coverage: type: array items: type: object required: - startDate properties: startDate: type: string format: date endDate: type: string format: date startVolume: type: string startIssue: type: string endVolume: type: string endIssue: type: string platformTitleInstance: $ref: '#/components/schemas/ImportPlatformTitleInstance' ContentType: type: object required: - id - contentType properties: id: type: string format: uuid contentType: oneOf: - type: string - $ref: '#/components/schemas/Refdata' Platform: type: object required: - name properties: id: type: string format: uuid name: type: string dateCreated: type: string format: date-time lastUpdated: type: string format: date-time locators: type: array items: type: object properties: domainName: type: string id: type: string format: uuid ResultsMeta: type: object properties: meta: type: object page: type: integer pageSize: type: integer total: type: integer totalPages: type: integer totalRecords: type: integer HttpError: type: object properties: message: type: string error: type: integer Tag: type: object properties: id: type: integer normValue: type: string value: type: string Identifier: type: object properties: ns: type: object properties: value: type: string value: type: string Organisation: type: object properties: id: type: string format: uuid name: type: string orgsUuid: type: string format: uuid orgsUuid_object: type: object 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 packageId: in: path name: packageId description: UUID for a Package required: true schema: type: string format: uuid 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 metadataId: in: path name: metadataId description: UUID for a PackageIngressMetadata record required: true schema: type: string format: uuid stats: in: query name: stats required: false schema: type: boolean packageSubset: in: path name: packageSubset required: true schema: type: string enum: - current - dropped - future - all 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-agreements-openapi.json - folio-mod-agreements-openapi.yml