Mixtures_BatchCreateSources
const url = 'https://dev-api.qualiastudios.dev/v1/accounts/example/datasets/example/sources:batchCreate';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"parent":"example","requests":[{"parent":"example","source":{"name":"example","dataset":"example","label":{"field":"FIELD_UNSPECIFIED","value":"example"},"linkedTask":"example","follow":{"channel":"CHANNEL_UNSPECIFIED","pin":"example"},"etag":"example","position":1},"requestId":"example"}],"requestId":"example"}'};
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/sources:batchCreate \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "parent": "example", "requests": [ { "parent": "example", "source": { "name": "example", "dataset": "example", "label": { "field": "FIELD_UNSPECIFIED", "value": "example" }, "linkedTask": "example", "follow": { "channel": "CHANNEL_UNSPECIFIED", "pin": "example" }, "etag": "example", "position": 1 }, "requestId": "example" } ], "requestId": "example" }'Adds several sources at once, last and in the order given: all of them or none. The mixture is resolved once for all of them, so this is the call for a new mixture’s sources. Refuses as CreateSource would (an upload a merge took included) for the first source it refuses, and INVALID_ARGUMENT when two of the requests read the same dataset or label. Emits SOURCE_ADDED for each, in order.
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 Mixtures.BatchCreateSources.
object
Accounts/{account}/datasets/{dataset}: a mixture.
The sources to add, 1 to 200, in the order they take. Each request’s parent is empty or this parent; its request_id is left empty (this request carries the one key).
Request for Mixtures.CreateSource. (— api-linter: core::0133::request-id-field=disabled aip.dev/not-precedent: source ids are server-assigned. —)
object
Accounts/{account}/datasets/{dataset}: a mixture.
The source: dataset or label, and follow.
object
Accounts/{account}/datasets/{dataset}/sources/{source}
Accounts/{account}/datasets/{dataset}: an upload, a mixture or a merged dataset by name. Not an upload a merge took (QUA-3511): name its merged dataset; a pin of one of its own tags, left from before, stays.
Every upload and merged dataset with this label value, present and future: a merged dataset by its own labels (a method by its own method tags, the union of its uploads’, and then all of it), and no upload a merge took (QUA-3511).
object
The label.
The value it must equal, exactly.
Accounts/{account}/tasks/{task}: every upload and merged dataset
linked to this task (Dataset.linked_task), present and future
(QUA-3116); no upload a merge took (QUA-3511). A task of the
mixture’s account; NOT_FOUND otherwise. Deleting the task is not
refused: the source stays, reads nothing and says so in state
(TASK_DELETED).
How it is followed; unset means stable. A pin names a tag of dataset;
a label or task source can only follow a channel.
object
Move with a channel.
Stay on this version tag of the source dataset, e.g. “1.0”.
What it resolves to now, one row per dataset (one for a dataset source, every matching upload and merged dataset for a label source).
One dataset the source resolved to, and where it is read.
object
Accounts/{account}/datasets/{dataset}
Upload, merged dataset or mixture.
The tag it is read at; empty at head.
The digest it is read at.
Episodes it brings in, before this mixture’s rejects.
Episodes this mixture rejected among them.
Nothing to read: the followed channel has no tag yet (stable on a dataset still in review).
Upload or merged dataset (over the uploads it holds) only: ruled / total, for the sources panel’s progress.
Upload or merged dataset (over the uploads it holds) only: total episodes.
Episodes it brings into head, after this mixture’s rejects.
Mixture source only: episodes the source mixture had rejected itself, inherited unseen.
Pinned source only: set when a newer stable tag exists.
object
The newer tag.
Episodes it would add.
Episodes it would remove.
Episodes in both at another revision.
Who added it.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When it was added.
When its follow last changed.
Sent back on UpdateSource.
Its place in the sources panel, from 0; the first source that brings an episode in is the one it counts under. A new source goes last; setting it moves the others along.
Whether it can still read what it names; TASK_DELETED once its
linked_task is gone.
Idempotency key (AIP-155): a retry with the same id within 24 hours returns the first call’s result instead of creating a second one.
Idempotency key (AIP-155): a retry with the same id within 24 hours returns the first call’s sources instead of adding them again.
Responses
Section titled “ Responses ”OK
Response for Mixtures.BatchCreateSources.
object
The sources added, in the order requested.
One thing a mixture reads (QUA-2240): an upload or another mixture by name, or every upload carrying one label value, now and later. Each is followed on a channel or pinned to a tag. An upload or label source arrives raw (what the upload kept); a mixture source arrives curated (what it yields, its own rejects already out, and inherited). A mixture cannot read itself, however far round. There are no weights.
Served by qds-api. Only a MIXTURE dataset has sources.
object
Accounts/{account}/datasets/{dataset}/sources/{source}
Accounts/{account}/datasets/{dataset}: an upload, a mixture or a merged dataset by name. Not an upload a merge took (QUA-3511): name its merged dataset; a pin of one of its own tags, left from before, stays.
Every upload and merged dataset with this label value, present and future: a merged dataset by its own labels (a method by its own method tags, the union of its uploads’, and then all of it), and no upload a merge took (QUA-3511).
object
The label.
The value it must equal, exactly.
Accounts/{account}/tasks/{task}: every upload and merged dataset
linked to this task (Dataset.linked_task), present and future
(QUA-3116); no upload a merge took (QUA-3511). A task of the
mixture’s account; NOT_FOUND otherwise. Deleting the task is not
refused: the source stays, reads nothing and says so in state
(TASK_DELETED).
How it is followed; unset means stable. A pin names a tag of dataset;
a label or task source can only follow a channel.
object
Move with a channel.
Stay on this version tag of the source dataset, e.g. “1.0”.
What it resolves to now, one row per dataset (one for a dataset source, every matching upload and merged dataset for a label source).
One dataset the source resolved to, and where it is read.
object
Accounts/{account}/datasets/{dataset}
Upload, merged dataset or mixture.
The tag it is read at; empty at head.
The digest it is read at.
Episodes it brings in, before this mixture’s rejects.
Episodes this mixture rejected among them.
Nothing to read: the followed channel has no tag yet (stable on a dataset still in review).
Upload or merged dataset (over the uploads it holds) only: ruled / total, for the sources panel’s progress.
Upload or merged dataset (over the uploads it holds) only: total episodes.
Episodes it brings into head, after this mixture’s rejects.
Mixture source only: episodes the source mixture had rejected itself, inherited unseen.
Pinned source only: set when a newer stable tag exists.
object
The newer tag.
Episodes it would add.
Episodes it would remove.
Episodes in both at another revision.
Who added it.
object
What kind of actor it is.
The person’s user id when kind is PERSON; empty otherwise.
The person’s display name at the time, for rendering without a lookup.
The rule code, or the model id (e.g. “gemini-robotics-er”), when not a person.
The run a model or rule finding came from, when it has one.
The API key’s id when a person acted through one; empty for a session. Never the key itself.
Signed identity evidence recorded with the change, kept apart from the principal above. Unset on older records and wherever none was signed.
object
How the principal authenticated.
The user id of a person verified as starting the work: the person of a session, or the person a trusted service’s signed job record names. Empty when nobody was verified.
The initiator’s display name at the time, never their email.
The user id of the key’s creator at the time. Not who used the key.
Who owned the key at the time.
The owning space’s id (a workspace or the organization) when
credential_owner is SPACE.
When it was added.
When its follow last changed.
Sent back on UpdateSource.
Its place in the sources panel, from 0; the first source that brings an episode in is the one it counts under. A new source goes last; setting it moves the others along.
Whether it can still read what it names; TASK_DELETED once its
linked_task is gone.
Example
{ "sources": [ { "label": { "field": "FIELD_UNSPECIFIED" }, "follow": { "channel": "CHANNEL_UNSPECIFIED" }, "resolutions": [ { "kind": "KIND_UNSPECIFIED" } ], "creator": { "kind": "KIND_UNSPECIFIED", "attribution": { "authentication": "AUTHENTICATION_UNSPECIFIED", "credentialOwner": "CREDENTIAL_OWNER_UNSPECIFIED" } }, "state": "STATE_UNSPECIFIED" } ]}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" } ]}