App name
Instance parameter definitions
URL where the root HTML document of the app can be found
System metadata
Free-form installation parameters (API limits stringified length to 16kB)
Archives the object
Object returned from the server with updated metadata.
Deletes this object on the server.
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Checks if asset is archived. This means it's not exposed to the Delivery/Preview APIs.
Checks if the asset is in draft mode. This means it is not published.
Checks if the asset is published. A published asset might have unpublished changes
Checks if the asset is updated. This means the asset was previously published but has unpublished changes.
Triggers asset processing after an upload, for the files uploaded to all locales of an asset.
Additional options for processing
Object returned from the server with updated metadata.
Triggers asset processing after an upload, for the file uploaded to a specific locale.
Locale which processing should be triggered for
Object returned from the server with updated metadata.
Publishes the object
Object returned from the server with updated metadata.
Unarchives the object
Object returned from the server with updated metadata.
Unpublishes the object
Object returned from the server with updated metadata.
Sends an update to the server with any changes made to the object's properties
Object returned from the server with updated changes.
Description for this asset
File object for this asset
Details for the file, depending on file type (example: image size in bytes, etc)
Url where the file is available to be downloaded from, into the Contentful asset system. After the asset is processed this field is gone.
Url where the file is available at the Contentful media asset system. This field won't be available until the asset is processed.
Title for this asset
Contentful CMA Access Token
Application name and version e.g myApp/version
Optional additional headers
API host
direct file upload host
Optional Node.js HTTP agent for proxying
Optional Node.js HTTP agent for proxying
Requests will be made over http instead of the default https
Integration name and version e.g react/version
A log handler function to process given log messages & errors. Receives the log level (error, warning & info) and the actual log data (Error object or string).
Optional maximum content length in bytes
Optional Axios proxy
Gets called on every request triggered by the SDK
Gets called on every response
Optional number of retries before failure
If we should retry on errors and 429 rate limit exceptions
Optional number of milliseconds before the request times out.
Deletes this object on the server.
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Gets the editor interface for the object
Important note: The editor interface only represent a published contentType.
To get the most recent representation of the contentType make sure to publish it first
Object returned from the server with the current editor interface.
Gets a snapshot of a contentType
Id of the snapshot
Gets all snapshots of a contentType
Checks if the contentType is in draft mode. This means it is not published.
Checks if the contentType is published. A published contentType might have unpublished changes (@see {ContentType.isUpdated})
Checks if the contentType is updated. This means the contentType was previously published but has unpublished changes.
Omits and deletes a field if it exists on the contentType. This is a convenience method which does both operations at once and potentially less safe than the standard way. See note about deleting fields on the Update method.
Object returned from the server with updated metadata.
Publishes the object
Object returned from the server with updated metadata.
Unpublishes the object
Object returned from the server with updated metadata.
Sends an update to the server with any changes made to the object's properties.
Important note about deleting fields: The standard way to delete a field is with two updates: first omit the property from your responses (set the field attribute "omitted" to true), and then
delete it by setting the attribute "deleted" to true. See the "Deleting fields" section in the
API reference for more reasoning. Alternatively,
you may use the convenience method omitAndDeleteField to do both steps at once.
Object returned from the server with updated changes.
Field used as the main display field for Entries
All the fields contained in this Content Type
Array of fields and it's associated widgetId
Legacy singular editor override
Array of editors. Defaults will be used if property is missing.
Array of sidebar widgerts. Defaults will be used if property is missing.
Archives the object
Object returned from the server with updated metadata.
Deletes this object on the server.
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Gets a snapshot of an entry
Id of the snapshot
Gets all snapshots of an entry
Checks if entry is archived. This means it's not exposed to the Delivery/Preview APIs.
Checks if the entry is in draft mode. This means it is not published.
Checks if the entry is published. A published entry might have unpublished changes
Checks if the entry is updated. This means the entry was previously published but has unpublished changes.
Publishes the object
Object returned from the server with updated metadata.
Unarchives the object
Object returned from the server with updated metadata.
Unpublishes the object
Object returned from the server with updated metadata.
Sends an update to the server with any changes made to the object's properties
Object returned from the server with updated changes.
System meta data
Name of the environmant
System metadata
String will be in ISO8601 datetime format e.g. 2013-06-26T13:57:24Z
Locale code (example: en-us)
If the content under this locale should be available on the CDA (for public reading)
If the content under this locale should be available on the CMA (for editing)
If this is the default locale
Locale code to fallback to when there is not content for the current locale
Internal locale code
Locale name
If the locale needs to be filled in on entries or not
Role
status
System metadata
Name
System metadata
Permissions for application sections
an ISO8601 date string representing when an action was moved to canceled
User is an admin
Array of Role Links
User is an admin
Is admin
Organization membership id
System metadata
Description of the team
Name of the team
System metadata
Is admin
Roles
System metadata
Field types where an extension can be used
Extension name
Parameter definitions
Controls the location of the extension. If true it will be rendered on the sidebar instead of replacing the field's editing control
URL where the root HTML document of the extension can be found
String representation of the extension (e.g. inline HTML code)
Values for installation parameters
System metadata
Range of usage
Type of usage
System metadata
Unit of usage metric
Value of the usage
Usage per day
Activation flag
Url to the users avatar
User confirmation flag
Email address of the user
First name of the user
Last name of the user
Number of sign ins
System metadata
Errors
Type of the webhook
Request object
Timestamp of the request
Request object
Timestamp of the response
Status code of the request
System metadata
Url of the request
Webhook call statistics
System metadata
Webhook filters
Headers that should be appended to the webhook request
Password for basic http auth
Username for basic http auth
Webhook name
System metadata
Topics the webhook wants to subscribe to
Transformation to apply
Webhook url
Asset processing
Create a client instance
Client initialization parameters
const client = contentfulManagement.createClient({
accessToken: 'myAccessToken'
})
Creates a personal access token
personal access token config
Promise for a Token
Creates a space
Object representation of the Space to be created
Organization ID, if the associated token can manage more than one organization.
Promise for the newly created Space
Gets the authenticated user
Promise for a User
Gets an organization
Organization ID
Promise for a Organization
Get organization usage grouped by metric
Id of an organization
Query parameters
Promise of a collection of usages
Gets a collection of Organizations
Promise for a collection of Organizations
Gets a personal access token
Promise for a Token
Gets all personal access tokens
Promise for a Token
Gets a space
Space ID
Promise for a Space
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getSpace('<space_id>')
.then((space) => console.log(space))
.catch(console.error)
Get organization usage grouped by space and metric
Id of an organization
Query parameters
Promise of a collection of usages
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getSpaceUsage('<organizationId>', {
skip: 0,
limit: 10,
'metric[in]': 'cda,cpa,gql',
'dateRange.startAt': '2019-10-22',
'dateRange.endAt': '2020-11-30'
}
})
.then(result => console.log(result.items))
.catch(console.error)
Gets all spaces
Promise for a collection of Spaces
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.getSpaces()
.then((response) => console.log(response.items))
.catch(console.error)
Make a custom request to the Contentful management API's /spaces endpoint
axios request options (https://github.com/mzabriskie/axios)
Promise for the response data
const contentful = require('contentful-management')
const client = contentful.createClient({
accessToken: '<content_management_api_key>'
})
client.rawRequest({
method: 'GET',
url: '/custom/path'
})
.then((responseData) => console.log(responseData))
.catch(console.error)
Creates API object with methods to access the Environment API
Gets an App Installation
AppDefinition ID
AppInstallation data
Promise for an App Installation
Creates a Asset. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
Promise for the newly created Asset
Creates a Asset based on files. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
Object representation of the Asset to be created. Note that the field object should have an uploadFrom property on asset creation, which will be removed and replaced with an url property when processing is finished.
Promise for the newly created Asset
Creates a Asset with a custom ID. After creation, call asset.processForLocale or asset.processForAllLocales to start asset processing.
Asset ID
Object representation of the Asset to be created. Note that the field object should have an upload property on asset creation, which will be removed and replaced with an url property when processing is finished.
Promise for the newly created Asset
Creates a Content Type
Object representation of the Content Type to be created
Promise for the newly created Content Type
Creates a Content Type with a custom ID
Content Type ID
Object representation of the Content Type to be created
Promise for the newly created Content Type
Creates a Entry
The Content Type ID of the newly created Entry
Object representation of the Entry to be created
Promise for the newly created Entry
Creates a Entry with a custom ID
The Content Type of the newly created Entry
Entry ID
Object representation of the Entry to be created
Promise for the newly created Entry
Creates a Locale
Object representation of the Locale to be created
Promise for the newly created Locale
Creates a UI Extension
Object representation of the UI Extension to be created
Promise for the newly created UI Extension
Creates a UI Extension with a custom ID
Extension ID
Object representation of the UI Extension to be created
Promise for the newly created UI Extension
Creates a Upload.
Object with file information.
Upload object containing information about the uploaded file.
Deletes the environment
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Gets an App Installation
AppDefintion ID
Promise for an App Installation
Gets a collection of App Installation
Promise for a collection of App Installations
Gets an Asset Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend
Asset ID
Object with search parameters. In this method it's only useful for locale
.
Promise for an Asset
Creates SDK Asset object (locally) from entry data
Asset ID
Asset
Gets a collection of Assets Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Assets
Gets a Content Type
Content Type ID
Promise for a Content Type
Gets all snapshots of a contentType
Content Type ID
query additional query paramaters
Promise for a collection of Content Type Snapshots
Gets a collection of Content Types
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Content Types
Gets an EditorInterface for a ContentType
Content Type ID
Promise for an EditorInterface
Gets all EditorInterfaces
Promise for a collection of EditorInterface
Gets a collection of Entries Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Entries
Gets an Entry Warning: if you are using the select operator, when saving, any field that was not selected will be removed from your entry in the backend
Entry ID
Object with search parameters. In this method it's only useful for locale
.
Promise for an Entry
Creates SDK Entry object (locally) from entry data
Entry Data
Entry
Gets all snapshots of an entry
Entry ID
query additional query paramaters
Promise for a collection of Entry Snapshots
Gets a Locale
Locale ID
Promise for an Locale
Gets a collection of Locales
Promise for a collection of Locales
Gets an UI Extension
Extension ID
Promise for an UI Extension
Gets a collection of UI Extension
Promise for a collection of UI Extensions
Gets an Upload
Upload ID
Promise for an Upload
Updates the environment
Promise for the updated environment.
Creates API object with methods to access the Organization API
Creates an app definition
Promise for the newly created AppDefinition
Create an Invitation in Organization
Promise for a OrganizationInvitation in an organization
Creates a Team
representation of the Team to be created
Creates a Team membership
Id of the team the membership will be created in
Object representation of the Team Membership to be created
Promise for the newly created TeamMembership
Gets an app definition
Promise for an App Definition
Gets all app definitions
Promise for a collection of App Definitions
Gets an Invitation in Organization
Promise for a OrganizationInvitation in an organization
Gets an Organization Membership
Organization Membership ID
Promise for an Organization Membership
Gets a collection of Organization Memberships
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Organization Memberships
Gets an Space Membership in Organization
Organiztion Space Membership ID
Promise for a Space Membership in an organization
Gets a collection Space Memberships in organization
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a Space Membership collection across all spaces in the organization
Gets an Team
Gets an Team Membership from the team with given teamId
Promise for an Team Membership
Get all Team Memberships. If teamID is provided in the optional config object, it will return all Team Memberships in that team. By default, returns all team memberships for the organization.
Promise for a Team Membership Collection
Get a Team Space Membership with given teamSpaceMembershipId
Promise for a Team Space Membership
Get all Team Space Memberships. If teamID is provided in the optional config object, it will return all Team Space Memberships in that team. By default, returns all team space memberships across all teams in the organization.
Promise for a Team Space Membership Collection
Gets all Teams in an organization
Gets a User
Promise for a User
Gets a collection of Users in organization
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise a collection of Users in organization
Creates API object with methods to access the Space API
Creates a Api Key
Object representation of the Api Key to be created
Promise for the newly created Api Key
Creates a Api Key with a custom ID
Api Key ID
Object representation of the Api Key to be created
Promise for the newly created Api Key
Creates an Environement
Object representation of the Environment to be created
Promise for the newly created Environment
Creates an EnvironmentAlias with a custom ID
EnvironmentAlias ID
Object representation of the EnvironmentAlias to be created
Promise for the newly created EnvironmentAlias
Creates an Environment with a custom ID
Environment ID
Object representation of the Environment to be created
ID of the source environment that will be copied to create the new environment. Default is "master"
Promise for the newly created Environment
Creates a Role
Object representation of the Role to be created
Promise for the newly created Role
Creates a scheduled action
Object representation of the scheduled action to be created
Promise for the newly created scheduled actions
Creates a Space Membership Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
Object representation of the Space Membership to be created
Promise for the newly created Space Membership
Creates a Space Membership with a custom ID Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
Space Membership ID
Object representation of the Space Membership to be created
Promise for the newly created Space Membership
Creates a Team Space Membership
Object representation of the Team Space Membership to be created
Promise for the newly created Team Space Membership
Creates a Webhook
Object representation of the Webhook to be created
Promise for the newly created Webhook
Creates a Webhook with a custom ID
Webhook ID
Object representation of the Webhook to be created
Promise for the newly created Webhook
Deletes the space
Promise for the deletion. It contains no data, but the Promise error case should be handled.
Gets a Api Key
API Key ID
Promise for a Api Key
Gets a collection of Api Keys
Promise for a collection of Api Keys
Gets an environment
Promise for an Environment
Gets an Environment Alias
Promise for an Environment Alias
Gets a collection of Environment Aliases
Promise for a collection of Environment Aliases
Gets a collection of Environments
Promise for a collection of Environment
Gets a preview Api Key
Preview API Key ID
Promise for a Preview Api Key
Gets a collection of preview Api Keys
Promise for a collection of Preview Api Keys
Gets a Role
Role ID
Promise for a Role
Gets a collection of Roles
Promise for a collection of Roles
Query for scheduled actions in space.
Object with search parameters. The enviroment id field is mandatory. Check the REST API reference for more details.
Promise for the scheduled actions query
Gets a Space Member
Get Space Member by user_id
Promise for a Space Member
Gets a collection of Space Members
Promise for a collection of Space Members
Gets a Space Membership Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
Space Membership ID
Promise for a Space Membership
Gets a collection of Space Memberships Warning: the user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user).
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Space Memberships
Gets a User
User ID
Promise for a User
Gets a collection of Users in a space
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise a collection of Users in a space
Gets a Team Space Membership
Promise for a Team Space Membership
Gets a collection of Team Space Memberships
Object with search parameters. Check the JS SDK tutorial and the REST API reference for more details.
Promise for a collection of Team Space Memberships
Gets a Webhook
Webhook ID
Promise for a Webhook
Gets a collection of Webhooks
Promise for a collection of Webhooks
Updates the space
Promise for the updated space.
Locations where the app can be installed