Skip to main content
Chakra mapping files. The six mapping-file resource operations are served by the trace-service router behind enable_trace_routes; the two configuration attach and detach operations are served by central unconditionally.

Endpoints


Attach mapping file to configuration

PATCH /api/v1/configurations/{config_id}/mapping-file Sets the activeMappingFile field on the configuration and writes UseMapping and MappingFileName into every application with trafficType ‘chakra’, as a new configuration version. Requires at least one Chakra application, an attached traceset, and a mapping file whose rank count equals the traceset’s rank count.

Parameters

Request Body

Responses

200 - Mapping file attached successfully; returns the new configuration version
400 - Malformed configuration ID or mapping file ID, a request body that fails validation, or a configuration in the template workspace (reserved for standard templates) 404 - Configuration not found, or mapping file not found, deleted, or held by another workspace 409 - The configuration has no attached traceset (MAPPING_REQUIRES_TRACESET), or the traceset’s rank count is not yet resolved (CONFLICT, retry-safe). 412 - Precondition failed (ETag mismatch) 422 - The configuration has no Chakra application (MAPPING_REQUIRES_CHAKRA_APP), or the mapping file’s rank count differs from the traceset’s (MAPPING_RANK_COUNT_MISMATCH).

Detach mapping file from configuration

DELETE /api/v1/configurations/{config_id}/mapping-file Removes the activeMappingFile field and writes UseMapping false and an empty MappingFileName into every Chakra application, restoring default placement, as a new configuration version. The mapping file itself is untouched and stays attachable to other configurations.

Parameters

Responses

200 - Mapping file detached successfully; returns the new configuration version
400 - Malformed configuration ID, or a configuration in the template workspace (reserved for standard templates) 404 - Configuration not found, or no mapping file attached 412 - Precondition failed (ETag mismatch)

List mapping files

GET /api/v1/mapping-files Lists the Chakra mapping files in a workspace, newest first, with cursor pagination. Deleted files are omitted.

Parameters

Responses

200 - Paginated list of mapping files
400 - Bad Request — workspaceId is absent or blank (there is no tenant-wide fallback), limit is zero or does not parse as a positive unsigned 32-bit integer, or the cursor is invalid or expired

Get mapping file

GET /api/v1/mapping-files/{mapping_file_id} Returns a mapping file’s metadata, including the stored CRC64NVME checksum of its bytes.

Parameters

Responses

200 - Mapping file details
404 - Mapping file not found
410 - Mapping file has been deleted

Delete mapping file

DELETE /api/v1/mapping-files/{mapping_file_id} Soft-deletes a mapping file. The delete succeeds whether or not a configuration refers to the file; a configuration that refers to it then reports it as deleted, and creating a simulation from that configuration is refused until the file is detached or another is attached. Simulations already created are unaffected.

Parameters

Responses

204 - Mapping file deleted 404 - Mapping file not found, or already deleted

Get mapping file download URL

GET /api/v1/mapping-files/{mapping_file_id}/download Returns a presigned URL for the mapping file’s stored bytes. The served bytes are byte-for-byte the uploaded bytes.

Parameters

Responses

200 - Presigned download URL
404 - Mapping file not found
410 - Mapping file has been deleted

Initiate mapping-file upload

POST /api/v1/mapping-files/upload-url Creates an upload session and returns presigned S3 multipart upload URLs for one Chakra mapping file. After PUTting every part, call POST /api/v1/mapping-files/upload-url/complete to validate and store it. Nothing is stored until that call succeeds.

Request Body

Responses

200 - Presigned upload URLs for each part
400 - Invalid request — name is not a single safe path segment or contains .., sizeBytes is outside 1..64000000, workspaceId is absent, blank, or padded with whitespace, or description exceeds 2048 characters

Complete mapping-file upload

POST /api/v1/mapping-files/upload-url/complete Finalises the multipart upload, validates the file against the simulator’s grammar, stores it once under its content checksum, and creates the mapping file. A file whose bytes already exist as a live mapping file in the workspace returns that file with duplicateOfExisting set and creates nothing. A file that fails validation is refused with the offending line number and nothing is stored.

Request Body

Responses

200 - The uploaded bytes already exist as a live mapping file in this workspace; that file is returned with duplicateOfExisting true and no new mapping file was created
201 - Mapping file stored and created
400 - Invalid request — the upload session is not a mapping-file upload, or the parts do not match the session
404 - Upload session not found
409 - The upload session named by uploadId is already being completed or was already completed or aborted (CONFLICT), or a different mapping file with this display name is already stored under this content checksum (MAPPING_FILE_HASH_COLLISION)
410 - Upload session expired
413 - The staged object is larger than the declared sizeBytes, or above the 64 MB limit; staging is deleted and nothing is stored
422 - The file does not parse as a Chakra mapping file; the message names the offending line
503 - Another upload of the same content held the content lock for too long. This upload session is closed and its staged object deleted, so the request is not safe to retry: open a new upload session and upload the file again. Because another upload of the same content was in progress, the new upload is most often answered 200 with duplicateOfExisting set.