### Attach Tag to Assets Example Source: https://apidocs.castordoc.com/index Example demonstrating how to attach a tag to assets. This involves first retrieving assets using `getTables` with specific filters, and then using `attachTags` to apply the tag. ```APIDOC ### Attach a tag to your assets (example) * Here we will try to add a `finance` tag to all tables with names containing `finance` * First, we will need to call `getTables` with `scope.nameContains` = `finance` * Then we call `attachTags` to add the `finance` tag to tables #### **Please refer this example code** ``` -------------------------------- ### Authorization Header Example Source: https://apidocs.castordoc.com/index All GraphQL queries and mutations require a valid Catalog API token. Include your token as an Authorization header on all API queries and mutations. ```APIDOC ## Authorization All GraphQL `queries` and `mutations` require a valid Catalog `API token`. Include your token as an `Authorization` header on all API `queries` and `mutations`. ```json { "Authorization": "Token " } ``` Please contact our support (Slack or catalog-support@coalesce.io) to get your `API Token`. ``` -------------------------------- ### API Authorization Header Source: https://apidocs.castordoc.com/index This snippet shows the required format for the Authorization header to authenticate GraphQL queries and mutations with the Catalog API. The API token must be included. ```json {"Authorization": "Token "} ``` -------------------------------- ### Sorting in Queries Source: https://apidocs.castordoc.com/index Catalog API getter endpoints support a sorting system composed of an array of rules. Rules are applied sequentially, similar to SQL's ORDER BY clause. ```APIDOC ## Sorting Catalog API’s getter endpoints are coming with a sorting system. It is composed of an array of rules to order the set of results you will receive. Those rules are working the same way an SQL **ORDER BY** would: rules are taken sequentially, the first one will apply and the next one will be used in case of ties. Each rules contains: * a `sortingKey` which refers to one fo the resource’s field (`id`, `name`, etc) it’s required and specific to each resources. See the endpoints to get the list of sorting keys you can use. * `direction` defining whether you want to order records in ascending (`ASC` default value) or descending order (`DESC`) * `nullsPriority` defines where you want results with null values for the `sortingKey`: either at the end: (`LAST` default value) or start (`FIRST`) ``` -------------------------------- ### Scopes in Queries Source: https://apidocs.castordoc.com/index Catalog API getter endpoints use scopes to narrow down and filter query results. Scopes are additive and can be combined to match all specified conditions. ```APIDOC ## Scopes Catalog API’s getter endpoint (graphQL queries) are using **scopes** to narrow down and filter query results. Those scopes are additive, meaning you can combine those and get results matching all scopes conditions altogether. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.