Skip to content

Commit a prepared project publication.

POST
/api/artifacts/publications/{id}/commit
curl --request POST \
--url https://example.com/api/artifacts/publications/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/commit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "assets": [ { "artifactId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "mediaType": "example", "name": "example", "sha256": "example", "sizeBytes": 1 } ], "bytes": 1, "document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "entry": { "artifactId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "mediaType": "example", "name": "example", "sha256": "example", "sizeBytes": 1 }, "expected_version": 1, "files": 1, "gallery_key": "example", "idempotency_key": "example", "mode": "example", "note": "example", "provenance": "example", "request_digest": "example", "title": "example", "type": "example", "uploads": 1 }'

Commit a prepared publication into a new artifact document or a new version of an existing one; a repeated commit returns the recorded result.

id
required
string format: uuid

Publication id

Media typeapplication/json
object
assets
required
Array<object>
object
artifactId
string | null format: uuid
mediaType
required
string
name
required
string
sha256
required
string
sizeBytes
required
integer format: int64
bytes
required
integer format: int64
document_id
string | null format: uuid
entry
required
object
artifactId
string | null format: uuid
mediaType
required
string
name
required
string
sha256
required
string
sizeBytes
required
integer format: int64
expected_version
integer | null format: int32
files
required
integer format: int32
gallery_key
string | null
idempotency_key
required
string
mode
required
string
note
string | null
provenance
object | null
request_digest
required
string
title
string | null
type

The document type (page, doc, deck, design): fixed by a publish, asserted by an update. Absent means page for a publish and no assertion for an update.

string | null
uploads
required
integer format: int32

Example generated

{
"assets": [
{
"artifactId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"mediaType": "example",
"name": "example",
"sha256": "example",
"sizeBytes": 1
}
],
"bytes": 1,
"document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"entry": {
"artifactId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"mediaType": "example",
"name": "example",
"sha256": "example",
"sizeBytes": 1
},
"expected_version": 1,
"files": 1,
"gallery_key": "example",
"idempotency_key": "example",
"mode": "example",
"note": "example",
"provenance": "example",
"request_digest": "example",
"title": "example",
"type": "example",
"uploads": 1
}

Project publication committed

Media typeapplication/json

The committed publication: the document and version it produced. The same value is persisted as the publication’s replay result, so a repeated commit returns it byte for byte.

object
document_id
required
string format: uuid
project_id
required
string format: uuid
publication_id
required
string format: uuid
version
required
integer format: int32
view_url
required
string

Example generated

{
"document_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"publication_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"version": 1,
"view_url": "example"
}