Magidoc

Bulk Export Operations

Overview

#

Bulk export operations enable users to efficiently retrieve large volumes of data from the system. This guide outlines the process of initiating and retrieving bulk exports via GraphQL.

API Endpoint

  • Method: POST
  • Endpoint: /graphql

Request Payload

To initiate a bulk export operation, send a POST request to the GraphQL endpoint with the following mutation and variables:

    
  

The query below is invalid JSON and will not work. It is only an example of how a query might look.

    
  

Response

#

Upon successful initiation of the bulk export operation, the server responds with the following:

    
  

Steps to Run Bulk Export

#

Initiate Bulk Export

#

Send a POST request to the /graphql endpoint with the provided mutation and variables payload.

Wait for Completion

#

Monitor the status of the bulk operation. If the status is IN_PROGRESS , the operation is ongoing. Wait until it changes to COMPLETED .

Download Exported Data

#

Once the bulk operation is completed, use the URL provided in the response to download the exported data.

Exported Data Format

#

The exported data is in JSONL (JSON Lines) format, with each line representing a separate JSON object. Below is an example JSONL format:

    
  

Additional Notes

#

  • Ensure proper handling of large volumes of data during download to prevent timeouts or data corruption.
  • Authenticate requests to the /graphql endpoint to ensure security and authorization.
  • Monitor resource usage during bulk export operations to prevent performance degradation.
  • Handle errors gracefully by checking for and processing userErrors returned in the response payload.
  • By following these steps and guidelines, users can effectively run bulk export operations and retrieve the desired data from the system.