Mojo UpDocs
API reference

Project pictures

The project's pictures

GET/projects/v1/{id}/pictures

Newest first, with the people named in them. No SVG; the spec only with include=spec. Members of the project, viewers too.

Authorization

AuthorizationBearer <token>

A device access token from the device-code flow (aioe_at_…). A DPoP-bound token is sent as Authorization: DPoP <token> with a fresh DPoP proof on every request.

In: header

Path Parameters

id*string

The project.

Query Parameters

include?"spec"

spec adds each picture's spec.

Value in

  • "spec"

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/projects/v1/string/pictures"
{  "pictures": [    {}  ],  "people": {}}
GET/projects/v1/{id}/pictures/{slug}

The ETag is the version.

Authorization

AuthorizationBearer <token>

A device access token from the device-code flow (aioe_at_…). A DPoP-bound token is sent as Authorization: DPoP <token> with a fresh DPoP proof on every request.

In: header

Path Parameters

id*string

The project.

slug*string

Lower-case letters, digits and dashes, at most 60.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/projects/v1/string/pictures/string"
{}

Remove a picture

DELETE/projects/v1/{id}/pictures/{slug}

Contributors and owners; the version before goes with it. If-Match as for a save.

Authorization

AuthorizationBearer <token>

A device access token from the device-code flow (aioe_at_…). A DPoP-bound token is sent as Authorization: DPoP <token> with a fresh DPoP proof on every request.

In: header

Path Parameters

id*string

The project.

slug*string

The picture.

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/projects/v1/string/pictures/string"
Empty

Save a picture

PUT/projects/v1/{id}/pictures/{slug}

Contributors and owners. A change to the spec, SVG or look adds a version and keeps the one it replaces as the version before; the same picture again is no new version. If-Match: "<version>" ("0": it was not there) and If-None-Match: * guard the write. The SVG may hold shapes, text, styles, SMIL animation and data: fonts; never script, foreignObject, embedded documents, entities, event handlers, javascript:, or references to anything but #id and data:. Spec at most 512 KB, SVG at most 2 MB, body at most 3 MB; a project keeps at most 200 pictures.

Authorization

AuthorizationBearer <token>

A device access token from the device-code flow (aioe_at_…). A DPoP-bound token is sent as Authorization: DPoP <token> with a fresh DPoP proof on every request.

In: header

Path Parameters

id*string

The project.

slug*string

Lower-case letters, digits and dashes, at most 60.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/projects/v1/string/pictures/string" \  -H "Content-Type: application/json" \  -d '{    "spec": {      "version": 1,      "kind": "string",      "meta": {        "title": "string",        "property1": null,        "property2": null      },      "property1": null,      "property2": null    },    "svg": "string",    "look": "string"  }'
{}
GET/projects/v1/{id}/pictures/{slug}/previous

One step back, whole: its spec and SVG.

Authorization

AuthorizationBearer <token>

A device access token from the device-code flow (aioe_at_…). A DPoP-bound token is sent as Authorization: DPoP <token> with a fresh DPoP proof on every request.

In: header

Path Parameters

id*string

The project.

slug*string

The picture.

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/projects/v1/string/pictures/string/previous"
{}