# Contentstack

> Create, update, translate and publish entries and assets, and deploy releases in Contentstack.

App · 25 actions. Web page: https://docs.lodol.com/docs/integrations/contentstack

## Actions

### Add item to release

Add an entry or an asset to a release, to be published or unpublished when the release is deployed.

**Inputs**

- Release (`release_uid`, text, required): The release, whose ID starts with blt.
- Content type (`content_type_uid`, text): For an entry: its content type. Leave empty to add an asset.
- Entry or asset ID (`item_uid`, text, required): The entry or asset to add, by its ID.
- Action (`release_action`, text): Whether deploying the release publishes or unpublishes the item. One of: `publish`, `unpublish`. Default: `publish`.
- Language (`locale`, text): For an entry: the language to add. Leave empty for the entry's own language.
- Version (`version`, number): The version to add. Leave empty for the latest. At least 1.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example",
    "release": {
      "created_at": "example",
      "created_by": "example",
      "description": "example",
      "items": [
        {
          "action": "example",
          "content_type_uid": "example",
          "locale": "example",
          "title": "example",
          "uid": "example",
          "version": 1
        }
      ],
      "locked": true,
      "name": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    }
  }
}
```

### Create entry

Create an entry in a content type. It stays a draft until you publish it.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Title (`title`, text, required): The entry's title.
- Fields (`fields`, object): The entry's other fields, by field ID (shown in the content type), for example {"url": "/news/launch", "summary": "Our launch"}.
- Tags (`tags`, list): Tags for the entry.
- Language (`locale`, text): Create the entry in this language. Leave empty for the stack's main language.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "entry": {
      "_in_progress": true,
      "_version": 1,
      "created_at": "example",
      "created_by": "example",
      "locale": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    },
    "notice": "example"
  }
}
```

### Create release

Create a release, to gather entries and assets and publish them together.

**Inputs**

- Name (`name`, text, required): The release's name.
- Description (`description`, text): What the release is for.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example",
    "release": {
      "created_at": "example",
      "created_by": "example",
      "description": "example",
      "locked": true,
      "name": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    }
  }
}
```

### Delete asset

Delete an asset from the stack.

**Inputs**

- Asset (`asset_uid`, text, required): The asset (file), whose ID starts with blt.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Delete entry

Delete an entry. Contentstack keeps it in the stack's trash for a while.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Language (`locale`, text): Delete only this language's version. Leave empty for the main language.
- Delete all languages (`delete_all_localized`, true/false): Also delete every translated version of the entry.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Delete release

Delete a release. The entries and assets in it are not deleted.

**Inputs**

- Release (`release_uid`, text, required): The release, whose ID starts with blt.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Deploy release

Publish or unpublish everything in a release on environments, now or at a set time.

**Inputs**

- Release (`release_uid`, text, required): The release, whose ID starts with blt.
- Environments (`environments`, list, required): The environments to deploy to, such as production.
- Languages (`locales`, list): The languages to deploy. Leave empty for every language in the release.
- Action (`release_action`, text): Publish everything in the release (the default), or unpublish it. One of: `publish`, `unpublish`. Default: `publish`.
- Scheduled for (`scheduled_at`, date and time): When to deploy. Leave empty to deploy now.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Get asset

Get an asset's details, including its file address.

**Inputs**

- Asset (`asset_uid`, text, required): The asset (file), whose ID starts with blt.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "asset": {
      "_version": 1,
      "content_type": "example",
      "created_at": "example",
      "created_by": "example",
      "description": "example",
      "file_size": "example",
      "filename": "example",
      "is_dir": true,
      "parent_uid": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example",
      "url": "example"
    }
  }
}
```

### Get content type

Get a content type with its fields, so you can see each field's ID.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "content_type": {
      "_version": 1,
      "created_at": "example",
      "description": "example",
      "options": {
        "is_page": true,
        "singleton": true
      },
      "schema": [
        {
          "data_type": "example",
          "display_name": "example",
          "mandatory": true,
          "uid": "example"
        }
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example"
    }
  }
}
```

### Get entry

Get an entry with all its fields.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Language (`locale`, text): Get the entry in this language. Leave empty for the stack's main language.
- Version (`version`, number): Get this earlier version of the entry. Leave empty for the latest. At least 1.
- Include publish details (`include_publish_details`, true/false): Include where and when the entry was published.
- Include workflow stage (`include_workflow`, true/false): Include the entry's workflow stage.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "entry": {
      "_in_progress": true,
      "_version": 1,
      "_workflow": {
        "name": "example",
        "uid": "example"
      },
      "created_at": "example",
      "created_by": "example",
      "locale": "example",
      "publish_details": [
        {
          "environment": "example",
          "locale": "example",
          "time": "example"
        }
      ],
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    }
  }
}
```

