Querying DSEs

This page shows some examples on how to use the dScribe API to query dses.

Get DSEs

List existing dses

get

Get a (paginated) list of the dses you have documented in dScribe

Authorizations
Query parameters
pageinteger · int32 · min: 1Optional

Page from which to start returning results

Default: 1
pageSizeinteger · int32Optional

Number of results to return

Default: 15
Responses
200
Successful operation
application/json
get
GET /api/dses HTTP/1.1
Host: __tenant__.dscribedata.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "metadata": {
    "page": 1,
    "pageSize": 1,
    "total": 1,
    "last_page": 1
  },
  "results": [
    {
      "id": "text",
      "name": "text",
      "parent": "text",
      "key_constraint": "text",
      "is_leaf": true,
      "assets": [
        "text"
      ],
      "dataset_id": "text",
      "description": "text"
    }
  ]
}

This endpoint will list your available dses. The query is paginated to the first 15 items. You can use the page and pageSize params to adjust this to your needs.

const url = "https://{your_tenant}.dscribedata.com/api/dses";
const authToken = "yholmghj8§hbfg...";

fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${authToken}`,
    "Content-Type": "application/json",
  },
});

The response will look something like this.

{
  "metadata": {
    "page": 1,
    "pageSize": 20,
    "total": 3,
    "last_page": 1
  },
  "results": [
    {
      "id": "4030b7de-104f-4547-8d90-030def80c1cf",
      "name": "dse",
      "parent": "123",
      "dataset_id": "42d5b4ca-7c57-4af7-bb4b-ba6f3d35ecd0",
      "description": null,
      "is_leaf": false,
      "assets": ["123"],
      "key_constraint": "primary"
    },
    {
      "id": "2cec0d80-7477-400c-9297-ae69759cacd7",
      "name": "test123",
      "parent": "123",
      "dataset_id": "27c87108-303a-4d29-815f-ab450190aa62",
      "description": null,
      "is_leaf": false,
      "assets": ["123"],
      "key_constraint": "secondary"
    },
    {
      "id": "bf99b67e-2fdf-4823-82f7-6f518d142f7a-999340451",
      "name": "Extract",
      "parent": "123",
      "dataset_id": "27c87108-303a-4d29-815f-ab450190aa62",
      "description": null,
      "is_leaf": false,
      "assets": ["123"],
      "key_constraint": null
    }
  ]
}

Search DSEs

Search through existing dses

post

Get a (paginated) list of the dses you have documented in dScribe based on the defined filters

Authorizations
Query parameters
pageinteger · int32 · min: 1Optional

Page from which to start returning results

Default: 1
pageSizeinteger · int32Optional

Number of results to return

Default: 15
Body
Responses
200
Successful operation
application/json
post
POST /api/dses/search HTTP/1.1
Host: __tenant__.dscribedata.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 70

{
  "where": {
    "name_contains": "text",
    "parent": "text",
    "dataset_id": "text"
  }
}
{
  "metadata": {
    "page": 1,
    "pageSize": 1,
    "total": 1,
    "last_page": 1
  },
  "results": [
    {
      "id": "text",
      "name": "text",
      "parent": "text",
      "key_constraint": "text",
      "is_leaf": true,
      "assets": [
        "text"
      ],
      "dataset_id": "text",
      "description": "text"
    }
  ]
}

If you want a bit more control on the dses that are returned, you can use the search endpoint. You can search on dataset_id (so the asset the dse is linked too), the parent DSE or the name.

const url = "https://{your_tenant}.dscribedata.com/api/dses/search";
const authToken = "yholmghj8§hbfg...";

fetch(url, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${authToken}`,
    "Content-Type": "application/json",
  },
  data: JSON.stringify({
    where: {
      name_contains: "finance",
      dataset_id: ["42d5b4ca-7c57-4af7-bb4b-ba6f3d35ecd0"],
      parent: ["123"],
    },
  }),
});

Find one DSE

Find one specific dse

get

Get a dse based on the passed id

Authorizations
Path parameters
idstringRequired
Responses
200
Successful operation
application/json
get
GET /api/dses/{id} HTTP/1.1
Host: __tenant__.dscribedata.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "id": "text",
  "name": "text",
  "parent": "text",
  "key_constraint": "text",
  "is_leaf": true,
  "assets": [
    "text"
  ],
  "dataset_id": "text",
  "description": "text"
}

For some integrations it might be useful to only fetch one asset.

const url = "https://{your_tenant}.dscribedata.com/api/dses/:id";
const authToken = "yholmghj8§hbfg...";

fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${authToken}`,
    "Content-Type": "application/json",
  },
});

Give a response like so:

{
  "id": "4030b7de-104f-4547-8d90-030def80c1cf",
  "name": "dse",
  "parent": "123",
  "dataset_id": "42d5b4ca-7c57-4af7-bb4b-ba6f3d35ecd0",
  "description": null,
  "is_leaf": false,
  "assets": ["123"],
  "key_constraint": "primary"
}

Last updated