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, …

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

Create general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
client.create(
  '<resource name>',
  {
    'attribute name': '<attribute value>'
  },
  [
    {
      role: '<resource to link name>',
      id: '<resource entity id>'
    },
    {
      role: '<resource to link name>',
      id: '<resource entity id>'
    }
  ]
)
.then(function(<resource name>) {
  console.log('Success!', <resource name>);
});

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

Update general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
client.update(
  '<resource name>',
  '<your <resource name> id>',
  {
    'attribute name': '<attribute value>'
  }
)
.then(function(data) {
  console.log('Success!', data);
});

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

Delete general Signature

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

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
query
object
The id of the entity to delete
attributes
string[]
instead of returning all attributes, limit the set of attributes to the given list
where
object[]
Filter the selection, each where statement has to match
include
object[]
embed a connected object 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.

Get general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
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'
      ]
    ]
  }
)
.then(function(data) {
  console.log('Success!', data);
});

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 - Dataset relationship, there is a flagOwner property

Associate general Signature

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

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

Dissociate general Signature

index.js
Shell
Node
Java
.NET
Python
PHP
const promise = client.dissociate(
  '<resource name>',
  '<your <resource name> id>',
  {
    role: '<resource to link name>',
    id: '<resource entity id>'
  }
);
Did this page help you?
Yes No