Skip to content

Latest commit

 

History

History
93 lines (78 loc) · 2.9 KB

File metadata and controls

93 lines (78 loc) · 2.9 KB

AEM HEADLESS SDK API Reference

Classes

AEMHeadless

This class provides methods to call AEM GraphQL APIs. Before calling any method initialize the instance with GraphQL endpoint, GraphQL serviceURL and auth if needed

Functions

getToken(credentialsFilePath)Promise.<any>

Returns a Promise that resolves with a credentials JSON data.

AEMHeadless

This class provides methods to call AEM GraphQL APIs. Before calling any method initialize the instance with GraphQL endpoint, GraphQL serviceURL and auth if needed

Kind: global class

new AEMHeadless(config)

Constructor.

If param is a string, it's treated as AEM server URL, default GraphQL endpoint is used. For granular params, use config object

ParamTypeDescription
configstring | object

Configuration object, or AEM server URL string

[config.serviceURL]string

AEM server URL

[config.endpoint]string

GraphQL endpoint

[config.auth]string | Array

Bearer token string or [user,pass] pair array

[config.fetch]object

custom Fetch instance - default @adobe/aio-lib-core-networking

getToken(credentialsFilePath) ⇒ Promise.<any>

Returns a Promise that resolves with a credentials JSON data.

Kind: global function
Returns: Promise.<any> - the response body wrapped inside a Promise

ParamTypeDescription
credentialsFilePathstring

credentials config file path (serviceToken or devToken content)

For detailed methods usage, check https://github.com/adobe/aem-headless-client-js