Project Config Endpoint
Fetch a project's published configuration: its experiences, steps, and the link from each step to the Content Entry that backs it.
Request
GET /api/v1/projects/:projectId
| Parameter | In | Description |
|---|---|---|
projectId | path | The project to fetch config for. |
preview_token | query | Optional. With it, the endpoint returns the preview configuration, which are unpublished. |
Response
The response carries the project's experiences and steps. Each step includes layoutContentId, the reference to the Content Entry that backs that step's layout. Use it to know which experiences have content to fetch from the Experience Content endpoint.
| Field | Type | Description |
|---|---|---|
id | string | The project id. |
versionId | string | null | The published version id, or null on preview. |
steps[].layoutContentId | string | null | The Content Entry of this step, or null when the step has no content. |
Published content and preview content
For published content, versionId holds the ID of the published version. For preview
content, which you read with ?preview_token=..., versionId is null, because
there is no published version. See Preview, cache, and crawlers.
Example
curl https://api.picked.app/api/v1/projects/proj_123{
"id": "proj_123",
"versionId": "ver_456",
"steps": [
{
"id": "step_1",
"key": "hero",
"name": "Hero",
"layoutName": "HeroLayout",
"layoutContentId": "entry_789"
}
]
}Pass the config to serialize() on your server to produce an SSR snapshot. See Server Snapshot.
