Skip to main content

Testing Your Integration

You can test both APIs interactively using Bruno (https://www.usebruno.com), an open-source API client that makes API calls without requiring you to write code. Hyland supplies ready-made collections for the Data Curation API and the Context API. For information on installing Bruno and running collections, see the Bruno documentation.


Prerequisites

  • Bruno installed on your workstation.
  • A valid client_id and client_secret. For more information, see Authentication.

Data Curation API

Download the file needed to run the collection:

FileDescription
CIN-data-curation-bruno-collection.jsonBruno collection

Step 1: Import the Data Curation collection

Import CIN-data-curation-bruno-collection.json into Bruno. The collection is displayed in the Bruno sidebar.


Step 2: Select the Data Curation environment

Select the Production environment.


Step 3: Authenticate to the Data Curation API

To request an access token:

  1. Open the Get Access Token request (POST) in the Authentication folder.
  2. Select the Body tab.
  3. Enter your credentials in the client_id and client_secret fields.
  4. Send the request. The response is 200 OK.

The access token is stored automatically in the token environment variable. You do not need to copy it manually.


Step 4: Generate presigned URLs

To generate the presigned URLs for the job:

  1. Open the Generate Pre-sign URLs request (POST) in the Initiate Pipeline folder.
  2. In the Body tab, specify the files you want to process.
  3. Send the request. The response is 200 OK and contains presigned URLs for upload and download, which are stored automatically as environment variables.

Step 5: Upload the file to the Data Curation API

To upload the file:

  1. Open the Upload File For Processing request (PUT) in the S3 Operations folder.
  2. In the Body tab, select the file you want to upload.
  3. Send the request. The response is 200 OK.

Step 6: Check job status

To check the status of the most recent job, send the Most Recent Job - Get Status request (GET) in the Status Check folder. To check a specific job, send the Get Status For Job request and provide the jobId.

The response is 200 OK and contains the current job status in the body.


Step 7: Download the output

After the job status indicates that processing is complete, send the Download Processed Output request (GET) in the S3 Operations folder.

The response is 200 OK and contains the processed output in the body.


Context API

Download the files needed to run the collection:

FileDescription
CIN.zipBruno collection
invoice_example.pngSample image file for testing

Step 1: Import the Context API collection

Import CIN.zip into Bruno. The CIN collection is displayed in the Bruno sidebar.


Step 2: Select the Context API environment

Select either the CIN - production or the CIN - production eu environment.


Step 3: Check API health

Send the HealthCheck request (GET). The response is 200 OK with the body "Healthy".


Step 4: Authenticate to the Context API

To request an access token:

  1. Open the Get Access Token request (POST) in the Authentication folder.
  2. Select the Body tab.
  3. Enter your credentials in the client_id and client_secret fields.
  4. Send the Authorize request. The response is 200 OK.

The access token is stored automatically in the access_token environment variable. You do not need to copy it manually.


Step 5: Check available actions

Send the Retrieve available actions request (GET /content/process/actions) in the Actions folder. A 200 OK response confirms that authorization is working and returns the list of actions available on your subscription.

To use the v2 format, which returns action objects with schemas, include the ?version=context.api/v2 query parameter in the request.


Step 6: Generate a presigned URL for upload

To generate a presigned URL:

  1. Open the PresignedUrl request (GET /files/upload/presigned-url).
  2. In the Params tab, set the contentType query parameter to the MIME type of the file you want to upload. For the list of supported file types, see Limits and constraints.
  3. Send the request. The response is 200 OK and contains two values you need in the following steps:
    • presignedUrl, which you need in Step 7. It is stored automatically in the presignedUrl environment variable.
    • objectKey, which you need when you trigger content processing. It is stored automatically in the objectKey environment variable.

You do not need to copy either value manually.


Step 7: Upload the file to the Context API

You can use the sample file invoice_example.png to test the upload.

To upload the file:

  1. Open the Upload file request (PUT).
  2. In the Body tab, select your file.
  3. Send the request. The response is 200 OK.

Step 8: Submit a processing request

To submit a processing request:

  1. Open the Content processing request (POST /content/process) in the Processing folder.
  2. In the Body tab, modify the sample request body. The key field is objectKeys, which is set automatically from Step 6. You can replace it with any valid objectKey. You can also modify the actions object to select a different action.
  3. Send the request. The response is 200 OK and contains a processingId, which is stored automatically in the result_id environment variable.

For details on each action and its parameters, see Actions Reference.


Step 9: Poll for results

Send the Retrieve result by ID request (GET /content/process/{id}/results) in the Processing folder. The processingId from Step 8 is included in the URL automatically. You can also provide any valid processingId manually.

The endpoint returns one of the following responses:

  • 202 Accepted. Processing is in progress. The response body includes "inProgress": true and "status": "PROCESSING".
  • 200 OK. Processing is complete. The response body includes "inProgress": false and the processing result.
  • 404 Not Found. The specified processingId does not exist.
  • 400 Bad Request. Processing failed with one or more validation errors.

Next steps