Fragment Versioning

List a Content Fragment's Versions

This operation provides support for retrieving all the Versions of a Content Fragment. By default this call will return a maximum of 50 items.

The caller can define other limits suited to their application (see the limit query parameter), but the limit cannot be higher than 50. To ask for the next set of items pass the value of the cursor provided in the response to the cursor query parameter.

SecuritybearerAuth
Request
path Parameters
fragmentId
required
string <uuid> (UUID)

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
query Parameters
limit
integer <int32> (Limit) [ 1 .. 50 ]

For a paginated request, this parameter defines the maximum number of items to retrieve.

cursor
string (Cursor) non-empty

For a paginated request, this parameter defines the cursor from which to retrieve the next set of items.

Responses
200

OK

400

Bad Request. The Problem Details object will provide more information about the exact cause.

404

Not Found

406

Unacceptable. indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/fragments/{fragmentId}/versions
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

Create a Version for a Content Fragment

SecuritybearerAuth
Request
path Parameters
fragmentId
required
string <uuid> (UUID)

Resource unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
Request Body schema: application/json

Request payload to create a content fragment version.

label
string

Content Fragment version label.

comment
string

Content Fragment version comment.

Responses
201

The Content Fragment Version was successfully created.

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

404

Not Found

415

Unsupported Media Type. When provided as a response to a PATCH request, the response will provide an Accept-Patch response header to notify the client what patch document media types are supported.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/cf/fragments/{fragmentId}/versions
Request samples
application/json
{
  • "label": "first version",
  • "comment": "v1"
}
Response samples
application/problem+json
{}

Get a Version for a Content Fragment

SecuritybearerAuth
Request
path Parameters
fragmentId
required
string <uuid> (UUID)

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
versionId
required
string <uuid> (UUID)

Content Fragment Version unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
Responses
200

OK

400

Bad Request. The Problem Details object will provide more information about the exact cause.

404

Not Found

406

Unacceptable. indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

get/cf/fragments/{fragmentId}/versions/{versionId}
Request samples
Response samples
application/json
{
  • "path": "/content/dam/wknd-shared/en/contributors/ian-provo",
  • "title": "Ian Provo",
  • "description": "",
  • "id": "6d980e6a-c9e7-444b-af43-5503c46a061c",
  • "created": {
    },
  • "modified": {
    },
  • "status": "DRAFT",
  • "fields": [
    ],
  • "variations": [
    ],
  • "tags": [
    ],
  • "references": [
    ],
  • "model": {
    },
  • "validationStatus": [ ],
  • "fieldTags": [ ],
  • "etag": "79d1081c7b275f62a99ccd92828c4c83"
}

Delete a Content Fragment Version

SecuritybearerAuth
Request
path Parameters
fragmentId
required
string <uuid> (UUID)

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
versionId
required
string <uuid> (UUID)

Content Fragment Version unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
header Parameters
If-Match
required
string

The If-Match header field makes the request method conditional on the recipient origin server either having at least one current representation of the target resource, when the field value is "*", or having a current representation of the target resource that has an entity tag matching a member of the list of entity tags provided in the field value.

For more details, please head over to RFC9110.

Responses
204

No Content

400

Bad Request. The Problem Details object will provide more information about the exact cause.

403

Forbidden

404

Not Found

412

Precondition Failed

428

Precondition Required

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

delete/cf/fragments/{fragmentId}/versions/{versionId}
Request samples
Response samples
application/problem+json
{}

Restore a Content Fragment Version

This operation will replace the current version (named or not) of the indicated Content Fragment with the contents stored in the passed Version.

SecuritybearerAuth
Request
path Parameters
fragmentId
required
string <uuid> (UUID)

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
versionId
required
string <uuid> (UUID)

Content Fragment Version unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
Responses
200

OK

400

Bad Request. The Problem Details object will provide more information about the exact cause.

404

Not Found

500

The server encountered an unexpected error. Retrying the request after a certain time could help.

post/cf/fragments/{fragmentId}/versions/restore/{versionId}
Request samples
Response samples
application/problem+json
{}