### List assets

List the stack's assets (images, videos and other files), with the total count.

**Inputs**

- Order (`sort`, text): The order to list them in. Newest first by default. One of: `newest` (Newest first), `oldest` (Oldest first), `recently_updated` (Recently updated first).
- Limit (`limit`, number): How many assets to return, up to 100. From 1 to 100.
- Skip (`skip`, number): How many assets to skip, to read the next page. At least 0.
- Include publish details (`include_publish_details`, true/false): Include where and when each asset was published.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "assets": [
      {
        "_version": 1,
        "content_type": "example",
        "created_at": "example",
        "created_by": "example",
        "description": "example",
        "file_size": "example",
        "filename": "example",
        "is_dir": true,
        "parent_uid": "example",
        "publish_details": [
          {
            "environment": "example",
            "locale": "example",
            "time": "example"
          }
        ],
        "tags": [
          "example"
        ],
        "title": "example",
        "uid": "example",
        "updated_at": "example",
        "updated_by": "example",
        "url": "example"
      }
    ],
    "count": 1
  }
}
```

### List content types

List the stack's content types, such as Blog post or Page, with their fields.

**Inputs**

- Limit (`limit`, number): How many content types to return, up to 100. From 1 to 100.
- Skip (`skip`, number): How many content types to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "content_types": [
      {
        "_version": 1,
        "created_at": "example",
        "description": "example",
        "options": {
          "is_page": true,
          "singleton": true
        },
        "schema": [
          {
            "data_type": "example",
            "display_name": "example",
            "mandatory": true,
            "uid": "example"
          }
        ],
        "title": "example",
        "uid": "example",
        "updated_at": "example"
      }
    ],
    "count": 1
  }
}
```

### List entries

List the entries of a content type, with the total count.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Language (`locale`, text): List the entries in this language. Leave empty for the stack's main language.
- Filter (`filter`, object): Only entries whose fields match, for example {"url": "/about"}. Contentstack's query operators such as $in and $regex work too.
- Order (`sort`, text): The order to list them in. Newest first by default. One of: `newest` (Newest first), `oldest` (Oldest first), `recently_updated` (Recently updated first).
- Limit (`limit`, number): How many entries to return, up to 100. From 1 to 100.
- Skip (`skip`, number): How many entries to skip, to read the next page. At least 0.
- Include publish details (`include_publish_details`, true/false): Include where and when each entry was published.
- Include workflow stage (`include_workflow`, true/false): Include each entry's workflow stage.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "count": 1,
    "entries": [
      {
        "_in_progress": true,
        "_version": 1,
        "_workflow": {
          "name": "example",
          "uid": "example"
        },
        "created_at": "example",
        "created_by": "example",
        "locale": "example",
        "publish_details": [
          {
            "environment": "example",
            "locale": "example",
            "time": "example"
          }
        ],
        "tags": [
          "example"
        ],
        "title": "example",
        "uid": "example",
        "updated_at": "example",
        "updated_by": "example"
      }
    ]
  }
}
```

### List environments

List the stack's publishing environments, such as development and production.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "count": 1,
    "environments": [
      {
        "_version": 1,
        "created_at": "example",
        "name": "example",
        "uid": "example",
        "updated_at": "example",
        "urls": [
          {
            "locale": "example",
            "url": "example"
          }
        ]
      }
    ]
  }
}
```

### List languages

List the languages the stack's content is written in, with their codes.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "count": 1,
    "locales": [
      {
        "code": "example",
        "created_at": "example",
        "fallback_locale": "example",
        "name": "example",
        "uid": "example",
        "updated_at": "example"
      }
    ]
  }
}
```

### List releases

List the stack's releases: sets of entries and assets published together.

**Inputs**

- Limit (`limit`, number): How many releases to return, up to 100. From 1 to 100.
- Skip (`skip`, number): How many releases to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "count": 1,
    "releases": [
      {
        "created_at": "example",
        "created_by": "example",
        "description": "example",
        "locked": true,
        "name": "example",
        "uid": "example",
        "updated_at": "example",
        "updated_by": "example"
      }
    ]
  }
}
```

