Episodes_LinkTaskLabels
const url = 'https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/episodes:linkTaskLabels';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"parent":"example","linkedTask":"example","labels":["example"],"validateOnly":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The account id.
The dataset id.
Request Body required
Section titled “Request Body required ”Request for Episodes.LinkTaskLabels.
object
Accounts/{account}/datasets/-: every upload of the account in the caller’s workspace.
Accounts/{account}/tasks/{task}: the task to link to. A task of the parent’s account; NOT_FOUND otherwise.
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.
Report what the call would link and write nothing.
Example generated
{ "parent": "example", "linkedTask": "example", "labels": [ "example" ], "validateOnly": true}Responses
Section titled “ Responses ”OK
Response for Episodes.LinkTaskLabels.
object
Every label that matches the task’s name, as it stood before the call: exact ones first, then by episode count.
Unlinked episodes, uploads and merged datasets that carry one label.
object
The label as stored.
Whether it is the task’s name, surrounding whitespace aside. Other matches are near misses.
Unlinked episodes whose task label it is.
Unlinked uploads and merged datasets whose task label it is.
Episodes linked (with validate_only, that would be).
Uploads and merged datasets linked (with validate_only, that would be).
Example generated
{ "matches": [ { "label": "example", "exact": true, "episodeCount": 1, "datasetCount": 1 } ], "linkedEpisodeCount": 1, "linkedDatasetCount": 1}default
Section titled “default ”Default error response
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
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
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.
A list of messages that carry the error details. There is a common set of message types for APIs to use.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
object
The type of the serialized message.
Example generated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}