contentfulManagement

contentfulManagement

Source:
See:
Contentful Management API SDK. Allows you to create instances of a client with access to the Contentful Content Management API.

Methods

(static) createClient(params) → {ContentfulClientAPI.ClientAPI}

Source:
Properties:
Name Type Attributes Description
params.accessToken string <optional>
Contentful CDA Access Token
params.insecure boolean <optional>
<nullable>
Requests will be made over http instead of the default https (default: false)
params.retryOnError boolean <optional>
<nullable>
If we should retry on errors and 429 rate limit exceptions (default: true)
params.host string <optional>
<nullable>
API host (default: api.contentful.com)
params.hostUpload string <optional>
<nullable>
direct file upload host (default : upload.contentful.com)
params.httpAgent Object <optional>
<nullable>
Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)
params.httpsAgent Object <optional>
<nullable>
Optional Node.js HTTP agent for proxying (see Node.js docs and https-proxy-agent)
params.proxy Object <optional>
<nullable>
Optional Axios proxy (see axios docs )
params.headers object <optional>
<nullable>
Optional additional headers
params.logHandler function <optional>
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). (The default can be found at: https://github.com/contentful/contentful-sdk-core/blob/master/lib/create-http-client.js)
params.application string <optional>
<nullable>
Application name and version e.g myApp/version
params.integration string <optional>
<nullable>
Integration name and version e.g react/version
params.timeout number <optional>
Optional number of milliseconds before the request times out. Default is 30000
params.retryLimit number <optional>
Optional number of retries before failure. Default is 5
params.maxContentLength number <optional>
Optional maximum content length in bytes (default: 1073741824 i.e. 1GB)
Create a client instance
Example
const client = contentfulManagement.createClient({
 accessToken: 'myAccessToken'
})
Parameters:
Name Type Description
params object Client initialization parameters
Returns:
Type
ContentfulClientAPI.ClientAPI