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.
- Login to the Styra DAS UI.
- Select the System to add the Data Source.
- Click the kebab icon (three dots ⋮) to the right of the System and select Add Data Source. The Add Data Source dialog box appears.
- Select JSON.
- In Path type a new or existing path separated by
/
. For example,datasourcetypes
. - In Data Source name (required) type the name for the Data Source.
- (Optional) Type in a Description.
- 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"
}'