Skip to content

Episodes_LinkTaskLabels

POST
/v1/accounts/{account}/datasets/{dataset}/episodes:linkTaskLabels
curl --request POST \
--url https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes:linkTaskLabels \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <X-API-Key>' \
--data '{ "parent": "example", "linkedTask": "example", "labels": [ "example" ], "validateOnly": true }'

Links the unlinked episodes, uploads and merged datasets of the caller’s workspace whose free-text task label is a task’s name (QUA-3403; a merged dataset by its own labels.task, QUA-3511, and never an upload a merge took, which keeps its Task, though its episodes are linked). Publishing a task links its exact matches on its own; this call previews them (validate_only) beside the near misses, labels that differ from the name only in case, spacing or punctuation, and links the labels the caller picks. A link already set, to this task or another, is never changed, and labels stay as they are. Each upload or merged dataset it links anything in records one TASK_ASSIGNED.

account
required
string

The account id.

dataset
required
string

The dataset id.

Media type application/json

Request for Episodes.LinkTaskLabels.

object
parent
required

Accounts/{account}/datasets/-: every upload of the account in the caller’s workspace.

string
linkedTask
required

Accounts/{account}/tasks/{task}: the task to link to. A task of the parent’s account; NOT_FOUND otherwise.

string
labels

The labels to link, each exactly as a match reports it: the task’s name or a near miss of it, at most 100. Empty links the exact matches only, as publishing does. A label that is neither is INVALID_ARGUMENT.

Array<string>
validateOnly

Report what the call would link and write nothing.

boolean
Example generated
{
"parent": "example",
"linkedTask": "example",
"labels": [
"example"
],
"validateOnly": true
}

OK

Media type application/json

Response for Episodes.LinkTaskLabels.

object
matches

Every label that matches the task’s name, as it stood before the call: exact ones first, then by episode count.

Array<object>

Unlinked episodes, uploads and merged datasets that carry one label.

object
label

The label as stored.

string
exact

Whether it is the task’s name, surrounding whitespace aside. Other matches are near misses.

boolean
episodeCount

Unlinked episodes whose task label it is.

integer format: int32
datasetCount

Unlinked uploads and merged datasets whose task label it is.

integer format: int32
linkedEpisodeCount

Episodes linked (with validate_only, that would be).

integer format: int32
linkedDatasetCount

Uploads and merged datasets linked (with validate_only, that would be).

integer format: int32
Example generated
{
"matches": [
{
"label": "example",
"exact": true,
"episodeCount": 1,
"datasetCount": 1
}
],
"linkedEpisodeCount": 1,
"linkedDatasetCount": 1
}

Default error response

Media type application/json

The Status type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the API Design Guide.

object
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}