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

When the number of results for a request exceeds the allowed limit, the response will include a cursor. That value can then be sent via this parameter on a subsequent request to retrieve the next set of items.

Responses
200

OK

400

Bad Request. Indicates that the server cannot or will not process the request due to something that is perceived to be a client error. The Problem Details object will provide more information about the exact cause.

404

Not Found. Indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

406

Not Acceptable. 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

Internal Server Error. Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

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. Indicates that the server cannot or will not process the request due to something that is perceived to be a client error. The Problem Details object will provide more information about the exact cause.

403

Forbidden. Indicates that the server understood the request but refuses to fulfil it.

404

Not Found. Indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

415

Unsupported Media Type. Indicates that the origin server is refusing to service the request because the content is in a format not supported by this method on the target resource.

500

Internal Server Error. Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

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. Indicates that the server cannot or will not process the request due to something that is perceived to be a client error. The Problem Details object will provide more information about the exact cause.

404

Not Found. Indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

406

Not Acceptable. 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

Internal Server Error. Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

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": {
    },
  • "checkedOutBy": "user",
  • "validationStatus": [ ],
  • "fieldTags": [ ],
  • "metadata": {
    }
}

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. Indicates that the server cannot or will not process the request due to something that is perceived to be a client error. The Problem Details object will provide more information about the exact cause.

403

Forbidden. Indicates that the server understood the request but refuses to fulfil it.

404

Not Found. Indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

412

Precondition Failed. Indicates that one or more conditions given in the request header fields evaluated to false when tested on the server.

428

Precondition Required. Indicates that the origin server requires the request to be conditional.

500

Internal Server Error. Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

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. Indicates that the server cannot or will not process the request due to something that is perceived to be a client error. The Problem Details object will provide more information about the exact cause.

404

Not Found. Indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

500

Internal Server Error. Indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

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