### List taxonomies

List the stack's taxonomies, the shared sets of terms used to classify entries.

**Inputs**

- Limit (`limit`, number): How many taxonomies to return, up to 100. From 1 to 100.
- Skip (`skip`, number): How many taxonomies to skip, to read the next page. At least 0.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "count": 1,
    "taxonomies": [
      {
        "created_at": "example",
        "description": "example",
        "name": "example",
        "uid": "example",
        "updated_at": "example"
      }
    ]
  }
}
```

### Localize entry

Translate an entry into another language, giving it that language's own title and fields.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Language (`locale`, text, required): The language to translate the entry into, such as fr-fr.
- Title (`title`, text, required): The entry's title.
- Fields (`fields`, object): The entry's other fields, by field ID (shown in the content type), for example {"url": "/news/launch", "summary": "Our launch"}.
- Tags (`tags`, list): Tags for the entry.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "entry": {
      "_in_progress": true,
      "_version": 1,
      "created_at": "example",
      "created_by": "example",
      "locale": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    },
    "notice": "example"
  }
}
```

### Publish asset

Publish an asset to environments, now or at a set time.

**Inputs**

- Asset (`asset_uid`, text, required): The asset (file), whose ID starts with blt.
- Environments (`environments`, list, required): The environments to publish to, such as production.
- Languages (`locales`, list, required): The languages to publish to.
- Scheduled for (`scheduled_at`, date and time): When to publish to. Leave empty to do it now.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Publish entry

Publish an entry's latest version to environments, now or at a set time.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Environments (`environments`, list, required): The environments to publish to, such as production.
- Languages (`locales`, list, required): The languages to publish to.
- Scheduled for (`scheduled_at`, date and time): When to publish to. Leave empty to do it now.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Unlocalize entry

Remove an entry's own content in one language, so that language shows the content of the language it falls back to.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Language (`locale`, text, required): The language to unlocalize.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Unpublish asset

Take an asset off environments, now or at a set time.

**Inputs**

- Asset (`asset_uid`, text, required): The asset (file), whose ID starts with blt.
- Environments (`environments`, list, required): The environments to unpublish from, such as production.
- Languages (`locales`, list, required): The languages to unpublish from.
- Scheduled for (`scheduled_at`, date and time): When to unpublish from. Leave empty to do it now.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Unpublish entry

Take an entry off environments, now or at a set time.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Environments (`environments`, list, required): The environments to unpublish from, such as production.
- Languages (`locales`, list, required): The languages to unpublish from.
- Scheduled for (`scheduled_at`, date and time): When to unpublish from. Leave empty to do it now.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "notice": "example"
  }
}
```

### Update entry

Change an entry's title, tags or fields. Fields left out keep their values.

**Inputs**

- Content type (`content_type_uid`, text, required): The content type, such as Blog post or Page.
- Entry (`entry_uid`, text, required): The entry, whose ID starts with blt.
- Title (`title`, text): The entry's title.
- Fields (`fields`, object): The entry's other fields, by field ID (shown in the content type), for example {"url": "/news/launch", "summary": "Our launch"}.
- Tags (`tags`, list): Tags for the entry.
- Language (`locale`, text): Update the entry in this language. Leave empty for the stack's main language.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "entry": {
      "_in_progress": true,
      "_version": 1,
      "created_at": "example",
      "created_by": "example",
      "locale": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example"
    },
    "notice": "example"
  }
}
```

### Upload asset

Upload a file to the stack's assets, from a file or a public link.

**Inputs**

- File (`file`, text, required): The file to upload, or a public link to it.
- Title (`title`, text): A title for the asset. Leave empty to use the file name.
- Description (`description`, text): A description of the asset.
- Tags (`tags`, text): Tags for the asset, separated by commas.
- Folder ID (`folder_uid`, text): The folder to put the asset in, by its ID. Leave empty for the top level.

**Outputs**

- `data` (object): The response from Contentstack.

**Example output**

```json
{
  "data": {
    "asset": {
      "_version": 1,
      "content_type": "example",
      "created_at": "example",
      "created_by": "example",
      "description": "example",
      "file_size": "example",
      "filename": "example",
      "is_dir": true,
      "parent_uid": "example",
      "tags": [
        "example"
      ],
      "title": "example",
      "uid": "example",
      "updated_at": "example",
      "updated_by": "example",
      "url": "example"
    },
    "notice": "example"
  }
}
```
