Fragment Variations

List a Content Fragment's Variations

This operation provides support for retrieving all the Variations 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}/variations
Request samples
Response samples
application/json
{
  • "items": [
    ],
  • "cursor": "string"
}

Create a Content Fragment Variation

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

Content Fragment unique identifier

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

Variation title

description
string

Variation description.

Responses
201

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.

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}/variations
Request samples
application/json
{
  • "title": "Summit 2023",
  • "description": "The Summit 2023 variation"
}
Response samples
application/json
{
  • "name": "another",
  • "title": "Summit 2023",
  • "description": "The Summit 2023 variation",
  • "fields": [
    ],
  • "tags": [ ],
  • "validationStatus": [ ],
  • "references": [
    ],
  • "fieldTags": [ ]
}

Get a Variation for a Content Fragment

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

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
name
required
string

The name of the Variation

Example: summit_2023
query Parameters
references
string (References)
Default: "direct-hydrated"

This parameter defines how references will be retrieved for Content Fragments. The following options are available:

  • direct - only direct references will be collected; they will not be hydrated;
  • direct-hydrated - only direct references will be collected; they will be fully hydrated;
  • all - all references up to the maximum allowed depth will be collected; they will not be hydrated;
  • all-hydrated - all references up to the maximum allowed depth will be collected; they will be fully hydrated

Non-hydrated responses will only include the properties defined by the BaseReference type when embedding references. Hydrated responses are defined by each implementation of the BaseReference type. In particular, for Content Fragment references the response will include the fragment's fields, variations, tags.

Enum: "direct" "direct-hydrated" "all" "all-hydrated"
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}/variations/{name}
Request samples
Response samples
application/json
{
  • "name": "another",
  • "title": "Summit 2023",
  • "description": "The Summit 2023 variation",
  • "fields": [
    ],
  • "tags": [ ],
  • "validationStatus": [ ],
  • "references": [
    ],
  • "fieldTags": [ ]
}

Edit a Content Fragment Variation

This operation allows editing a Content Fragment Variation. The changes are passed as JSON Patch documents.

Save conflicts are detected by leveraging conditional HTTP requests. When a conflict occurs, the server will reply with a 412 response. It becomes the caller's responsibility to resolve the conflict, either by accepting the values from the server, or by overwriting them.

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

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
name
required
string

The name of the Variation

Example: summit_2023
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.

Request Body schema: application/json-patch+json
required
Array
One of:

Adds the contents of the value parameter to the location indicated by the path parameter.

path
required
string non-empty

The location where information should be added

op
required
string >= 3 characters

Identifies this operation as an add operation

Value: "add"
required
string or number or Array of any or object

The information to place at the location indicated by the path parameter

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.

412

Precondition Failed

413

"The HTTP 413 Content Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field. Prior to RFC 9110 the response phrase for the status was Payload Too Large. That name is still widely used."

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.

428

Precondition Required

500

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

patch/cf/fragments/{fragmentId}/variations/{name}
Request samples
application/json-patch+json
[
  • {
    },
  • {
    },
  • {
    }
]
Response samples
application/json
{
  • "name": "another",
  • "title": "Title has been replaced",
  • "description": "The Summit 2023 variation",
  • "fields": [
    ],
  • "tags": [ ]
}

Delete a Content Fragment Variation

This operation deletes a Content Fragment Variation.

Deletes are based on conditional HTTP requests. When a conflict occurs, the server will reply with a 412 response.

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

Content Fragment unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
name
required
string

The name of the Variation

Example: summit_2023
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}/variations/{name}
Request samples
Response samples
application/problem+json
{}

Get the tree of references contained in a Content Fragment Variation

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

Resource unique identifier

Example: 49af775d-0e7a-46c3-913d-00f762528373
name
required
string

The name of the variation

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}/variations/{name}/references
Request samples
Response samples
application/json
{
  • "items": [
    ]
}