Datasets_RemapDatasetChannels
const url = 'https://dev-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://dev-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, ADR 0008), 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 (QUA-3694): 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
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" } ]}