View all methods

customData.setAll

Create or update multiple custom data records, each containing a reference and key pair along with a JSON object value.

Facts

Method POST https://yourinstance.getdx.net/api/customData.setAll

Arguments

Name Type Description
token Token Auth token passed as an HTTP header.
data Array<JSON> A list of custom data objects.

See the customData.set method for more information on custom data objects.

Usage info

Custom data APIs allow you to add arbitrary JSON data to your DX database. The records are stored in the custom_data table that is queryable alongside all of your other DX data.

For more information about the supported SQL operators and functions available for querying the JSON values please reference the PostgreSQL documentation.

Example request

Below is a typical request. Note that if any items are malformed, the entire request will be rejected.

curl -X POST https://yourinstance.getdx.net/api/customData.setAll \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer xxxx-xxxxxxxxx-xxxx' \
  -H 'Content-Type: application/json' \
  --data '{
    "data": [
      {
        "reference": "orgname/repo",
        "key": "example",
        "value": { "version": "1.2.3" },
        "timestamp": "2024-01-01T11:22:33"
      },
      {
        "reference": "orgname/other-repo",
        "key": "other-example",
        "value": { "version": "4.5.6" },
        "timestamp": "2024-01-01T11:22:33"
      }
    ]
  }'