Export Data API - Bulk

Modified on Wed, 21 Jan at 10:36 PM

Exporting in bulk is done through the export endpoint. This API allows users to page through data 500 (variable pageSize) items at a time.


There are two options to export your data:

  1. Export as JSON
  2. Create Download link. Used for larger datasets, provides a link to download the same JSON as option 1


Option 1: Export as JSON


Requests are made to:

https://api.schemaapp.com/export/{account}/[{subAccount}]?[page={pageNumber}]&pageSize={[1...1000]}&includeSubAccounts=[True|False]


Headers: 

x-api-key: <Api key value>

You can find your API key under the Drupal integration information in Schema App.

Note: [Bold] values are variable, variables in square ([]) brackets are optional


Returned content is application/json with each of the member items being a dictionary with the accountID and base64 encoded url and the JSON-LD for that page. The view object allows paging through the results. Next and previous are optional and will not appear if they would otherwise be duplicated by first or last. The items in view represent the number of items retrieved in this request up to a maximum of 500. 


API Parameter Defaults:

  • page - default is 1

  • pageSize - default is 500

  • includeSubAccounts - default is False (aka 0)

 


Here is an example of the expected output. {SCHEMA_DATA} will be replaced with your schema markup.


{
  "@context":{ "@vocab": "http:\/\/www.w3.org\/ns\/hydra\/core#",
                         "schemamodel": "http://schemaapp.com/ontology/schemamodel#"
},
  "@id": "http:\/\/api.schemaapp.com\/export\/[ACCOUNT_ID]?page=36",
  "@type": "Collection",
  "totalItems": 27015,
  "member": [
    {
      "[PAGE_URI]": {
       "schemamodel:etag" : "6629df86709419f514b26c32a7160b45"
       "schemamodel:source" : "Editor"
       "aws:lastUpdated" : "2023-09-26 20:03:37.229914"
      "@graph":
        {SCHEMA_DATA}
      }
    },
  ],
  "view": {
    "@id": "http:\/\/api.schemaapp.com\/export\/[ACCOUNT_ID]?page=36",
    "@type": "PartialCollectionView",
    "first": "\/export\/[ACCOUNT_ID]?page=1",
    "last": "\/export\/[ACCOUNT_ID]?page=55",
    "previous": "\/export\/[ACCOUNT_ID]?page=35",
    "next": "\/export\/[ACCOUNT_ID]?page=37",
    "items": 500
  }
}


Option 2: Create Download Link


Requests are made to:

https://api.schemaapp.com/export/__download/{account}/[{subAccount}]?[page={pageNumber}]&pageSize={[1...1000]}&includeSubAccounts=[True|False]

The headers and API parameters are the same as Option 1.

Returned content is application/json containing a download link to a JSON file containing the contents seen in Option 1.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article