Table of contents
Official Content
  • This documentation is valid for:

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.

Endpoints

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.

Error Responses

  • 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.

GET/dataSetApi/dataSets

Retrieves a list of all datasets available in the system.

Request

  • Method: GET
  • Path: /dataSetApi/dataSets
  • Request Body: Empty

Response

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 Sample

curl -X GET "$BASE_URL/dataSetApi/dataSets" \
  -H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
  -H "Accept: application/json"

POST/dataSetApi/dataSet

Creates a new dataset.

Request

  • Method: POST
  • Path: /dataSetApi/dataSets

Request Body

{
    "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 ...
        ]
}

Response

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 Sample

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": "" 
          }
        ]
      }'

POST/dataSetApi/dataSet/FileUpload

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.

Request

  • Method: POST
  • Path: /dataSetApi/dataSet/FileUpload

Request Body

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 ...
  ]
}

Response

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 Sample

curl -X POST "$BASE_URL/dataSet/FileUpload" \
  -H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
  -H "Accept: application/json" \
  -F "file=@dataset.json"

GET/dataSetApi/dataSet/{dataSetId}

Retrieves a specific dataset by its Id. {dataSetId} is a UUID representing the dataset to retrieve.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}
  • Request Body: Empty

Response

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 Sample

curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef" \
  -H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" \
  -H "Accept: application/json"

PUT /dataSetApi/dataSet/{dataSetId}

Updates an existing dataset. {dataSetId} is a UUID representing the dataset to update.

Request

  • Method: PUT
  • Path: /dataSetApi/dataSet/{dataSetId}

Request Body

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) */ ]
}

Response

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 Sample

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
      }'

DELETE/dataSetApi/dataSet/{dataSetId}

Deletes a dataset. {dataSetId} is a UUID representing the dataset to delete.

Request

  • Method: DELETE
  • Path: /dataSetApi/dataSet/{dataSetId}
  • Request Body: Empty

Response

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 Sample

curl -X DELETE "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef" 
  -H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" 
  -H "Accept: application/json"

POST/dataSetApi/dataSet/{dataSetId}/dataSetRow

Creates a new row within the specified dataset. {dataSetId} is a UUID representing the target dataset.

Request

  • Method: POST
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow

Request Body

{
  "dataSetRowInput": "string",
  "dataSetRowExpectedAnswer": "string",
  "dataSetRowContextDocument": "string", //Optional
  "expectedSources": [ /* array of DatasetRowExpectedSource objects (optional) */ ],
  "filterVariables": [ /* array of DatasetRowFilterVariable objects (optional) */ ]
}

Response

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 Sample

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"
      }'

GET/dataSetApi/dataSet/{dataSetId}/dataSetRows

Lists all rows for a given dataset. {dataSetId} is a UUID representing the dataset.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRows
  • Request Body: Empty

Response

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 Sample

curl -X GET "$BASE_URL/dataSetApi/dataSet/a1b2c3d4-e5f6-7890-1234-567890abcdef/dataSetRows" 
  -H "Authorization: Bearer $SAIA_PROJECT_APITOKEN" 
  -H "Accept: application/json"

GET/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}

Retrieves a specific row from a dataset. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}
  • Request Body: Empty

Response

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 Sample

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"

PUT/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}

Updates a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: PUT
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}

Request Body

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) */ ]
}

Response

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 Sample

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"
      }'

DELETE/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}

Deletes a dataset row. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: DELETE
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}
  • Request Body: Empty

Response

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 Sample

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"

POST/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource

Creates a new expected source to a specific row within a dataset. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: POST
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource

Request Body

{
  "dataSetExpectedSourceName": "string",
  "dataSetExpectedSourceValue": "string",
  "dataSetexpectedSourceExtention": "string" //e.g., "txt", "pdf", "json"
}

Response

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 Sample

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"
      }'

GET/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSources

Lists all expected sources associated with a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource
  • Request Body: Empty

