Skip to content

Datasets_RemapDatasetChannels

POST
/v1/accounts/{account}/datasets/{dataset}:remapChannels
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.

account
required
string

The account id.

dataset
required
string

The dataset id.

Media type application/json

Request for Datasets.RemapDatasetChannels.

object
name
required

Accounts/{account}/datasets/{dataset}

string
renames
required

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
key
additional properties
string
Example generated
{
"name": "example",
"renames": {
"additionalProperty": "example"
}
}

OK

Media type application/json

Response for Datasets.RemapDatasetChannels.

object
interfaceHash

The robot interface derived under the new renames, “b3:”; empty when it could not be derived yet (the renames are kept either way).

string
uploadsChanged

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.

Array<string>
interfaceSettlement

Merged dataset only: how far its uploads’ interfaces have settled as the call commits (the same count as Dataset.interface_settlement).

object
settledMembers

Number of merged members whose derived interfaces are settled.

integer format: int32
totalMembers

Total number of uploads in the merged dataset.

integer format: int32
outstandingUploads

Upload resource names whose interfaces are not settled yet.

Array<string>
Example generated
{
"interfaceHash": "example"
}

Default error response

Media type application/json

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
code

The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].

integer format: int32
message

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.

string
details

A list of messages that carry the error details. There is a common set of message types for APIs to use.

Array<object>

Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.

object
@type

The type of the serialized message.

string
key
additional properties
any
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}