---
title: "Publish Figure Urls"
method: POST
path: "/api/trajectories/{session_id}/figures"
tags: ["trajectories"]
---

# Publish Figure Urls

`POST /api/trajectories/{session_id}/figures`

Record {canonical local figure path → figure blob refs} mappings for a
session. omicos-core POSTs this after it background-uploads a figure, so the
server can rewrite the local path → a serve url when it serves the
trajectory to a cloud client (see get_full_trajectory). The stored
trajectory bytes are never touched — only this side table.

Body: {"figures": [{
    "canonical_path",
    "cdn_url"?,        # legacy public-figs CDN url
    "storage_uri"?,    # State 2: PRIVATE omicos-drive blob of the COMPRESSED figure
    "original_uri"?,   # State 2: PRIVATE omicos-drive blob of the ORIGINAL (full-res)
    "compressed"?,     # is the inline (storage_uri) copy a compressed one
    "mime"?, "bytes"?,
}, ...]}.

A row is accepted when it has `canonical_path` AND (`cdn_url` OR
`storage_uri`). Backward compatible: a legacy payload carrying only
`cdn_url` still works. Only the session owner may publish (same write gate
as /append).

## Path parameters

- `session_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- object

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/omicos/apis/omicos-server.md) · [All operations](https://skmtc.dev/omicos/apis/omicos-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/omicos/omicos-server/revisions/a00b94573ffe/schema)
