Skip to content

Get Fragment by Id

GET /rest/asset/v2/fragment/{id}

Permissions Read-Only AssetsAccess Design StudioAccess Snippet

Build a request and mock the response

Method: GET
Path: /rest/asset/v2/fragment/{id}
Tag: Fragments (New)
Operation ID: getContentUsingGET_fragment

Retrieves a fragment by its ID. Required Permissions: Read-Only Assets, Access Design Studio, Access Snippet.

Formats

  • Request: Not specified
  • Response: application/json

Request

Path parameters

Name Type Required Description Constraints
id string Yes id

Query parameters

Name Type Required Description Constraints
access_token string Yes Token for Authorization

Header parameters

Name Type Required Description Constraints
x-app-type string Yes Application type header enum: marketo

Example request

GET {{base_url}}/rest/asset/v2/fragment/{{id}}?access_token={{access_token}}
x-app-type: marketo
Accept: application/json

Responses

200 — OK

Schema: model: FragmentNewResponse

Generated example

{
  "success": true,
  "requestId": "123",
  "result": [
    {
      "id": "123",
      "name": "Example name",
      "description": "string",
      "appType": "string",
      "metadata": {
        "createdBy": "string",
        "createdAt": "string",
        "createdById": "123",
        "createdByAepId": "123",
        "modifiedBy": "string",
        "modifiedAt": "string",
        "modifiedById": "123",
        "modifiedByAepId": "123"
      },
      "settings": {
        "fragmentType": "string",
        "fragmentSubType": "string",
        "supportedChannels": [
          "string"
        ]
      },
      "thumbnail": {
        "url": "https://example.com"
      },
      "status": "string",
      "state": "string",
      "virtualId": "123",
      "associatedStates": [
        {
          "contentId": "123",
          "externalId": "123",
          "state": "string"
        }
      ],
      "appData": {
        "editorType": "string",
        "folderId": "123",
        "workspaceId": "123"
      },
      "externalId": "123",
      "editorContext": {
        "dynamicContent": {}
      },
      "scriptEngine": "string",
      "themeId": "123",
      "data": {
        "html": {
          "body": "string"
        },
        "text": {
          "body": "string",
          "syncFromHtml": true
        }
      }
    }
  ]
}

Referenced models

default — Error

Schema: model: ErrorResponse

Generated example

{
  "success": true,
  "requestId": "123",
  "errors": [
    {
      "key": "string",
      "message": "string",
      "code": "string",
      "dynamicMessage": "string",
      "type": "string",
      "source": "string",
      "errorMessage": "string",
      "errorPosition": {
        "line": 123,
        "column": 123
      }
    }
  ]
}

Referenced models

Source

Generated from swagger-asset.json.

Generated examples are inferred from the schema. They are illustrative and may not be valid production payloads.