This API provides an organized structure for creating and managing the dataset used in the performance evaluation of your AI Assistants. It allows you to define inputs and expected values, and facilitates the ongoing management of the dataset, including adding, deleting and modifying data. These features contribute to the development of more accurate and reliable AI Assistants by making it easier to identify areas for improvement, make adjustments, and track progress.
The following endpoints require a Globant Enterprise AI API token related to project scope.
Check the generic variables needed to use the API.
Method |
Path |
Description |
GET |
/dataSetApi/dataSets |
Lists all datasets. |
POST |
/dataSetApi/dataSet |
Creates a new dataset. |
POST |
/dataSetApi/dataSet/FileUpload |
Uploads one complete dataset via file upload. |
GET |
/dataSetApi/dataSet/{dataSetId} |
Retrieves a specific dataset. |
PUT |
/dataSetApi/dataSet/{dataSetId} |
Updates an existing dataset. |
DELETE |
/dataSetApi/dataSet/{dataSetId} |
Deletes a dataset. |
POST |
/dataSetApi/dataSet/{dataSetId}/dataSetRow |
Creates a new row in a dataset. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRows |
Lists rows for a dataset. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId} |
Retrieves a specific dataset row. |
PUT |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId} |
Updates a dataset row. |
DELETE |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId} |
Deletes a dataset row. |
POST |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource |
Creates a new expected source for a dataset row. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSources |
Lists expected sources for a dataset row. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId} |
Retrieves a specific expected source. |
PUT |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId} |
Updates an expected source. |
DELETE |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId} |
Deletes an expected source. |
POST |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable |
Creates a new filter variable for a dataset row. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariables |
Lists filter variables for a dataset row. |
GET |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId} |
Retrieves a specific filter variable. |
PUT |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId} |
Updates a filter variable. |
DELETE |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId} |
Deletes a filter variable. |
POST |
/dataSetApi/dataSet/{dataSetId}/dataSetRow/FileUpload |
Uploads multiple dataset rows via file upload. |
- 200 OK: The dataset was created successfully. The response body contains the dataset information (see example below).
- 202 Accepted: The dataset upload request was accepted, but processing is still underway. The response body might contain a job ID or other information to track the progress of the upload.
- 400 Bad Request: The request was malformed or contained invalid data (e.g., missing required fields, invalid JSON in the uploaded file).
- 401 Unauthorized: The request lacked valid authentication.
- 404 Not Found: The dataset specified by {dataSetId} does not exist (for endpoints that require a dataset ID).
- 409 Conflict: A dataset with the same name already exists.
- 500 Internal Server Error: An unexpected error occurred on the server.
Retrieves a list of all datasets available in the system.
- Method: GET
- Path: /dataSetApi/dataSets
- Request Body: Empty
The response is a JSON array. The array may be empty ([]) if no datasets exist. Otherwise, it contains one or more Dataset objects. Each Dataset object has the following structure:
[
{
"dataSetActive": boolean,
"dataSetCreateDate": "string (date-time)",
"dataSetDescription": "string",
"dataSetId": "string (UUID)",
"dataSetName": "string",
"dataSetType": "string",
"dataSetUpdateDate": "string (date-time)",
"rows": [
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources":[ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
// ... more DatasetRow objects ...
]
},
// ... more Dataset objects ...
]
DatasetRow Object: (Nested within the rows array of each Dataset object)
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
DatasetRowExpectedSource Object: (Nested within expectedSources array)
{
"dataSetExpectedSourceId": "string (UUID)",
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string"
}
DatasetRowFilterVariable Object: (Nested within filterVariables array)
{
"dataSetMetadataType": "string",
"dataSetRowFilterKey": "string",
"dataSetRowFilterOperator": "string",
"dataSetRowFilterValue": "string",
"dataSetRowFilterVarId": "string (UUID)"
}
curl -X GET "$BASE_URL/dataSetApi/dataSets" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json"
Creates a new dataset.
- Method: POST
- Path: /dataSetApi/dataSets
{
"dataSetName": "string",
"dataSetDescription": "string",
"dataSetType": "string", //e.g., "T" for test, "E" for evaluation, etc.
"dataSetActive": boolean,
"rows": [
{
"dataSetRowExpectedAnswer": "string",
"dataSetRowContextDocument": "string",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects (optional) */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects (optional) */ ]
}
// ... more DatasetRow objects as needed ...
]
}
The response includes the newly created dataset information, including a generated dataSetId.
{
"dataSetActive": boolean,
"dataSetCreateDate": "string (date-time)",
"dataSetDescription": "string",
"dataSetId": "string (UUID)",
"dataSetName": "string",
"dataSetType": "string",
"dataSetUpdateDate": "string (date-time)",
"rows": [
{
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string"
}
// ... more DatasetRow objects as needed ...
]
}
curl -X POST "$BASE_URL/dataSetApi/dataSet" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"dataSetName": "MyNewDataset",
"dataSetDescription": "A dataset for testing",
"dataSetType": "T",
"dataSetActive": true,
"rows": [
{
"dataSetRowExpectedAnswer": "This is the expected answer",
"dataSetRowInput": "What is the capital of France?",
"dataSetRowContextDocument": ""
}
]
}'
Creates a new dataset from a JSON file. The file must contain the complete dataset structure, including header information and rows.
This method is more efficient for larger datasets than creating rows individually.
- Method: POST
- Path: /dataSetApi/dataSet/FileUpload
A form containing a single file part. This file must contain a valid JSON object with the dataset's metadata and rows. The JSON structure should match the example below.
{
"dataSetName": "string" (Required),
"dataSetDescription": "string" (Optional),
"dataSetType": "string" (Optional),
"dataSetActive": boolean (Optional, defaults to true),
"rows": [
{
"dataSetRowInput": "string" (Required),
"dataSetRowExpectedAnswer": "string" (Required),
"dataSetRowContextDocument": "string" (Optional),
"expectedSources": [ /* array of DatasetRowExpectedSource objects (Optional) */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects (Optional) */ ]
}
// ... more DatasetRow objects ...
]
}
The response is identical to the response from the POST/dataSetApi/dataSet endpoint.
{
"dataSetActive": boolean,
"dataSetCreateDate": "string (date-time)",
"dataSetDescription": "string",
"dataSetId": "string (UUID)",
"dataSetName": "string",
"dataSetType": "string",
"dataSetUpdateDate": "string (date-time)",
"rows": [
{
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"dataSetRowContextDocument": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
// ... more DatasetRow objects ...
]
}
curl -X POST "$BASE_URL/dataSet/FileUpload" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json" \
-F "file=@dataset.json"
Retrieves a specific dataset by its Id. {dataSetId} is a UUID representing the dataset to retrieve.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}
- Request Body: Empty
The response is a JSON object representing the requested dataset. If the dataset is not found, a 404 error will be returned.
{
"dataSetActive": boolean,
"dataSetCreateDate": "string (date-time)",
"dataSetDescription": "string",
"dataSetId": "string (UUID)",
"dataSetName": "string",
"dataSetType": "string",
"dataSetUpdateDate": "string (date-time)",
"rows": [
{
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"dataSetRowContextDocument": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
]
}
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json"
Updates an existing dataset. {dataSetId} is a UUID representing the dataset to update.
- Method: PUT
- Path: /dataSetApi/dataSet/{dataSetId}
The request body should contain the updated dataset information. All fields are optional; only the fields you want to modify need to be included.
{
"dataSetName": "string", //New name (optional)
"dataSetDescription": "string", //New description (optional)
"dataSetType": "string", //New type (optional)
"dataSetActive": boolean, //New active status (optional)
"rows": [ /* array of DatasetRow objects (optional, can add, modify, or delete rows) */ ]
}
A successful update returns the updated dataset information.
{
"dataSetActive": boolean,
"dataSetCreateDate": "string (date-time)",
"dataSetDescription": "string",
"dataSetId": "string (UUID)",
"dataSetName": "string",
"dataSetType": "string",
"dataSetUpdateDate": "string (date-time)",
"rows": [ /* array of DatasetRow objects */ ]
}
curl -X PUT "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"dataSetDescription": "Updated dataset description",
"dataSetActive": false
}'
Deletes a dataset. {dataSetId} is a UUID representing the dataset to delete.
- Method: DELETE
- Path: /dataSetApi/dataSet/{dataSetId}
- Request Body: Empty
A successful deletion typically returns a success message or an empty response body. The exact response might vary depending on the API implementation. For example:
{
"message": "Dataset deleted successfully"
}
curl -X DELETE "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Creates a new row within the specified dataset. {dataSetId} is a UUID representing the target dataset.
- Method: POST
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow
{
"dataSetRowInput": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowContextDocument": "string", //Optional
"expectedSources": [ /* array of DatasetRowExpectedSource objects (optional) */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects (optional) */ ]
}
The response contains the newly created DatasetRow information, including a generated dataSetRowId.
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
curl -X POST "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
-d '{
"dataSetRowInput": "This is a new input",
"dataSetRowExpectedAnswer": "This is the expected output",
"dataSetRowContextDocument": "Some context"
}'
Lists all rows for a given dataset. {dataSetId} is a UUID representing the dataset.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRows
- Request Body: Empty
The response is a JSON array containing zero or more DatasetRow objects. Each object has the following structure:
[
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
},
// ... more DatasetRow objects ...
]
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRows"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Retrieves a specific row from a dataset. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}
- Request Body: Empty
A successful request returns a JSON object representing the specified dataset row:
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Updates a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: PUT
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}
The request body contains the updated data for the row. All fields are optional; only the fields you wish to modify need to be included.
{
"dataSetRowInput": "string", //New input (optional)
"dataSetRowExpectedAnswer": "string", //New expected answer (optional)
"dataSetRowContextDocument": "string",//New context document (optional)
"expectedSources": [ /* array of DatasetRowExpectedSource objects (optional) */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects (optional) */ ]
}
The response contains the updated DatasetRow information.
{
"dataSetRowContextDocument": "string",
"dataSetRowExpectedAnswer": "string",
"dataSetRowId": "string (UUID)",
"dataSetRowInput": "string",
"expectedSources": [ /* array of DatasetRowExpectedSource objects */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects */ ]
}
curl -X PUT "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
-d '{
"dataSetRowExpectedAnswer": "Corrected expected answer"
}'
Deletes a dataset row. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: DELETE
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}
- Request Body: Empty
A successful deletion typically returns a success message or an empty response body. The exact response might vary depending on the API implementation. For example:
{
"message": "Dataset row deleted successfully"
}
curl -X DELETE "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Creates a new expected source to a specific row within a dataset. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: POST
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource
{
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string" //e.g., "txt", "pdf", "json"
}
The response includes the newly created DatasetRowExpectedSource information, including a generated dataSetExpectedSourceId.
{
"dataSetExpectedSourceId": "string (UUID)",
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X POST "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowExpectedSource" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"dataSetExpectedSourceName": "MySource",
"dataSetExpectedSourceValue": "This is the source content",
"dataSetexpectedSourceExtention": "txt"
}'
Lists all expected sources associated with a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource
- Request Body: Empty
The response is a JSON array containing zero or more DatasetRowExpectedSource objects. Each object has the following structure:
[
{
"dataSetExpectedSourceId": "string (UUID)",
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
},
// ... more DatasetRowExpectedSource objects ...
]
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowExpectedSources"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Retrieves a single expected source associated with a specific row in a dataset. {dataSetId}, {dataSetRowId}, and {dataSetExpectedSourceId} are UUIDs.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}
- Request Body: Empty
A successful request returns a JSON object representing the specified expected source:
{
"dataSetExpectedSourceId": "string (UUID)",
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowExpectedSource/e1f2g3h4-i5j6-k7l8-m9n0-opqrstu123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Updates an existing expected source associated with a dataset row. All IDs are UUIDs.
- Method: PUT
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}
{
"dataSetExpectedSourceName": "string", //New name (optional)
"dataSetExpectedSourceValue": "string", //New value (optional)
"dataSetexpectedSourceExtention": "string" //New extension (optional)
}
The updated DatasetRowExpectedSource object.
{
"dataSetExpectedSourceId": "string (UUID)",
"dataSetExpectedSourceName": "string",
"dataSetExpectedSourceValue": "string",
"dataSetexpectedSourceExtention": "string",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X PUT "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowExpectedSource/e1f2g3h4-i5j6-k7l8-m9n0-opqrstu123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
-d '{
"dataSetExpectedSourceName": "Updated Source Name",
"dataSetExpectedSourceValue": "Updated Source Content"
}'
Deletes a specific expected source from a dataset row. All IDs are UUIDs.
- Method: DELETE
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}
- Request Body: Empty
A successful deletion typically returns a success message or an empty response body. For example:
{
"message": "Expected source deleted successfully"
}
curl -X DELETE "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowExpectedSource/e1f2g3h4-i5j6-k7l8-m9n0-opqrstu123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Creates a new variable for a specific row within a dataset. All IDs are UUIDs.
- Method: POST
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable
{
"dataSetMetadataType": "string", //e.g., "V" for variable, "F" for flag, etc.
"dataSetRowFilterKey": "string", //The name of the filter key
"dataSetRowFilterValue": "string", //The value to filter by
"dataSetRowFilterOperator": "string" //e.g., "=", "!=", ">", "<", "contains", etc.
}
The response includes the newly created DatasetRowFilterVariable information, including a generated dataSetRowFilterVarId.
{
"dataSetMetadataType": "string",
"dataSetRowFilterKey": "string",
"dataSetRowFilterOperator": "string",
"dataSetRowFilterValue": "string",
"dataSetRowFilterVarId": "string (UUID)",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X POST "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowFilterVariable"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
-d '{
"dataSetMetadataType": "V",
"dataSetRowFilterKey": "myFilterKey",
"dataSetRowFilterValue": "myFilterValue",
"dataSetRowFilterOperator": "="
}'
Lists all filter variables associated with a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariables
- Request Body: Empty
The response is a JSON array containing zero or more DatasetRowFilterVariable objects. Each object has the following structure:
[
{
"dataSetMetadataType": "string",
"dataSetRowFilterKey": "string",
"dataSetRowFilterOperator": "string",
"dataSetRowFilterValue": "string",
"dataSetRowFilterVarId": "string (UUID)",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
},
// ... more DatasetRowFilterVariable objects ...
]
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowFilterVariables"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Retrieves a single filter variable associated with a specific row in a dataset. All IDs are UUIDs.
- Method: GET
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}
- Request Body: Empty
A successful request returns a JSON object representing the specified filter variable:
{
"dataSetMetadataType": "string",
"dataSetRowFilterKey": "string",
"dataSetRowFilterOperator": "string",
"dataSetRowFilterValue": "string",
"dataSetRowFilterVarId": "string (UUID)",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowFilterVariable/g1h2i3j4-k5l6-m7n8-o9p0-qrstuvwx123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Updates an existing filter variable associated with a dataset row. All IDs are UUIDs.
- Method: PUT
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}
{
"dataSetMetadataType": "string", //New metadata type (optional)
"dataSetRowFilterKey": "string", //New filter key (optional)
"dataSetRowFilterValue": "string", //New filter value (optional)
"dataSetRowFilterOperator": "string" //New operator (optional)
}
The updated DatasetRowFilterVariable object.
{
"dataSetMetadataType": "string",
"dataSetRowFilterKey": "string",
"dataSetRowFilterOperator": "string",
"dataSetRowFilterValue": "string",
"dataSetRowFilterVarId": "string (UUID)",
"dataSetId": "string (UUID)",
"dataSetRowId": "string (UUID)"
}
curl -X PUT "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowFilterVariable/g1h2i3j4-k5l6-m7n8-o9p0-qrstuvwx123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
-d '{
"dataSetRowFilterValue": "UpdatedFilterValue"
}'
Deletes a specific filter variable from a dataset row. All IDs are UUIDs.
- Method: DELETE
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}
- Request Body: Empty
A successful deletion typically returns a success message or an empty response body. For example:
{
"message": "Filter variable deleted successfully"
}
curl -X DELETE "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/f7e8d9c0-b1a2-3456-7890-13579bdf0246/dataSetRowFilterVariable/g1h2i3j4-k5l6-m7n8-o9p0-qrstuvwx123456"
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN"
-H "Accept: application/json"
Uploads multiple dataset rows at once using a file. This is more efficient than creating rows individually via individual POST requests. {dataSetId} is a UUID. The file should be a JSON array of DatasetRow objects.
- Method: POST
- Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/FileUpload
The request body must include a file part containing the JSON data. The JSON file should contain an array of DatasetRow objects. The exact method for sending this will depend on your HTTP client (e.g., curl, requests library in Python).
The file should contain a JSON array. Each element in the array represents a
DatasetRow object with the following structure:
[
{
"dataSetRowInput": "string", //Required
"dataSetRowExpectedAnswer": "string", //Required
"dataSetRowContextDocument": "string", //Optional
"expectedSources": [ /* array of DatasetRowExpectedSource objects (optional) */ ],
"filterVariables": [ /* array of DatasetRowFilterVariable objects (optional) */ ]
},
// ... more DatasetRow objects ...
]
If included in
expectedSources array
{
"dataSetExpectedSourceName": "string", //Required
"dataSetExpectedSourceValue": "string", //Required
"dataSetexpectedSourceExtention": "string" //Required, e.g., "txt", "pdf", "json"
}
If included in
filterVariables array
{
"dataSetMetadataType": "string", //Required
"dataSetRowFilterKey": "string", //Required
"dataSetRowFilterValue": "string", //Required
"dataSetRowFilterOperator": "string" //Required, e.g., "=", "!=", ">", "<", "contains", etc.
}
The response structure is implementation-dependent but should clearly communicate success or failure. Here are some possible response structures:
With Id.
[
{
"dataSetRowId": "uuid",
"dataSetRowInput": "string",
"dataSetRowExpectedAnswer": "string",
// ... other fields ...
},
// ... more rows ...
]
{
"success": true,
"totalRowsUploaded": 5,
"errors": [ ] // Or an array of error objects if any
}
Using curl's --data-binary option.
curl -X POST "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRow/FileUpload" \
-H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
-H "Accept: application/json" \
-F "file=@rows.json"
Using requests library
import requests
files = {'file': open('rows.json', 'rb')}
response = requests.post(url, headers=headers, files=files, verify=False)
print(response.json())
How to evaluate an AI Assistant