GraphQL API Documentation


For the Open Archive we've created a GraphQL endpoint following the GraphQL query language specification

The endpoint for our production system is:
https://oa.sharebox.nl/graphql


General Usage

 

(Current) Limitations

 

Person Query

Query Name: persons
Returns paginated person records with optional search.

Example Query:

query {
 persons(limit: 10, page: 1, query: "vincent") {
   data {
     id
     name
     forename
     surname
   }
   total
   current_page
   last_page
 }
}

Searchable Fields:

 

Media Query

Query Name: media
Returns paginated media (reproductions/images), with search support.

Example Query:
 query {
 media(limit: 10, page: 1, query: "portrait") {
   data {
     id
     filename
     thumbnail
   }
   total
   current_page
   last_page
 }
}
 

Searchable Fields:

 

Collect Query

Query Name: collects
Returns paginated collect records with optional search and related data.

Example Query:

query {
 collects(limit: 10, page: 1, query: "pottery") {
   data {
     id
     title
     object_number
     collection {
       id
       collection
     }
     location {
       id
       location
     }
   }
   total
   current_page
   last_page
 }
}
 

Searchable Fields:

 

Available Relationships

You can include related data in your queries:

 

Testing with Postman

  1. Set method to POST
  2. Use this URL:
    https://openarchive.oudekerk.nl/graphql
  3. Add headers: Content-Type: application/json
  4. In the body (raw, JSON format), paste:

{
 "query": "query { persons(limit: 5) { data { id name } total } }"
}
 



<< back