Skip to main content

JSON Data Source

A JSON Data Source opens a data endpoint for writing data in JSON format.

Creating or Configuring the Data Source through the Styra DAS UI

Create or configure the Data Source through the Styra DAS UI.

  1. Login to the Styra DAS UI.
  2. Select the System to add the Data Source.
  3. Click the kebab icon (three dots ⋮) to the right of the System and select Add Data Source. The Add Data Source dialog box appears.
  4. Select JSON.
  5. In Path type a new or existing path separated by /. For example, datasourcetypes.
  6. In Data Source name (required) type the name for the Data Source.
  7. (Optional) Type in a Description.
  8. Click Add.

Configuring a JSON Data Source using curl

The following comment will open the /v1/data/json endpoint for direct writes.

curl -H 'Authorization: bearer XXX' \
-H 'Content-Type: application/json' \
-XPUT 'https://TENANT.styra.com/v1/datasources/json' -d'
{
"category": "rest"
}'

Manually send any JSON data to opened endpoint.

curl -H 'Authorization: bearer XXX' \
-H 'Content-Type: application/json' \
-XPUT 'https://TENANT.styra.com/v1/data/json' -d'
{
"foo": "bar"
}'