Environments

Environments are used to isolate content from your projects across different channels or properties within your organization or business unit. For example, you may have environments for development, staging, and production, of a website. Environments allow you to publish content to each environment as needed in your content workflow.


get

List environments

List all environments in a project

Required attributes

projectId
string
Your projectId

Optional attributes

None
Request
get
/api/projects/:projectId/environments
Response

get

Retrieve an environment

Retrieves a single environment based on the provided environment ID

Required attributes

projectId
string
Your project ID
environmentId
string
The ID of the environment to retrieve

Optional attributes

None
Request
get
/api/projects/:projectId/environments/:environmentId
Response

post

Create an environment

Creates a new environment

Required attributes

projectId
string
Your project ID
title
string
The name of the new environment

Optional attributes

description
string
A description for the new environment
baseUrl
string
A base URL where your environment lives
theme
string
The theme color for your environment. Can be one of "slate", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "type", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"
tags
string[]
An array of tags to associate with your environment
Request
post
/api/projects/:projectId/environments
Response

patch

Update an environment

Updates attributes for an environment. Use caution when updating environment titles / names, as these are often used to associate your content with an environment in your application.

Required attributes

projectId
string
Your project ID
environmentId
string
The ID of the environment to update

Optional attributes

title
string
The name for the environment
description
string
A description for the environment
baseUrl
string
A base URL where your environment lives
theme
string
The theme color for your environment. Can be one of "slate", "zinc", "neutral", "stone", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "type", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose"
tags
string[]
An array of tags to associate with your environment
Request
patch
/api/projects/:projectId/environments/:environmentId
Response

delete

Delete an environment

Deletes an environment from your project. This method also unpublishes all content currently published to the selected environment. Use this method with caution as deleting an environment will remove any content that is currently living in the environment that you have associated with you application.

Required attributes

projectId
string
Your project ID
environmentId
string
The ID of the environment to remove

Optional attributes

None
Request
delete
/api/projects/:projectId/environments/:environmentId
Response
Last modified 7/6/2024, 5:26:08 PM