LLM-friendly URL

Actions

The core API defines actions that can be called on the resources. The api call of a specific action is standardized which means that you access each resource in a similar way. In total, 6 types of actions are defined:

  • Create
  • Get
  • Update
  • Delete
  • Associate
  • Dissociate

Not every action is supported on every resource (e.g. you can not delete a Dataprovider). The rest of this documentation will provide information on the call signature for each action and will then go into details with concrete examples for each combination of resource and action.

Create

Create a new instance of the requested resource type, for example: create a new User within an Organization, create a new access group, create new data rows, … The SDKs optionally allow you to immediately associate the created resource with one or more other resources in the same call.

Parameter Description
resource
string
The lowercase name of the resource we want to create
properties
object
Here you provide the properties of the entity you want to create in the form of a map/object
associations
array (optional)
Optionally associate the created resource immediately with one or more existing resources. Each item has role and id.

Response format

For all resources, the full response schema (property names, types, and descriptions) is documented on each resource’s Create page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
(entity)
object The created resource entity with all attributes. Schema varies by resource; see the Create doc for each resource in the API Overview.

Create general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.create(
  '<resource name>',
  {
    'attribute_name': '<attribute value>',
    'other_attribute_name': '<other attribute value>',
  },
  [
    {
      role: '<resource name to link>',
      id: '<resource id to link>'
    },
    {
      role: '<resource name to link>',
      id: '<resource id to link>'
    }
  ]
);

console.log('Create success!', response);

Get and List

Get and List are the same call. The reason why we differentiate between a Get and a List action is that different security rules apply. A user who can get a resource can't necessarily list the same resource. Get and List have a different structure than the other calls since it allows for complex queries. A call is considered to be a get action if you fetch an entity using a specific id in the where clause, else it is considered to be a list action. The query syntax is very close to SQL, it consists of the following attributes:

Parameter Description
resource
string
The lowercase name of the resource we want to get or list
find
object
An object that specifies query options such as filters, selected attributes, associations to include, and sorting for retrieving resources.
where
object[]
Filter the selection, each where statement has to match
attributes
string[]
instead of returning all attributes, limit the set of attributes to the given list
include
object[]
include an associated resource in the results. Within an include you can again use where, include, attributes
order
array[]
Order on attributes. Either provide only an attribute and 'desc' or 'asc' to filter on a top-level attribute. or provide models in the beginning of the array if you want to target the attribute of an embedded resource.

Response format

For all resources, the full response schema (including entity fields in rows ) is documented on each resource’s Search/Get page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
count
number Number of records matching the query.
rows
object[] Array of resource entities. When querying by id, typically a single entity in rows[0]. Entity schema varies by resource; see the Search/Get doc for each resource in the API Overview.

Get general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.get(
  '<resource name>',
  {
    where: {
      'attribute_name': '<attribute value>'
    },
    include: [
      {
        model: '<resource name>'
      }
    ],
    attributes: [
      '<attribute_name>',
      '<attribute_name>'
    ],
    order: [
      [
        '<attribute_name>',
        'asc'
      ],
      [
        {
          model: '<resource name>'
        },
        '<attribute_name>',
        'asc'
      ]
    ]
  }
);

console.log('Get success!', response);

Update

Update the properties of a single specific entity, eg. update a column name or user password.

Parameter Description
resource
string
The lowercase name of the resource we want to update
id
uuid
The id of the entity to update
properties
object
Here you provide the properties of the entity you want to update in the form of a map/object. If a property is not present in the map, it will remain untouched

Response format

For all resources, the full response schema is documented on each resource’s Update page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
(entity)
object The updated resource entity with all attributes. Schema varies by resource; see the Update doc for each resource in the API Overview.

Update general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.update(
  '<resource name>',
  '<resource id>',
  {
    'attribute_name': '<attribute value>'
  }
);

console.log('Update success!', response);

Delete

Delete a resource, eg. delete a dataset or group.

Parameter Description
resource
string
The lowercase name of the resource we want to delete
id
uuid
The id of the entity to delete

Response format

For all resources, the full response schema is documented on each resource’s Delete page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
code
number HTTP status code (typically 200). See the Delete doc for each resource in the API Overview.

Delete general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.delete('<resource name>', '<resource id>');

console.log('Delete success!', response);

Associate

Associate two entities to each other, eg. link a Column to a Dataset. Associations can be set in both directions. Many associations are automatically set on creation as well, for example a dashboard is automatically associated with the user that created the dashboard. To know which resources can be associated please refer to the schema at the beginning of this chapter Schema .

Parameter Description
id
uuid
The uuid of the resource you want to associate with another resource
resource
object
An object indicating which resource type (role) and which entity (id)
role
string
the role of the to-be-associated resource which is usually the capitalized plural name of the resource e.g. 'Users', 'Organizations'
id
uuid
the id of the to-be-associated resource
properties
object
some associations can have property set on them. e.g. on a User - Securable relationship, there are properties to define which access the user has to the securable

Response format

For all resources, the full response schema is documented on each resource’s Associate page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
(entity)
object The updated resource entity with all attributes. Schema varies by resource; see the Associate doc for each resource in the API Overview.

Associate general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.associate(
  '<resource name>',
  '<resource id>',
  {
    role: '<resource name to link>',
    id: '<resource id to link>'
  },
  {
    'property name': '<property value>'
  }
);

console.log('Associate success!', response);
ℹ️

Notice that associate roles are usually capitalized and plural.

Dissociate

Remove an association between 2 entities. To know which resources can be disassociated please refer to the schema at the beginning of this chapter Schema .

Parameter Description
id
uuid
The uuid of the resource you want to dissociate with another resource
resource
object
An object indicating which resource type (role) and which entity (id)
role
string
the role of the to-be-dissociated resource which is usually the capitalized plural name of the resource e.g. 'Users', 'Organizations'
id
uuid
the id of the to-be-dissociated resource

Response format

For all resources, the full response schema is documented on each resource’s Dissociate page. See the API Overview for the list of resources and links to their action-specific documentation.

Response Type Description
(entity)
object The updated resource entity with all attributes. Schema varies by resource; see the Dissociate doc for each resource in the API Overview.

Dissociate general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const response = await client.dissociate(
  '<resource name>',
  '<resource id>',
  {
    role: '<resource name to unlink>',
    id: '<resource id to unlink>'
  }
);

console.log('Dissociate success!', response);
Did this page help you?
Yes No