This API provides endpoints to retrieve organization data, such as projects and requests. It allows you to fetch project details and export request data.
Check the generic variables needed to use the API.
Below is a summary of the available endpoints for this API:
Method |
Path |
Description |
GET |
/assistants |
Gets the list of assistants |
GET |
/projects |
Gets the list of projects |
GET |
/project/{id} |
Gets project details |
POST |
/project |
Creates a project |
PUT |
/project/{id} |
Updates a project |
DELETE |
/project/{id} |
Deletes a project |
GET |
/project/{id}/tokens |
Gets the list of Tokens for the project |
GET |
/accessControl/apitoken/validate |
Returns organization and project information. |
GET |
/request/export |
Exports request data |
Note:
Keep in mind that the
searchProfiles parameter refers to
RAG Assistants.
Gets a list of assistants.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
Name |
Type |
Description |
detail |
string |
Defines the level of detail required. The available options are summary (default) or full (optional). |
Using the default summary option will only show the first level. The full option will display revision detail and assistant composition:
{
"assistants": [
{
"assistantId": "string",
"assistantName": "string",
"intents": [ /* full option */
{
"assistantIntentDefaultRevision": "number",
"assistantIntentDescription": "string",
"assistantIntentId": "string",
"assistantIntentName": "string",
"revisions": [
{
"metadata": [
{
"key": "string",
"type": "string",
"value": "string"
},
...
],
"modelId": "string",
"modelName": "string",
"prompt": "string",
"providerName": "string",
"revisionDescription": "string",
"revisionId": "string",
"revisionName": "string",
"timestamp": "timestamp"
},
...
]
}
]
},
...
],
"projectId": "string",
"projectName": "string"
}
curl -X GET "$BASE_URL/v1/organization/assistants" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json"
# using the full detail option change the URL to
$BASE_URL/v1/organization/assistants?detail=full
Keep an eye on the returned assistantId element that is needed for other related APIs.
Gets a list of projects.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
Name |
Type |
Description |
detail |
string |
Defines the level of detail required. The available options are summary (default) or full (optional). |
name |
string |
Searches by project name (equals) (optional) |
Active projects will be listed by default. To list all projects, use the full detail option.
{
"projects": [
{
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
},
...
]
}
curl -X GET "$BASE_URL/v1/organization/projects" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "Accept: application/json"
# using the full detail option change the URL to
$BASE_URL/v1/organization/projects?detail=full
# using the name option filter change the URL to
$BASE_URL/v1/organization/projects?name=projectName
Keep an eye on the returned projectId item value that is needed for other related APIs.
Gets project {id} details.
This endpoint can be used whether the Globant Enterprise AI API token is related to the organization scope or to the project scope.
Name |
Type |
Description |
id |
string |
GUID (required) |
{
"organizationId": "string",
"organizationName": "string",
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
"searchProfiles": [
{
"name": "string",
"description": "string"
},
...
]
}
If the project has a usage limit applied, the response will include information regarding the usage limit. Otherwise, the project details are returned as follows:
{
"organizationId": "string",
"organizationName": "string",
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
"searchProfiles": [
{
"name": "string",
"description": "string"
}
],
"tokens": [
{
"description": "string",
"id": "string",
"name": "string",
"status": "string", /* Active, Blocked */
"timestamp": "timestamp"
}
],
"usageLimit": {
"hardLimit": "number", // Upper usage limit
"id": "string", // Usage limit ID
"relatedEntityName": "string", // Name of the related entity
"remainingUsage": "number", // Remaining usage
"renewalStatus": "string", // Renewal status (Renewable, NonRenewable)
"softLimit": "number", // Lower usage limit
"status": "integer", // Status (1: Active, 2: Expired, 3: Empty, 4: Cancelled)
"subscriptionType": "string", // Subscription type (Freemium, Daily, Weekly, Monthly)
"usageUnit": "string", // Usage unit (Requests, Cost)
"usedAmount": "number", // Amount used (decimal or scientific notation)
"validFrom": "timestamp", // Start date of the usage limit
"validUntil": "timestamp" // Expiration or renewal date
}
}
curl -X GET "$BASE_URL/v1/organization/project/{id}" \
-H "Authorization: Bearer $SAIA_APITOKEN" \
-H "accept: application/json"
Creates a new project.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
{
"name": "string",
"description": "string"
"administratorUserEmail": "mail@domain.com"
}
Note that the administratorUserEmail parameter can only be used if the Migration to the new Roles and Permissions Management System has been completed.
It is possible to provide only the project details, but you can also optionally include the usageLimit parameter to define usage restrictions on the project.
{
"name": "string",
"description": "string",
"administratorUserEmail": "mail@domain.com",
"usageLimit": {
"subscriptionType": "string", // Options: Freemium, Daily, Weekly, Monthly
"usageUnit": "string", // Options: Requests, Cost
"softLimit": "number", // Soft limit for usage (lower threshold)
"hardLimit": "number", // Hard limit for usage (upper threshold)
"renewalStatus": "string" // Options: Renewable, NonRenewable
}
}
The value of hardLimit must always be greater than or equal to softLimit, since both define the project usage thresholds.
As for renewalStatus, if the subscription type is Freemium, this option will always be NonRenewable, since Freemium limits are not renewed over time.
{
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
"searchProfiles": [
{
"name": "string",
"description": "string"
},
...
],
"tokens": [
{
"description": "string",
"id": "string",
"name": "string",
"status": "string", /* Active, Blocked */
"timestamp": "timestamp"
},
...
]
}
Note that token elements (default API Tokens) are only returned at Project creation time. You can retrieve them using the GET Tokens endpoint.
If the optional usageLimit parameter is included in the creation of a project, the response will include additional information about the usage limits applied:
{
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
"searchProfiles": [
{
"name": "string",
"description": "string"
}
],
"tokens": [
{
"description": "string",
"id": "string",
"name": "string",
"status": "string", /* Active, Blocked */
"timestamp": "timestamp"
}
],
"usageLimit": {
"hardLimit": "number", // Upper usage limit
"id": "string", // Usage limit ID
"relatedEntityName": "string", // Name of the related entity
"remainingUsage": "number", // Remaining usage
"renewalStatus": "string", // Renewal status (Renewable, NonRenewable)
"softLimit": "number", // Lower usage limit
"status": "integer", // Status (1: Active, 2: Expired, 3: Empty, 4: Cancelled)
"subscriptionType": "string", // Subscription type (Freemium, Daily, Weekly, Monthly)
"usageUnit": "string", // Usage unit (Requests, Cost)
"usedAmount": "number", // Amount used (decimal or scientific notation)
"validFrom": "timestamp", // Start date of the usage limit
"validUntil": "timestamp" // Expiration or renewal date
}
}
When the creation is not successful, StatusCode 400* will be shown with a collection of errors:
{
"errors": [
{
"id": "integer",
"description": "string"
},
...
]
}
curl -X POST "$BASE_URL/v1/organization/project" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "accept: application/json" \
-d '{
"name": "my Project",
"description": "My awesome project"
"administratorUserEmail": "myemail@globant.com"
}'
curl -X POST "$BASE_URL/v1/organization/project" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "accept: application/json" \
-d '{
"name": "my Project",
"description": "My awesome project"
"administratorUserEmail": "myemail@globant.com"
"usageLimit": {
"subscriptionType": "Monthly",
"usageUnit": "Requests",
"softLimit": 1,
"hardLimit": 2,
"renewalStatus": "Renewable"
}
}'
Updates a project.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
Name |
Type |
Description |
id |
string |
GUID ProjectId (required) |
{
"name": "string", /* Required */
"description": "string"
}
{
"projectActive": "boolean",
"projectDescription": "string",
"projectId": "string",
"projectName": "string",
"projectStatus": "integer", /* 0:Active, 2:Hidden */
"searchProfiles": [
{
"name": "string",
"description": "string"
},
...
]
}
When the creation is not successful, StatusCode 400* will be shown with a collection of errors.
curl -X PUT "$BASE_URL/v1/organization/project/{id}" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "accept: application/json" \
-d '{
"name":"Sample Project",
"description":"sample project description updated"
}'
Deletes a project.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
Name |
Type |
Description |
id |
string |
GUID ProjectId (required) |
StatusCode 200 is shown when successfully deleted; otherwise, 400* is displayed with a collection of errors.
curl -X DELETE "$BASE_URL/v1/organization/project/{id}" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "accept: application/json"
Gets the list of API tokens for the {id} project.
This endpoint requires a Globant Enterprise AI API token related to organization scope.
Name |
Type |
Description |
id |
string |
Project GUID (required) |
{
"tokens": [
{
"description": "string",
"id": "string",
"name": "string",
"status": "string", /* Active, Blocked */
"timestamp": "timestamp"
},
...
]
}
curl -X GET "$BASE_URL/v1/organization/project/{id}/tokens" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
-H "accept: application/json"
Returns information about the organization and project related to the apitoken provided.
This endpoint can be used whether the Globant Enterprise AI API token is related to the organization scope or to the project scope.
If the endpoint execution is successful, it will return a Status 200 OK with the organization data. In the case of a Project Apitoken, the project data will be included.
If the apitoken does not exist or is not active, the status will be 401.
{
"organizationId": "String (GUID)",
"organizationName": "String",
"projectId": "String (GUID)",
"projectName": "String",
"scope": "String" /* Options: Pia.Data.Organization, Pia.Data.Project */
}
curl -X GET "$BASE_URL/v1/accessControl/apitoken/validate" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SAIA_ORGANIZATION_APITOKEN" \
Exports request data.
This endpoint requires a Globant Enterprise AI API token related to project scope.
Name |
Type |
Description |
assistantName |
string |
Assistant name (optional) |
status |
string |
Status (optional) |
skip |
integer |
Number of entries to skip |
count |
integer |
Number of entries to retrieve |
{
"items": [
{
"assistant": "string",
"intent": "string",
"timestamp": "string",
"prompt": "string",
"output": "string",
"inputText": "string",
"status": "string"
},
...
]
}
curl -X GET "$BASE_URL/v1/organization/request/export?assistantName=example&status=succeeded" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json"