v1

latestOpenAPI 3.0.02026-07-2417611.8 MB
Authoring layouts

Retrieves the layouts associated with the specified content.

Use the /layouts/by-content/{contentId} endpoint to retrieve the layouts associated with the specified content. When the 'filter' query string parameter is set to 'selected', only the selected layout (which could be a content override) is returned.<br />User roles: admin, manager, editor, viewer

get/authoring/v1/layouts/by-content/{content-id}

Path parameters

content-idstring required

The ID of the content whose associated layouts should be returned.

Query parameters

projectIdstring

Optionally specifies the context for draft overlay. Contains the project id, or special values: * draft for standalone draft overlays * none for no project overlay.

When both the 'projectId' query-string parameter AND the 'x-ibm-dx-project-id' header are specified, the 'projectId' query-string parameter will override the 'x-ibm-dx-project-id' header.

filterstring

An optional filter to control the returned results. Valid options are: * selected: Indicates that only the selected layout should be returned.

offsetnumber

Use the offset parameter to specify the number of layouts to skip and return the rest.

limitnumber

Set the limit for the number of layouts that are returned.

fieldsstring

Only the layout fields that are specified here are returned for each result. Any layout field is a valid value and can be specified as a comma-separated list.

Headers

x-ibm-dx-project-idstring

Optionally specifies the context for draft overlay. Contains the project id, or special values: * draft for standalone draft overlays * none for no project overlay.

When both the 'projectId' query-string parameter AND the 'x-ibm-dx-project-id' header are specified, the 'projectId' query-string parameter will override the 'x-ibm-dx-project-id' header.

Response

Success.

offsetinteger

number of results to skip.

limitinteger

number of results to return.

hrefstring

the url of the current query.

nextstring

the url for the next page of results. Only present if there are more results.

previousstring

the url for the previous page of results. Not present when on the first page.

Example response

{
  "items": [
    {
      "id": "f26044ca-d92d-49e8-acd9-00563c1e0db9",
      "rev": "139c63397272172e73f52d22f22f606f6c",
      "name": "Sample layout",
      "description": "An example description of the sample layout",
      "path": "/myLayouts/SampleLayout.json",
      "creatorId": "8c622bbb-5f5b-45d4-89e1-fce1c054138f",
      "creator": "Thomas Watson",
      "lastModifierId": "8c622bbb-5f5b-45d4-89e1-fce1c054138f",
      "lastModifier": "Thomas Watson",
      "tags": [
        "news",
        "sample"
      ],
      "template": "/mytemplates/template.hbs",
      "templateType": "handlebars",
      "thumbnail": {
        "id": "6c622bbb-5f5b-45d4-89e1-fce1c054138f",
        "path": "/sales/images/hub.png",
        "url": "/authoring/v1/resources/d45c83a8-2738-48a2-89e1-35256ee16283.jpg"
      }
    }
  ]
}