Response

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 Sample

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"

GET/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}

Retrieves a single expected source associated with a specific row in a dataset. {dataSetId}, {dataSetRowId}, and {dataSetExpectedSourceId} are UUIDs.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}
  • Request Body: Empty

Response

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 Sample

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"

PUT/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}

Updates an existing expected source associated with a dataset row. All IDs are UUIDs.

Request

  • Method: PUT
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}

Request Body

{
  "dataSetExpectedSourceName": "string", //New name (optional)
  "dataSetExpectedSourceValue": "string", //New value (optional)
  "dataSetexpectedSourceExtention": "string" //New extension (optional)
}

Response

The updated DatasetRowExpectedSource object.

{
  "dataSetExpectedSourceId": "string (UUID)",
  "dataSetExpectedSourceName": "string",
  "dataSetExpectedSourceValue": "string",
  "dataSetexpectedSourceExtention": "string",
  "dataSetId": "string (UUID)",
  "dataSetRowId": "string (UUID)"
}

cURL Sample

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"
      }'

DELETE/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}

Deletes a specific expected source from a dataset row. All IDs are UUIDs.

Request

  • Method: DELETE
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowExpectedSource/{dataSetExpectedSourceId}
  • Request Body: Empty

Response

A successful deletion typically returns a success message or an empty response body. For example:

{
  "message": "Expected source deleted successfully"
}

cURL Sample

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"

POST/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable

Creates a new variable for a specific row within a dataset. All IDs are UUIDs.

Request

  • Method: POST
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable

Request Body

{
  "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.
}

Response

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 Sample

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": "="
      }'

GET/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariables

Lists all filter variables associated with a specific row in a dataset. {dataSetId} and {dataSetRowId} are UUIDs.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariables
  • Request Body: Empty

Response

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 Sample

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"

GET/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}

Retrieves a single filter variable associated with a specific row in a dataset. All IDs are UUIDs.

Request

  • Method: GET
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}
  • Request Body: Empty

Response

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 Sample

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"

PUT/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}

Updates an existing filter variable associated with a dataset row. All IDs are UUIDs.

Request

  • Method: PUT
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}

Request Body

{
  "dataSetMetadataType": "string", //New metadata type (optional)
  "dataSetRowFilterKey": "string", //New filter key (optional)
  "dataSetRowFilterValue": "string", //New filter value (optional)
  "dataSetRowFilterOperator": "string" //New operator (optional)
}

Response

The updated DatasetRowFilterVariable object.

{
  "dataSetMetadataType": "string",
  "dataSetRowFilterKey": "string",
  "dataSetRowFilterOperator": "string",
  "dataSetRowFilterValue": "string",
  "dataSetRowFilterVarId": "string (UUID)",
  "dataSetId": "string (UUID)",
  "dataSetRowId": "string (UUID)"
}

cURL Sample

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"
      }'

DELETE/dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}

Deletes a specific filter variable from a dataset row. All IDs are UUIDs.

Request

  • Method: DELETE
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/{dataSetRowId}/dataSetRowFilterVariable/{dataSetRowFilterVarId}
  • Request Body: Empty

Response

A successful deletion typically returns a success message or an empty response body. For example:

{
  "message": "Filter variable deleted successfully"
}

cURL Sample

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"

POST/dataSetApi/dataSet/{dataSetId}/dataSetRow/FileUpload

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.

Request

  • Method: POST
  • Path: /dataSetApi/dataSet/{dataSetId}/dataSetRow/FileUpload

Request Body

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.
}

Response

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
}
{
  "success": true,
  "totalRowsUploaded": 5,
  "totalRowsProcessed": 7, // Might be more than uploaded if some failed
  "errors":  /* array of error objects */ ,
  "uploadedRows":  /* array of DatasetRow objects with IDs */ 
}

Samples

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())

See Also

How to evaluate an AI Assistant

Last update: March 2025 | © GeneXus. All rights reserved. GeneXus Powered by Globant