younifyd
Menu

Update Preview Environment

Create a preview environment

PUT/spaces/{spaceId}/preview_environments/{resourceId}

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Update Preview Environment action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{updatePreviewEnvironment.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

resourceIdstringrequired

ID of the resource

Headers

X-Contentful-Versioninteger (int64)required

The version of the locale to update.

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

Name of the preview environment

descriptionstring

Description of the preview environment

configurationsarray<object>required

Configuration for the preview environment

contentTypestringrequired

Content type ID

enabledbooleanrequired

Whether the content type is enabled

exampleboolean
urlstringrequired

URL for the preview env of the content type

json
{
  "name": "string",
  "configurations": [
    {
      "contentType": "string",
      "enabled": false,
      "url": "string",
      "example": false
    }
  ],
  "description": "string"
}

Response

Returns 200 with an object. Read it in later steps with {{updatePreviewEnvironment.response.data.<field>}}.

namestring

Name of the preview environment

sysobject
descriptionstring

Description of the preview environment

configurationsarray<object>

Configuration for the preview environment

contentTypestringrequired

Content type ID

enabledbooleanrequired

Whether the content type is enabled

exampleboolean
urlstringrequired

URL for the preview env of the content type

json
{
  "name": "string",
  "sys": {},
  "configurations": [
    {
      "contentType": "string",
      "enabled": false,
      "url": "string",
      "example": false
    }
  ],
  "description": "string"
}

Need more? See the Contentful guide for connection setup and behaviour shared by every action.

Was this page helpful?
Update Preview Environment — Contentful — Documentation