Skip to main content
Version: 2.2.3

Dataset

The dataset API allows consuming the return of queries created within sets recorded in the system. These sets need to use the default data source of the system (SESUITE).

List the records of the dataset

GET /apigateway/v1/dataset-integration/{your_id_dataset}

Example request:

Supported attributes:

Path parameterTypeRequiredDescription
your_id_datasetStringYesID # of the dataset to be consumed
curl -X GET 'https://my-domain.softexpert.com/apigateway/v1/dataset-integration/users' \
-H 'Authorization: <your_api_token>'

Example response:

200 OK

[
{
"nmdepartment": "Administrative",
"nmuser": "Kevin Turey",
"idlogin": "Kevint",
"isactive": "active",
"nmposition": "Chief Executive Officer",
"isenabled": "non-blocked"
},
{
"nmdepartment": "Manufacture",
"nmuser": "Manuel Coronado",
"idlogin": "coronado",
"isactive": "active",
"nmposition": "Coordinator",
"isenabled": "non-blocked"
},
{
"nmdepartment": "Purchase",
"nmuser": "Patricia Cooperstone",
"idlogin": "PurCoo",
"isactive": "active",
"nmposition": "Coordinator",
"isenabled": "non-blocked"
},
{
"nmdepartment": "Administrative",
"nmuser": "Philip Smith",
"idlogin": "marlon",
"isactive": "active",
"nmposition": "Manager",
"isenabled": "non-blocked"
},
{
"nmdepartment": "Production",
"nmuser": "Suzan Thompson",
"idlogin": "st",
"isactive": "active",
"nmposition": "Service Desk",
"isenabled": "non-blocked"
}
]
caution
  • The structure of return fields varies according to those returned by the query and mapped in the dataset. The return above is just a simple example with a table of the system's users. Fields that return null values will return "" (empty) instead.
  • For each line returned by the query, the latter will be serialized in the form of a JSON object in the API return. Only the first 10,000 (ten thousand) records will be returned as objects.

Get a dataset record

POST /apigateway/v1/dataset-integration/{your_id_dataset}

Example request:

Supported attributes:

Path parameterTypeRequiredDescription
your_id_datasetStringYesID # of the dataset to be consumed
curl -X POST 'https://my-domain.softexpert.com/apigateway/v1/dataset-integration/users' \
-H 'Content-Type: application/json' \
-H 'Authorization: <your_api_token>' \
-d '{
"id_login": "coronado"
}'

Example response:

200 OK

[
{
"nmdepartment": "Manufacture",
"nmuser": "Manuel Coronado",
"idlogin": "coronado",
"isactive": "active",
"nmposition": "Coordinator",
"isenabled": "non-blocked"
}
]

Other information

Return in case of error

ID #Description
messageMessage explaining the error found
statusReturn HTTP code

HTTP Status

HTTP codeDescription
200 (OK)It occurs when the resource is able to consume the dataset successfully and bring its results
400 (Bad request)It occurs when an invalid dataset or a dataset with characteristics not supported by the resources is entered
404 (Not found)It occurs when an invalid dataset ID # is entered, or when that user has not permission to view/edit
500 (Internal server error)It occurs when an unexpected error is returned by the resource, or in case of query execution timeout
503 (Service unavailable)It occurs when the SoftExpert Suite job is overloaded as to the JVM memory usage