Returns a list of datasets and their labels that were created by the current user. The response is sorted by dataset ID.
Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| array | Array of | 2.0 |
| string | Object returned; in this case, | 2.0 |
Dataset Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| boolean | Specifies whether the dataset is ready to be trained. | 2.0 |
| date | Date and time that the dataset was created. | 2.0 |
| long | Dataset ID. | 2.0 |
| object | Contains the | 2.0 |
| string | Dataset language. Default is | 2.0 |
| string | Name of the dataset. | 2.0 |
| int | Number of duplicate text strings. This number includes duplicates in the .zip file from which the dataset was created plus the number of duplicate text strings from subsequent PUT calls to add text to the dataset. | 2.0 |
| string | Object returned; in this case, | 2.0 |
| string | Status of the dataset creation and data upload. Valid values are:
| 2.0 |
| int | Total number of examples in the dataset. | 2.0 |
| int | Total number of labels in the dataset. | 2.0 |
| string | Type of dataset data. Valid values are:
| 2.0 |
| date | Date and time that the dataset was last updated. | 2.0 |
Labels Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| long | ID of the dataset that the label belongs to. | 2.0 |
| long | ID of the label. | 2.0 |
| string | Name of the label. | 2.0 |
| int | Number of examples in the label. | 2.0 |
Page Through Datasets
By default, this call returns 25 datasets. If you want to page through your datasets, use the offset
and count
query parameters.
Name | Type | Description | Available Version |
---|---|---|---|
| int | Number of datsets to return. Maximum valid value is 25. If you specify a number greater than 25, the call returns 25 datasets. Optional. | 2.0 |
| int | Index of the dataset from which you want to start paging. Optional. | 2.0 |
Here's an example of these query parameters. If you omit the count
parameter, the API returns 25 datasets. If you omit the offset
parameter, paging starts at 0.
curl -X GET -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" "https://api.einstein.ai/v2/language/datasets?offset=100&count=20"
For example, let's say you want to page through all of your datasets and show 20 at a time. The first call would have offset=0
and count=20
, the second call would have offset=20
and count=20
, and so on.
Get Global Datasets
Global datasets are public datasets that Salesforce provides. You can use these datasets to include additional data during training when you create a model. To get a list of the global datasets, use the global
query parameter.
Name | Type | Description | Available Version |
---|---|---|---|
| boolean | If | 2.0 |
Here's an example of the global
query parameter. The response JSON is the same as for your own custom datasets.
curl -X GET -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" "https://api.einstein.ai/v2/language/datasets?global=true"