FQM APIs in ECS

FQM APIs in ECS

The details on this page are based on the Ramsons & Sunflower releases.

POST /query - asynchronous

https://s3.amazonaws.com/foliodocs/api/folio-query-tool-metadata/s/queryTool.html#tag/fqlQuery/operation/runFqlQueryAsync Best suited for external integrations, large queries/datasets

Pros:

  • Cross-tenant queries are supported (via composite entity types)

  • Designed to easily page through results

  • Code is well maintained and up-to-date

Cons:

  • Requires calls to multiple endpoints

  • Affected by FQM timeout - QUERY_RETENTION_DURATION determines how long the query will be available after initially posting it

Known issues:

  • none

GET /query synchronous:

https://s3.amazonaws.com/foliodocs/api/folio-query-tool-metadata/s/queryTool.html#tag/fqlQuery/operation/runFqlQuery Best suited for quick testing, or when a limited dataset is used

Pros:

  • Easy to quickly test queries

  • Not affected by FQM timeout

Cons:

  • Not good at paging/sorting results

  • Hasn’t been maintained

Known issues:

Records returned in ECS by request type / tenant header

request type(s)

x-okapi-tenant

entity name

returns records from

request type(s)

x-okapi-tenant

entity name

returns records from

1

Asynchronous

Central

Instance (composite),
Holdings (composite),
Items (composite)

Cross-tenant (Central AND any other affiliation(s) based permissions of the user and query parameters)

2

Synchronous

Central

Instance (composite),
Holdings (composite),
Items (composite)

ERROR (currently broken)

3

Asynchronous,
Synchronous

Central

Instance (simple),
Holdings (simple),
Items (simple)

Central only

4

Asynchronous

Member

Instance (composite)

Shared instances from Central + from active affiliation

5

Synchronous

Member

Instances (composite)

ERROR (currently broken)

6

Asynchronous,
Synchronous

Member

Holdings (composite),
Items (composite)

Active affiliation

7

Asynchronous,
Synchronous

Member

Instances (simple),
Holdings (simple),
Items (simple)

Active affiliation

Quick reference entity names / IDs / field names

Entity name

Entity ID

Field names

Entity name

Entity ID

Field names

Instances (simple)

8fc4a9d2-7ccf-4233-afb8-796911839862

updated_at, created_at, jsonb

Holdings (simple)

30a5cfad-1868-4f46-86b9-a6ef67e2d9bf

updated_at, created_at, jsonb

Items (simple)

372e025a-9444-473a-9ffd-fa0f63db1674

updated_date, created_date, jsonb

Instances (composite)

6b08439b-4f8e-4468-8046-ea620f5cfb74

instance.updated_at, instance.created_at, instance.jsonb note: the jsonb isn’t available in Ramsons from this entity type

Holdings (composite)

8418e512-feac-4a6a-a56d-9006aab31e33

holdings.updated_at, holdings.created_at, holdings.jsonb

Items (composite)

d0213d22-32cf-490f-9196-d81c3c66e53f

items.updated_date, items.created_date, items.jsonb