openapi: 3.2.0 info: title: Folio Instances API version: '1.0' description: 'Operations tagged instances across 5 of this provider''s published API definitions: folio-edge-inventory-openapi.json, folio-mod-consortia-keycloak-sharing-instances-openapi.json, folio-edge-inventory-openapi.yml, folio-mod-consortia-keycloak-sharing-instances-openapi.yml, folio-mod-consortia-sharing-instances-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: /inventory - url: /consortia/{consortiumId}/sharing tags: - name: Instances paths: /inventory/instances/{instanceId}: get: tags: - Instances operationId: getInstance summary: Retrieve inventory instance by id from folio mod-inventory parameters: - $ref: '#/components/parameters/x-okapi-tenant-header' - $ref: '#/components/parameters/x-okapi-token-header' - $ref: '#/components/parameters/instance-id' - $ref: '#/components/parameters/lang' responses: '200': description: 'Calls the mod-inventory GET /inventory/instance/{id} API and returns the result as-is. \ The example of response: https://github.com/folio-org/mod-inventory/blob/master/ramls/examples/instance_get.json ' content: application/json: schema: type: string '400': $ref: '#/components/responses/badRequestResponse' '404': $ref: '#/components/responses/notFoundResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' servers: - url: /inventory /inventory/instances/{instanceId}/summary: get: tags: - Instances operationId: getInstanceSummary summary: Retrieve inventory instance summary by id from folio mod-inventory-storage parameters: - $ref: '#/components/parameters/x-okapi-tenant-header' - $ref: '#/components/parameters/x-okapi-token-header' - $ref: '#/components/parameters/instance-id' responses: '200': description: 'Calls the mod-inventory-storage GET /instance-storage/instances/{id}/summary API and returns the result as-is. \ In ECS central tenant mode, summaries from tenants with holdings are merged into a single response. ' content: application/json: schema: type: string '400': $ref: '#/components/responses/badRequestResponse' '404': $ref: '#/components/responses/notFoundResponse' '500': $ref: '#/components/responses/internalServerErrorResponse' servers: - url: /inventory /instances: get: description: Sharing instances summary: Get list of sharing instances operationId: getSharingInstances parameters: - $ref: '#/components/parameters/consortiumId' - $ref: '#/components/parameters/instanceIdentifier' - $ref: '#/components/parameters/sourceTenantId' - $ref: '#/components/parameters/targetTenantId' - $ref: '#/components/parameters/status' - $ref: '#/components/parameters/trait_pageable_offset' - $ref: '#/components/parameters/trait_pageable_limit' responses: '200': $ref: '#/components/responses/SharingInstanceCollection' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' tags: - Instances post: summary: start instance sharing operationId: startSharingInstance parameters: - $ref: '#/components/parameters/consortiumId' requestBody: $ref: '#/components/requestBodies/SharingInstanceBody' responses: '201': $ref: '#/components/responses/SharingInstance' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '409': $ref: '#/components/responses/Conflict' '422': $ref: '#/components/responses/Conflict' '500': $ref: '#/components/responses/InternalServerError' tags: - Instances servers: - url: /consortia/{consortiumId}/sharing /instances/{actionId}: get: summary: Get Sharing instance by action ID operationId: getSharingInstanceById parameters: - $ref: '#/components/parameters/consortiumId' - $ref: '#/components/parameters/actionId' responses: '200': $ref: '#/components/responses/SharingInstance' '400': $ref: '#/components/responses/BadRequest' '404': $ref: '#/components/responses/NotFound' '500': $ref: '#/components/responses/InternalServerError' tags: - Instances servers: - url: /consortia/{consortiumId}/sharing components: schemas: Error: type: object properties: code: description: Error status code type: integer errorMessage: description: Error message text type: string Metadata: type: object title: Metadata description: Metadata about creation and changes to records properties: createdDate: type: string description: Date and time when the record was created createdByUserId: $ref: '#/components/schemas/uuid' description: ID of the user who created the record createdByUsername: type: string description: Username of the user who created the record (when available) createdBy: $ref: '#/components/schemas/userInfo' description: Additional information of the user who created the record (when available) updatedDate: type: string description: Date and time when the record was last updated updatedByUserId: $ref: '#/components/schemas/uuid' description: ID of the user who last updated the record updatedByUsername: type: string description: Username of the user who updated the record (when available) updatedBy: $ref: '#/components/schemas/userInfo' description: Additional information of the user who updated the record (when available) required: - createdDate SharingInstance: description: A JSON schema for the Sharing Instance type: object properties: id: type: string format: uuid instanceIdentifier: type: string format: uuid sourceTenantId: type: string targetTenantId: type: string status: type: string $ref: '#/components/schemas/Status' error: type: string metadata: type: object $ref: '#/components/schemas/Metadata' additionalProperties: false required: - instanceIdentifier - sourceTenantId - targetTenantId Parameters: description: List of key/value parameters of an error type: array items: $ref: '#/components/schemas/Parameter' additionalProperties: false Status: type: string enum: - IN_PROGRESS - COMPLETE - ERROR userInfo: type: object description: User Display Information properties: lastName: type: string readOnly: true description: Last name of the user firstName: type: string readOnly: true description: First name of the user middleName: type: string readOnly: true description: Middle name or initial of the user example: lastName: Doe firstName: John middleName: X. Error_2: description: An error type: object properties: message: type: string minLength: 1 description: Error message text type: type: string description: Error message type code: type: string description: Error message code parameters: description: Error message parameters $ref: '#/components/schemas/Parameters' additionalProperties: false required: - message Errors: description: A set of errors type: object properties: errors: description: List of errors type: array items: type: object $ref: '#/components/schemas/Error_2' total_records: description: Total number of errors type: integer additionalProperties: false SharingInstanceCollection: description: A JSON schema for the Sharing Instances Collection type: object properties: sharingInstances: type: array description: The list of sharing instances items: type: object $ref: '#/components/schemas/SharingInstance' totalRecords: type: integer additionalProperties: false required: - sharingInstances - totalRecords uuid: type: string format: uuid Parameter: description: List of key/value parameters of an error type: object properties: key: type: string minLength: 1 value: type: string additionalProperties: false required: - key Error_3: description: An error type: object properties: message: type: string minLength: 1 description: Error message text type: type: string description: Error message type code: type: string description: Error message code parameters: description: Error message parameters $ref: '#/components/schemas/Parameters' additionalProperties: false required: - message Errors_2: description: A set of errors type: object properties: errors: description: List of errors type: array items: type: object $ref: '#/components/schemas/Error_3' total_records: description: Total number of errors type: integer additionalProperties: false Error_4: description: An error type: object properties: message: type: string minLength: 1 description: Error message text type: type: string description: Error message type code: type: string description: Error message code parameters: description: Error message parameters $ref: '#/components/schemas/Parameters' additionalProperties: false required: - message Errors_3: description: A set of errors type: object properties: errors: description: List of errors type: array items: type: object $ref: '#/components/schemas/Error_4' total_records: description: Total number of errors type: integer additionalProperties: false responses: internalServerErrorResponse: description: When unhandled exception occurred during code execution, e.g. NullPointerException content: application/json: example: code: 500 errorMessage: internal error schema: $ref: '#/components/schemas/Error' notFoundResponse: description: Item with a given ID not found content: application/json: example: code: 404 errorMessage: Record by given id not found schema: $ref: '#/components/schemas/Error' badRequestResponse: description: Validation errors content: application/json: example: code: 400 errorMessage: Validation error schema: $ref: '#/components/schemas/Error' SharingInstance: description: Returns a sharing instance object object content: application/json: schema: $ref: '#/components/schemas/SharingInstance' SharingInstanceCollection: description: Returns list of sharing instances content: application/json: schema: $ref: '#/components/schemas/SharingInstanceCollection' Conflict: description: Validation errors content: application/json: schema: $ref: '#/components/schemas/Errors' InternalServerError: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error_2' BadRequest: description: Bad request content: application/json: schema: $ref: '#/components/schemas/Errors' NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Errors' InternalServerError_2: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error_3' InternalServerError_3: description: Internal server error content: application/json: schema: $ref: '#/components/schemas/Error_4' parameters: lang: name: lang in: query description: Requested language required: false example: en schema: pattern: '[a-zA-Z]{2}' default: en type: string x-okapi-token-header: name: x-okapi-token in: header description: x-okapi-token header value required: false schema: type: string instance-id: name: instanceId in: path description: Inventory Instance's UUID required: true schema: type: string pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ x-okapi-tenant-header: name: x-okapi-tenant in: header description: x-okapi-tenant header value required: false schema: type: string instanceIdentifier: in: query name: instanceIdentifier schema: $ref: '#/components/schemas/uuid' description: The UUID of the instance status: in: query name: status schema: $ref: '#/components/schemas/Status' description: The status of the sharing instance sourceTenantId: in: query name: sourceTenantId schema: type: string description: The ID of the source tenant actionId: in: path name: actionId schema: $ref: '#/components/schemas/uuid' required: true description: The ID of sharing instance targetTenantId: in: query name: targetTenantId schema: type: string description: The ID of the target tenant consortiumId: in: path name: consortiumId schema: $ref: '#/components/schemas/uuid' required: true description: The ID of consortium trait_pageable_limit: name: limit in: query description: Limit the number of elements returned in the response schema: default: 100 minimum: 0 maximum: 2147483647 type: integer trait_pageable_offset: name: offset in: query description: Skip over a number of elements by specifying an offset value for the query schema: default: 0 minimum: 0 maximum: 2147483647 type: integer requestBodies: SharingInstanceBody: description: Sharing Instance object required: true content: application/json: schema: $ref: '#/components/schemas/SharingInstance' x-refined-from: - folio-edge-inventory-openapi.json - folio-mod-consortia-keycloak-sharing-instances-openapi.json - folio-edge-inventory-openapi.yml - folio-mod-consortia-keycloak-sharing-instances-openapi.yml - folio-mod-consortia-sharing-instances-openapi.yml