> For the complete documentation index, see [llms.txt](https://docs.scaleflex.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scaleflex.com/digital-asset-management-dam/plugins-and-connectors/connectors/prismic.md).

# Prismic

Prismic Headless CMS integration

Instead of using the `/list` endpoint ([API documentation](https://developers.scaleflex.com/#43bfc74c-fd29-46be-83bf-b1e7bc8556e2)), this API supports Prismic's format directly.

This endpoint lists the assets with the following settings:

* 50 elements per pages
* ordered by last\_update

### Endpoint <a href="#od_7a4c8eea" id="od_7a4c8eea"></a>

**GET** {API\_SECRET\_KEY}@api.filerobot.com/{TOKEN}/integration/prismic/assets

| Property         | Description                                                                                                              |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------ |
| API\_SECRET\_KEY | can be generated in the Asset hub ([documentation](/vxp-visual-experience-platform/settings/project/access/api-keys.md)) |
| TOKEN            | your DAM token                                                                                                           |

### GET Parameters <a href="#od_fa47c38d" id="od_fa47c38d"></a>

| Parameter | Description                                                |
| --------- | ---------------------------------------------------------- |
| folder    | the path to the folder you would like to list default: `/` |
| page      | the result page number, starting from 1 default: `1`       |

### Examples <a href="#od_595cf1b4" id="od_595cf1b4"></a>

#### Request <a href="#od_d554c3ad" id="od_d554c3ad"></a>

Copy-paste the cURL request in your Terminal to see the API in action.

```
curl 'https://aecb26ec-f78f-4aec-a9f6-0fbaf38346b4@api.filerobot.com/fdocs/integration/prismic/assets?folder=/demo'
curl 'https://aecb26ec-f78f-4aec-a9f6-0fbaf38346b4@api.filerobot.com/fdocs/integration/prismic/assets?folder=/&page_num=4'
```

#### Response <a href="#od_00a53c18" id="od_00a53c18"></a>

The response format will look like this:

```
{
    "results_size": 81,
    "results": [
        {
            "id": "0de50f0c-d5dd-5a8c-ae96-9b8b32e500",
            "title": "c998f98fc77e833b3487b6e70dcbe0c7e62e7469cf1c572996d49e6c469e94.jpg",
            "description": "Some description colorful prismic_files",
            "image_url": "https://frtoksmp.filerobot.com/prismic_files/c998f98fce833b3487b6e70dcbe0c7e62e748969cf1c572996d49e6c469e94.jpg?vh=6aeec9&w=100&h=100&func=fit",
            "last_update": 1603813143000,
            "blob": {
                "name": "c998f98fc77e833b3487b6e70dcbe0c7e62e7469cf1c572996d49e6c469e94.jpg",
                "url": "https://frtoksmp.filerobot.com//prismic_files/c998f98fc77e833b3487b6e70dcbe0c7e62e7469cf1c572996d49e6c469e94.jpg?vh=6aeec9",
                "type": "image/jpeg",
                "size": 377727,
                "info": {
                    "img_h": 1000,
                    "img_w": 803,
                    "img_type": "JPEG"
                },
                "meta": {
                    "test key2": null,
                    "test key3": null,
                    "qa_tags": null
                    "tags": [
                        "colorful"
                    ],
                    "search": "Some description colorful prismic_files",
                    "description": "Some description"
                },
                "blurhash": null,
                "created_at": "2020-10-27T15:37:25Z",
                "modified_at": "2020-10-27T15:39:03Z"
            }
        },
        ...
    ]
}
```

Where:

* **results\_size** is the total counting of the listing result; and could be easily understood as the sum of `size(results)` of all pages, while each page contains a maximum of 50 files.
* **image\_url** is fixed to be resized to `100x100`
* **description** would be returned as a concatenation from `blob->meta->search` and `blob->meta->tags` and the parsed list of directories and sub-directories. In case the file doesn't have this field (and is at the root folder), it defaults to `No description for this file is available`.
