Get All Examples for Label

Returns all the examples for the specified label. Returns both uploaded examples and feedback examples.

NOTE: This is a new endpoint. Use this updated endpoint after December 3, 2020 to get all examples for a label.

Response Body

Name

Type

Description

Available Version

data

array

Array of example objects.

2.0

object

string

Object returned; in this case, list.

2.0

Example Response Body

Name

Type

Description

Available Version

createdAt

date

Date and time that the example was created.

2.0

id

long

ID of the example.

2.0

label

object

Label that the example is associated with.

2.0

object

string

Object returned; in this case, example.

2.0

Label Response Body

Name

Type

Description

Available Version

datasetId

long

ID of the dataset that the label belongs to.

2.0

id

long

ID of the label.

2.0

name

string

Name of the label.

2.0

numExamples

int

Number of examples that have the label.

2.0

Page Through Examples

By default, this call returns 100 examples. If you want to page through all the examples returned by this call, use the offset and count query parameters. The numExamples value indicates how many examples have the specified label, so you can use this value to control the paging.

Name

Type

Description

Available Version

count

int

Number of examples to return. Maximum valid value is 100. If you specify a number greater than 100, the call returns 100 examples. Optional.

2.0

offset

int

Index of the example from which you want to start paging. Optional.

2.0

The following call shows how to page through examples using these query parameters. If you omit the count parameter or the count parameter is greater than 100, the API returns 100 examples. If you omit the offset parameter, paging starts at 0. When using multiple query parameters in a cURL call, be sure to enclose the endpoint in quotes.

curl -X GET -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache"  "https://api.einstein.ai/v2/language/examples/7890/label/1234&offset=50&count=50"

📘

Note

This call returns both uploaded and feedback examples that have the specified label. This call doesn't support the source parameter.

Limits

Each Einstein Platform Services account is limited to 30 calls per calendar month to Einstein Vision and Einstein Language endpoints that return examples.

This limit applies across all APIs that return examples. If you exceed this limit, you receive an error message. See Release Notes.

Language