Episodes_LinkTaskLabels
const url = 'https://junction-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://junction-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 (a merged dataset by its own labels.task, 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
A refusal from the API itself.
object
The gRPC code name in upper case, e.g. NOT_FOUND.
Whether the same call may succeed if retried.
Empty, except when a dataset copy or move is refused: then one google.rpc.ErrorInfo with the refusal’s reason code, its domain and, in metadata, the datasets it names.
object
A refusal from the gateway before the call reaches the API, for example 401 bad or missing API key, 403 key lacks the scope or environment closed, 413 body too large.
object
What went wrong.
Example generated
{ "code": "example", "message": "example", "retryable": true, "details": [ {} ]}