- 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
- getToken(credentialsFilePath) ⇒
Promise.<any> Returns a Promise that resolves with a credentials JSON data.
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
Constructor.
If param is a string, it's treated as AEM server URL, default GraphQL endpoint is used. For granular params, use config object
| Param | Type | Description |
|---|---|---|
| config | string | 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 |
Returns a Promise that resolves with a credentials JSON data.
Kind: global function
Returns: Promise.<any> - the response body wrapped inside a Promise
| Param | Type | Description |
|---|---|---|
| credentialsFilePath | string | credentials config file path (serviceToken or devToken content) |
For detailed methods usage, check https://github.com/adobe/aem-headless-client-js