openapi: 3.2.0 info: title: Folio String Templates API version: 7.3.0 contact: name: Knowledge Integration url: https://www.k-int.com description: 'Operations tagged String Templates 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: String Templates paths: /erm/sts: description: String templates are Handlebars rules used to customise or proxy Platform Title Instance URLs (e.g. to insert an institution's proxy prefix, or swap in a locally-preferred domain). parameters: - $ref: '#/components/parameters/x-okapi-tenant' get: tags: - String Templates summary: Get a set of string templates operationId: getStringTemplates 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/StringTemplateResults' - $ref: '#/components/schemas/StringTemplateResultsArray' '400': description: Bad request error '403': description: Forbidden '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/GrailsErrorResponse' post: tags: - String Templates summary: Create a string template operationId: postStringTemplate requestBody: content: application/json: schema: $ref: '#/components/schemas/StringTemplate' required: true responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/StringTemplate' '400': description: Bad request error '403': description: Forbidden '422': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ApplicationError' '500': description: Internal server error 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 /erm/sts/{stringTemplateId}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/stringTemplateId' get: tags: - String Templates summary: Get a specified string template operationId: getStringTemplate responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/StringTemplate' '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 content: application/json: schema: $ref: '#/components/schemas/GrailsErrorResponse' put: tags: - String Templates summary: Update a string template operationId: putStringTemplate requestBody: content: application/json: schema: $ref: '#/components/schemas/StringTemplate' required: true responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/StringTemplate' '400': description: Bad request error '403': description: Forbidden '404': description: Not found error content: application/json: schema: $ref: '#/components/schemas/HttpError' '422': description: Validation error content: application/json: schema: $ref: '#/components/schemas/ApplicationError' '500': description: Internal server error content: application/json: schema: $ref: '#/components/schemas/GrailsErrorResponse' delete: tags: - String Templates summary: Delete a specified string template operationId: deleteStringTemplate responses: '204': description: No content '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 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 /erm/sts/template: get: tags: - String Templates summary: Refresh templated URLs description: 'Intended to trigger a background refresh of templated URLs for every Platform, re-running all applicable string templates. Currently a no-op: the refresh logic is disabled in the module, and this always returns an empty object.' operationId: refreshTemplatedUrls parameters: - $ref: '#/components/parameters/x-okapi-tenant' responses: '200': description: OK content: application/json: schema: type: object '400': description: Bad request error '403': description: Forbidden '500': description: Internal server error 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 /erm/sts/template/{platformId}: parameters: - $ref: '#/components/parameters/x-okapi-tenant' - $ref: '#/components/parameters/platformId' get: tags: - String Templates summary: Get the string templates applicable to a Platform description: Resolves which string templates (both `urlProxier` and `urlCustomiser` context) apply to the given Platform id, based on each template's `idScopes` allowlist/denylist. operationId: getStringTemplatesForPlatform responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/StringTemplatesForPlatform' '400': description: Bad request error '403': description: Forbidden '500': description: Internal server error 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: parameters: filters: in: query name: filters required: false schema: type: string page: in: query name: page required: false schema: type: integer sort: in: query name: sort required: false schema: type: string 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 stringTemplateId: in: path name: stringTemplateId description: UUID for a string template required: true schema: type: string format: uuid platformId: in: path name: platformId description: UUID for a Platform 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 schemas: StringTemplate: type: object required: - name - rule properties: id: type: string format: uuid readOnly: true dateCreated: type: string format: date-time readOnly: true lastUpdated: type: string format: date-time readOnly: true name: type: string rule: type: string description: A Handlebars template rendered against a binding of `inputUrl` and `platformLocalCode` to produce a customised or proxied URL. context: description: Whether this template customises the platform's URL (`urlCustomiser`) or proxies it (`urlProxier`). Defaults to `urlProxier` if not supplied. oneOf: - type: string - $ref: '#/components/schemas/Refdata' idScopes: type: array description: Scopes the template to (or, for `urlProxier` context, excludes it from) a set of resource ids -- in practice, Platform ids. items: type: string format: uuid 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 StringTemplateResultsArray: type: array items: $ref: '#/components/schemas/StringTemplate' StringTemplatesForPlatform: type: object description: String templates applicable to a given Platform, split by how they're applied when generating a templated URL. properties: urlProxiers: type: array description: Templates with context `urlProxier` applicable to this platform. items: $ref: '#/components/schemas/StringTemplate' urlCustomisers: type: array description: Templates with context `urlCustomiser` applicable to this platform. items: $ref: '#/components/schemas/StringTemplate' StringTemplateResults: type: object required: - results allOf: - $ref: '#/components/schemas/ResultsMeta' - type: object - properties: results: $ref: '#/components/schemas/StringTemplateResultsArray' Refdata: type: object properties: id: type: string label: type: string value: type: string ApplicationError: type: object properties: total: type: integer errors: type: array items: type: object properties: code: type: string i18n_code: type: string message: type: string object: type: string 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 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