This section details the endpoints used to list and update search properties in a tree structure.
Note : If you are unfamiliar with these functions, please refer to our article on managing search properties.
Retrieve the list of searchable properties in a tree structure
Description
This query returns a list of all searchable properties present in the tree structure.
Get /v2/data-structures/{data_structure_id}/searchable-properties
Scope
To make this request, you need the metadata:read scope.
Parameters
data_structure_id (string, required): ID of the tree. This ID can be retrieved via the
GET v2/data-structures
request or from the response when creating a new tree withPOST v2/data-structures
.
This parameter must be added to the URL to construct the query string :
/v2/data-structures/{data_structure_id}/searchable-properties
Request example
# Command to list searchable properties in a tree structure
curl -X 'GET' \
'https://xxx.indaba.api.indasuite.io-base.com/v2/data-structures/67337415-6bcb-4c21-b0f5-8253d68b6e80/searchable-properties' \
# ----- Headers -----
-H 'accept: application/json' \
-H 'Authorization: Bearer VOTRE_JETON_JWT'
Responses
example of a valid response (200 OK) :
{
"data": [
{
"typeId": "0b3f2349-9b17-45d9-b7c4-0b47d0f39960",
"property": {
"name": "Name",
"format": "Text"
},
"displayName": "Name",
"isTypeMetric": true,
"searchableType": "Custom"
},
{
"typeId": "0b3f2349-9b17-45d9-b7c4-0b47d0f39960",
"property": {
"name": "Datasource",
"format": "Text"
},
"displayName": "Datasource",
"isTypeMetric": true,
"searchableType": "Custom"
},
{
"typeId": "0b3f2349-9b17-45d9-b7c4-0b47d0f39960",
"property": {
"name": "Description",
"format": "Text"
},
"displayName": "Description",
"isTypeMetric": true,
"searchableType": "Custom"
},
{
"typeId": "0b3f2349-9b17-45d9-b7c4-0b47d0f39960",
"property": {
"name": "Unit",
"format": "Text"
},
"displayName": "Unit",
"isTypeMetric": true,
"searchableType": "Custom"
}
],
"resultCode": 2010,
"message": "OK"
}
Common errors
Please refer to the list of common errors.
Update searchable properties
Description
This query allows you to modify the search properties associated with your functional tree types.
Put /v2/data-structures/{data_structure_id}/searchable-properties
Scope
To make this request, you need the metadata:admin scope.
Parameters
data_structure_id (string, required): ID of the tree. This ID can be retrieved via the
GET v2/data-structures
request or from the response when creating a new tree withPOST v2/data-structures
.
This parameter must be added to the URL to construct the query string :
/v2/data-structures/{data_structure_id}/searchable-properties
Request body
The following parameters must be included in the request body :
type_id (string, required): ID assigned to the element type.
This ID can be retrieved via the GET request /v2/data-structures/{data_structure_id}/types or following the creation of a new type with Post v2/data-structures/{data_structure_id}/types.
displayName : display name of the property
searchableType : search property associated with type
For instance :
[
{
"typeId": "e9910c2b-83e9-4954-a1dd-abca2d833999",
"displayName": "Documentation - id",
"searchableType": "Id"
}
]
Request example
Here is a query with several search properties :
# Command to update searchable properties
curl -X 'PUT' \
'https://xxx.indaba.api.indasuite.io-base.com/v2/data-structures/67337415-6bcb-4c21-b0f5-8253d68b6e80/searchable-properties' \
# ----- Headers -----
-H 'accept: application/json' \
-H 'Authorization: Bearer VOTRE_JETON_JWT' \
-H 'Content-Type: application/json' \
# ----- Request body -----
-d '
[
{
"typeId": "e9910c2b-83e9-4954-a1dd-abca2d833999",
"displayName": "Documentation - Id",
"searchableType": "Id"
},
{
"typeId": "e9910c2b-83e9-4954-a1dd-abca2d833999",
"displayName": "exemple2 - Label",
"searchableType": "Label"
}
]
'
Responses
Example of a valid response (200 ok) :
{
"data": [
{
"typeId": "e9910c2b-83e9-4954-a1dd-abca2d833999",
"displayName": "Documentation - Id",
"isTypeMetric": false,
"searchableType": "Id"
},
{
"typeId": "e9910c2b-83e9-4954-a1dd-abca2d833999",
"displayName": "exemple2 - Label",
"isTypeMetric": false,
"searchableType": "Label"
}
],
"resultCode": 2010,
"message": "OK"
}
Common errors
Please refer to the list of common errors.
Common Errors
You will primarily encounter the following HTTP error codes:
400 Bad Request: Your request is malformed. This may be due to a missing parameter, an incorrect data type, or invalid JSON. The response body will contain an
errors
array detailing the problem.
{
"errors": [
{
"error": "Type_De_L_Erreur",
"message": "Description détaillée de l'erreur spécifique."
}
],
"statusCode": 1050,
"message": "Invalid request"
}
401 Unauthorized: Your authentication token (JWT) is missing, invalid, or expired. You must obtain a new valid token.
403 Forbidden: Your authentication token is valid, but you do not have the necessary rights for this action. This can happen for two reasons:
Your token does not have the required scope (e.g., you are trying to write data without the metrics:write scope).
Your token has the correct scope, but your user (or service account) is not linked to an authorization that grants access to the requested metric.
404 Not Found: The resource you are trying to reach does not exist. This typically occurs if you are using an incorrect ID or requesting a metric that does not exist.