Published diagrams

Read a version link (public)

What the page at https://zindex.ai/d/{ref} shows, and with .svg or .png the image itself. No key needed. {ref} is a published diagram's ID (never its key) or a share link's token, with @{revision} for one version; without it, the latest. A published diagram's answer has its title, description, madePublicAt, scene and kept image; a share link's has only id, access, the version shown and its date, latest, and every version's number and date, never anything from the scene. Images are the ones kept when each version was saved. An exact version's image is served with Cache-Control: public, max-age=31536000, immutable; one that follows the latest, and every JSON answer, with public, max-age=60. A share link's answers carry private instead of public: the visitor's own browser may keep them, but no shared cache may, so a revoked link stops for new viewers. Images carry an ETag of the version's chain hash (its content hash while it has none); If-None-Match with it answers 304. A private, deleted or unknown diagram, and an unknown or revoked token, answer the same 404, so the answer doesn't reveal which exist. Making a diagram private stops its links by ID at once, revoking a share link stops that link, and deleting the diagram stops both; copies already fetched stay with whoever has them.

get/v1/public/diagrams/{ref}

Request

  • Base URL: https://api.zindex.ai
  • URL: https://api.zindex.ai/v1/public/diagrams/{ref}
  • Auth: none required

Path parameters

refstring required

{id or token}[@{revision}][.svg|.png], e.g. dgm_7Q2kD9a1B2c3@3.svg

Headers

If-None-Matchstring

Images: the ETag of a copy you have

Response

The page answer, or the image

idstring required
access'public' | 'link' required

public: a published diagram by ID; link: a share link

revisioninteger required

The version shown

latestinteger required

The diagram's latest version

atstring date-time nullable required

When the version shown was saved

titlestring nullable

Published diagrams only

descriptionstring nullable

Published diagrams only

madePublicAtstring date-time nullable

Published diagrams only

svgstring

Published diagrams only: the version's kept image, with its address and date in the bottom-right corner (older versions: {id} | Rev N - {date}) and data-zindex-id, data-zindex-revision and data-zindex-hash on the root

Changes

No recorded changes to this operation across all 1 revision of this API.