Datasets_RemapDatasetChannels
const url = 'https://junction-api.qualiastudios.dev/v1/accounts/example/datasets/example:remapChannels';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"name":"example","renames":{"additionalProperty":"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://junction-api.qualiastudios.dev/v1/accounts/example/datasets/example:remapChannels \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "name": "example", "renames": { "additionalProperty": "example" } }'Maps native channel names onto canonical keys where the automatic grammar got them wrong or found none (a mapping lens), then derives the robot interface again. Renames add to the upload’s earlier ones; a channel renamed again takes the newest key. A key another channel of the upload already holds is FAILED_PRECONDITION naming that channel (rename both to swap them), and nothing is written. FAILED_PRECONDITION on a mixture and on an upload merged into one (naming the dataset to use).
On a merged dataset the renames are its own channel keys: the call writes one lens on each upload it holds that does not already key a channel as asked, in one transaction (DATASET_UPDATED on the merged dataset and on each upload it wrote), and derives their interfaces again after it commits, which Dataset.interface_settlement counts. A key that would give one upload two channels is FAILED_PRECONDITION naming the upload and the channel, and nothing is written on any upload; a name no upload has is INVALID_ARGUMENT. Sending the same renames again writes nothing.
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 Datasets.RemapDatasetChannels.
object
Accounts/{account}/datasets/{dataset}
Native channel name to canonical key, 1 to 512 entries. Keys are [left.|right.]{joint_N|gripper|shoulder_pan|…}.{pos|vel|eff|torque| current|temp} or [left.|right.]ee.{x|y|z|roll|pitch|yaw|qx|qy|qz|qw}, each used once. qx..qw are a unit quaternion’s parts (x, y, z, w), unit “norm”. An empty key resets the channel to the key read from its name. A name’s mapping also reaches its velocity and effort channels.
object
Example generated
{ "name": "example", "renames": { "additionalProperty": "example" }}Responses
Section titled “ Responses ”OK
Response for Datasets.RemapDatasetChannels.
object
The robot interface derived under the new renames, “b3:
Merged dataset only: the uploads a lens was written on, which are
re-derived after the call returns (empty: they all keyed the channels as
asked already). interface_hash is empty for a merged dataset.
Merged dataset only: how far its uploads’ interfaces have settled as the call commits (the same count as Dataset.interface_settlement).
object
Number of merged members whose derived interfaces are settled.
Total number of uploads in the merged dataset.
Upload resource names whose interfaces are not settled yet.
Example generated
{ "interfaceHash": "example"}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": [ {} ]}