An open API service indexing awesome lists of open source software.

https://github.com/adobe/aio-lib-console

Adobe I/O Javascript SDK wrapping Adobe Developer Console APIs
https://github.com/adobe/aio-lib-console

adobe adobe-io adobeio developer-console nodejs npm opendev serverless

Last synced: 2 months ago
JSON representation

Adobe I/O Javascript SDK wrapping Adobe Developer Console APIs

Awesome Lists containing this project

README

          

[![Version](https://img.shields.io/npm/v/@adobe/aio-lib-console.svg)](https://npmjs.org/package/@adobe/aio-lib-console)
[![Downloads/week](https://img.shields.io/npm/dw/@adobe/aio-lib-console.svg)](https://npmjs.org/package/@adobe/aio-lib-console)
[![Build Status](https://travis-ci.com/adobe/aio-lib-console.svg?branch=master)](https://travis-ci.com/adobe/aio-lib-console)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Codecov Coverage](https://img.shields.io/codecov/c/github/adobe/aio-lib-console/master.svg?style=flat-square)](https://codecov.io/gh/adobe/aio-lib-console/)

# Adobe I/O Console SDK Library

### Installing

```bash
$ npm install @adobe/aio-lib-console
```

### Usage
1) Initialize the SDK

```javascript
const sdk = require('@adobe/aio-lib-console')

async function sdkTest() {
//initialize sdk
const client = await sdk.init('', 'x-api-key')
}
```

2) Call methods using the initialized SDK

```javascript
const sdk = require('@adobe/aio-lib-console')

async function sdkTest() {
// initialize sdk
const client = await sdk.init('', 'x-api-key')

// call methods
try {
// get... something
const result = await client.getOrganizations()
console.log(result)

} catch (e) {
console.error(e)
}
}
```

## Classes


CoreConsoleAPI


This class provides methods to call your CoreConsoleAPI APIs.
Before calling any method, initialize the instance by calling the init method on it
with valid values for apiKey and accessToken



## Functions



createRequestOptions(apiKey, options)Array


Create request options compatible with the console swagger definition




requestInterceptorBuilder(coreConsoleAPIInstance, apihost)function


Build a swagger request interceptor for the console sdk




responseInterceptor(res)object


A swagger response interceptor for the console sdk




createCredentialDirect(url, accessToken, apiKey, certificate, name, description)object


Use axios lib to directly call console API to create credential




init(accessToken, apiKey, env, swaggerSpec)Promise.<CoreConsoleAPI>


Returns a Promise that resolves with a new CoreConsoleAPI object



## Typedefs



Response : object



ProjectDetails : object



WorkspaceDetails : object



AdobeIdIntegrationDetails : object



ExtensionIcon : object



ExtensionMedia : object



ExtensionDetails : object



ExtensionSubmissionDetails : object



ExtensionWorkspaceEndpoints : object



ExtensionWorkspaceServices : object



ExtensionWorkspaceDetails : object



ServiceInfo : object



SubscribeToServices : object



LicenseConfig : object



Role : object



OauthS2SIntegrationDetails : object


## CoreConsoleAPI
This class provides methods to call your CoreConsoleAPI APIs.
Before calling any method, initialize the instance by calling the `init` method on it
with valid values for apiKey and accessToken

**Kind**: global class

* [CoreConsoleAPI](#CoreConsoleAPI)
* [.init(accessToken, apiKey, env, swaggerSpec)](#CoreConsoleAPI+init) ⇒ [Promise.<CoreConsoleAPI>](#CoreConsoleAPI)
* [.getProjectsForOrg(organizationId)](#CoreConsoleAPI+getProjectsForOrg) ⇒ [Promise.<Response>](#Response)
* [.createFireflyProject(organizationId, projectDetails)](#CoreConsoleAPI+createFireflyProject) ⇒ [Promise.<Response>](#Response)
* [.createProject(organizationId, projectDetails)](#CoreConsoleAPI+createProject) ⇒ [Promise.<Response>](#Response)
* [.getWorkspacesForProject(organizationId, projectId)](#CoreConsoleAPI+getWorkspacesForProject) ⇒ [Promise.<Response>](#Response)
* [.deleteProject(organizationId, projectId)](#CoreConsoleAPI+deleteProject) ⇒ [Promise.<Response>](#Response)
* [.editProject(organizationId, projectId, projectDetails)](#CoreConsoleAPI+editProject) ⇒ [Promise.<Response>](#Response)
* [.getProject(organizationId, projectId)](#CoreConsoleAPI+getProject) ⇒ [Promise.<Response>](#Response)
* [.downloadWorkspaceJson(organizationId, projectId, workspaceId)](#CoreConsoleAPI+downloadWorkspaceJson) ⇒ [Promise.<Response>](#Response)
* [.createWorkspace(organizationId, projectId, workspaceDetails)](#CoreConsoleAPI+createWorkspace) ⇒ [Promise.<Response>](#Response)
* [.editWorkspace(organizationId, projectId, workspaceId, workspaceDetails)](#CoreConsoleAPI+editWorkspace) ⇒ [Promise.<Response>](#Response)
* [.getWorkspace(organizationId, projectId, workspaceId)](#CoreConsoleAPI+getWorkspace) ⇒ [Promise.<Response>](#Response)
* [.deleteWorkspace(organizationId, projectId, workspaceId)](#CoreConsoleAPI+deleteWorkspace) ⇒ [Promise.<Response>](#Response)
* [.getCredentials(organizationId, projectId, workspaceId)](#CoreConsoleAPI+getCredentials) ⇒ [Promise.<Response>](#Response)
* [.createOAuthServerToServerCredential(organizationId, projectId, workspaceId, name, description)](#CoreConsoleAPI+createOAuthServerToServerCredential) ⇒ [Promise.<Response>](#Response)
* [.getProjectInstallConfig(projectId)](#CoreConsoleAPI+getProjectInstallConfig) ⇒ [Promise.<Response>](#Response)
* [.createEnterpriseCredential(organizationId, projectId, workspaceId, certificate, name, description)](#CoreConsoleAPI+createEnterpriseCredential) ⇒ [Promise.<Response>](#Response)
* [.createAdobeIdCredential(organizationId, projectId, workspaceId, credentialDetails)](#CoreConsoleAPI+createAdobeIdCredential) ⇒ [Promise.<Response>](#Response)
* [.createAnalyticsCredential(organizationId, projectId, workspaceId, credentialDetails)](#CoreConsoleAPI+createAnalyticsCredential) ⇒ [Promise.<Response>](#Response)
* [.subscribeCredentialToServices(organizationId, projectId, workspaceId, credentialType, credentialId, serviceInfo)](#CoreConsoleAPI+subscribeCredentialToServices) ⇒ [Promise.<Response>](#Response)
* [.getWorkspaceForCredential(organizationId, credentialId)](#CoreConsoleAPI+getWorkspaceForCredential) ⇒ [Promise.<Response>](#Response)
* [.getProjectForWorkspace(organizationId, workspaceId)](#CoreConsoleAPI+getProjectForWorkspace) ⇒ [Promise.<Response>](#Response)
* ~~[.deleteCredential(organizationId, projectId, workspaceId, credentialType, credentialId)](#CoreConsoleAPI+deleteCredential) ⇒ [Promise.<Response>](#Response)~~
* [.deleteCredentialById(organizationId, projectId, workspaceId, credentialId)](#CoreConsoleAPI+deleteCredentialById) ⇒ [Promise.<Response>](#Response)
* [.getOrganizations()](#CoreConsoleAPI+getOrganizations) ⇒ [Promise.<Response>](#Response)
* [.getServicesForOrg(organizationId, sdkCodes)](#CoreConsoleAPI+getServicesForOrg) ⇒ [Promise.<Response>](#Response)
* [.getServicesForOrgV2(imsOrgId, sdkCodes)](#CoreConsoleAPI+getServicesForOrgV2) ⇒ [Promise.<Response>](#Response)
* [.checkOrgDevTerms(organizationId)](#CoreConsoleAPI+checkOrgDevTerms) ⇒ [Promise.<Response>](#Response)
* [.acceptOrgDevTerms(organizationId)](#CoreConsoleAPI+acceptOrgDevTerms) ⇒ [Promise.<Response>](#Response)
* [.getDevTerms()](#CoreConsoleAPI+getDevTerms) ⇒ [Promise.<Response>](#Response)
* [.createRuntimeNamespace(organizationId, projectId, workspaceId)](#CoreConsoleAPI+createRuntimeNamespace) ⇒ [Promise.<Response>](#Response)
* [.getPluginsForWorkspace(organizationId, projectId, workspaceId)](#CoreConsoleAPI+getPluginsForWorkspace) ⇒ [Promise.<Response>](#Response)
* [.getIntegrationsForOrg(organizationId)](#CoreConsoleAPI+getIntegrationsForOrg) ⇒ [Promise.<Response>](#Response)
* [.createEnterpriseIntegration(organizationId, certificate, name, description)](#CoreConsoleAPI+createEnterpriseIntegration) ⇒ [Promise.<Response>](#Response)
* [.createAdobeIdIntegration(organizationId, integrationDetails)](#CoreConsoleAPI+createAdobeIdIntegration) ⇒ [Promise.<Response>](#Response)
* [.updateAdobeIdIntegration(organizationId, integrationId, integrationDetails)](#CoreConsoleAPI+updateAdobeIdIntegration) ⇒ [Promise.<Response>](#Response)
* [.subscribeAdobeIdIntegrationToServices(organizationId, integrationId, serviceInfo)](#CoreConsoleAPI+subscribeAdobeIdIntegrationToServices) ⇒ [Promise.<Response>](#Response)
* [.subscribeEnterpriseIntegrationToServices(organizationId, integrationId, serviceInfo)](#CoreConsoleAPI+subscribeEnterpriseIntegrationToServices) ⇒ [Promise.<Response>](#Response)
* [.subscribeOAuthServerToServerIntegrationToServices(organizationId, credentialId, serviceInfo)](#CoreConsoleAPI+subscribeOAuthServerToServerIntegrationToServices) ⇒ [Promise.<Response>](#Response)
* [.getBindingsForIntegration(organizationId, integrationId)](#CoreConsoleAPI+getBindingsForIntegration) ⇒ [Promise.<Response>](#Response)
* [.uploadAndBindCertificate(organizationId, integrationId, certificate)](#CoreConsoleAPI+uploadAndBindCertificate) ⇒ [Promise.<Response>](#Response)
* [.deleteBinding(organizationId, integrationId, bindingId)](#CoreConsoleAPI+deleteBinding) ⇒ [Promise.<Response>](#Response)
* [.getIntegration(organizationId, integrationId)](#CoreConsoleAPI+getIntegration) ⇒ [Promise.<Response>](#Response)
* [.getIntegrationSecrets(organizationId, integrationId)](#CoreConsoleAPI+getIntegrationSecrets) ⇒ [Promise.<Response>](#Response)
* [.deleteIntegration(organizationId, integrationId)](#CoreConsoleAPI+deleteIntegration) ⇒ [Promise.<Response>](#Response)
* [.createIMSOrg()](#CoreConsoleAPI+createIMSOrg) ⇒ [Promise.<Response>](#Response)
* [.getAtlasApplicationPolicy(organizationId, integrationId)](#CoreConsoleAPI+getAtlasApplicationPolicy) ⇒ [Promise.<Response>](#Response)
* [.getAtlasQuotaUsage(organizationId, integrationId)](#CoreConsoleAPI+getAtlasQuotaUsage) ⇒ [Promise.<Response>](#Response)
* [.getAllExtensionPoints(organizationId, [xpId], [options])](#CoreConsoleAPI+getAllExtensionPoints) ⇒ [Promise.<Response>](#Response)
* [.getApplicationExtensions(organizationId, applicationId)](#CoreConsoleAPI+getApplicationExtensions) ⇒ [Promise.<Response>](#Response)
* [.getEndPointsInWorkspace(organizationId, projectId, workspaceId)](#CoreConsoleAPI+getEndPointsInWorkspace) ⇒ [Promise.<Response>](#Response)
* [.updateEndPointsInWorkspace(organizationId, projectId, workspaceId, endpointDetails)](#CoreConsoleAPI+updateEndPointsInWorkspace) ⇒ [Promise.<Response>](#Response)
* [.getSDKProperties(organizationId, integrationId, sdkCode)](#CoreConsoleAPI+getSDKProperties) ⇒ [Promise.<Response>](#Response)
* [.createOauthS2SCredentialIntegration(organizationId, integrationDetails)](#CoreConsoleAPI+createOauthS2SCredentialIntegration) ⇒ [Promise.<Response>](#Response)
* [.getWorkspaceInfoForRuntimeNamespace(organizationId, namespace)](#CoreConsoleAPI+getWorkspaceInfoForRuntimeNamespace) ⇒ [Promise.<Response>](#Response)

### coreConsoleAPI.init(accessToken, apiKey, env, swaggerSpec) ⇒ [Promise.<CoreConsoleAPI>](#CoreConsoleAPI)
Initializes a CoreConsoleAPI object and returns it

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<CoreConsoleAPI>](#CoreConsoleAPI) - a CoreConsoleAPI object

| Param | Type | Description |
| --- | --- | --- |
| accessToken | string | the access token corresponding to an integration or user token |
| apiKey | string | api key to access the Developer Console |
| env | string | The name of the environment. `prod` and `stage` are the only values supported. `prod` is default and any value other than `prod` or `stage` it is assumed to be the default value of `prod`. If not set, it will get the global cli env value. See https://github.com/adobe/aio-lib-env (which defaults to `prod` as well if not set) |
| swaggerSpec | object | the swagger spec for the API (optional) |

### coreConsoleAPI.getProjectsForOrg(organizationId) ⇒ [Promise.<Response>](#Response)
Get all Projects in an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |

### coreConsoleAPI.createFireflyProject(organizationId, projectDetails) ⇒ [Promise.<Response>](#Response)
Create a new App Builder Project (from template) in an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectDetails | [ProjectDetails](#ProjectDetails) | Project details including name, title, who_created, description and type |

### coreConsoleAPI.createProject(organizationId, projectDetails) ⇒ [Promise.<Response>](#Response)
Create a new Project in an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectDetails | [ProjectDetails](#ProjectDetails) | Project details including name, title, who_created, description and type |

### coreConsoleAPI.getWorkspacesForProject(organizationId, projectId) ⇒ [Promise.<Response>](#Response)
Get all Workspaces for a Project

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |

### coreConsoleAPI.deleteProject(organizationId, projectId) ⇒ [Promise.<Response>](#Response)
Delete a Project

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |

### coreConsoleAPI.editProject(organizationId, projectId, projectDetails) ⇒ [Promise.<Response>](#Response)
Edit a Project

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| projectDetails | [ProjectDetails](#ProjectDetails) | Project details including name, title, who_created, description and type |

### coreConsoleAPI.getProject(organizationId, projectId) ⇒ [Promise.<Response>](#Response)
Get a Project by ID

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |

### coreConsoleAPI.downloadWorkspaceJson(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Download the Workspace Configuration File (json)

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.createWorkspace(organizationId, projectId, workspaceDetails) ⇒ [Promise.<Response>](#Response)
Create a new Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceDetails | [WorkspaceDetails](#WorkspaceDetails) | Workspace details including name, title, who_created, description, type and quotaRule |

### coreConsoleAPI.editWorkspace(organizationId, projectId, workspaceId, workspaceDetails) ⇒ [Promise.<Response>](#Response)
Edit a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| workspaceDetails | [WorkspaceDetails](#WorkspaceDetails) | Workspace details including name, title, who_created, description, type and quotaRule |

### coreConsoleAPI.getWorkspace(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Get a Workspace by ID

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.deleteWorkspace(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Delete a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.getCredentials(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Get all credentials for a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.createOAuthServerToServerCredential(organizationId, projectId, workspaceId, name, description) ⇒ [Promise.<Response>](#Response)
Create a new OAuth Server-to-Server Credential for a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| name | string | Credential name |
| description | string | Credential description |

### coreConsoleAPI.getProjectInstallConfig(projectId) ⇒ [Promise.<Response>](#Response)
Get the install config for an Adobe Developer Console project

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| projectId | string | Project ID |

### coreConsoleAPI.createEnterpriseCredential(organizationId, projectId, workspaceId, certificate, name, description) ⇒ [Promise.<Response>](#Response)
Create a new Enterprise Credential for a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| certificate | object | A Readable stream with certificate content. eg: fs.createReadStream() |
| name | string | Credential name |
| description | string | Credential description |

### coreConsoleAPI.createAdobeIdCredential(organizationId, projectId, workspaceId, credentialDetails) ⇒ [Promise.<Response>](#Response)
Create a new AdobeID Credential for a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| credentialDetails | [AdobeIdIntegrationDetails](#AdobeIdIntegrationDetails) | Credential details |

### coreConsoleAPI.createAnalyticsCredential(organizationId, projectId, workspaceId, credentialDetails) ⇒ [Promise.<Response>](#Response)
Create a new Analytics Credential for a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| credentialDetails | [AdobeIdIntegrationDetails](#AdobeIdIntegrationDetails) | Credential details |

### coreConsoleAPI.subscribeCredentialToServices(organizationId, projectId, workspaceId, credentialType, credentialId, serviceInfo) ⇒ [Promise.<Response>](#Response)
Subscribe a Workspace Credential to Services

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| credentialType | string | Credential type (adobeid, analytics or entp) |
| credentialId | string | Credential ID |
| serviceInfo | [Array.<ServiceInfo>](#ServiceInfo) | Information about the services like SDK Codes, licenseConfig and roles |

### coreConsoleAPI.getWorkspaceForCredential(organizationId, credentialId) ⇒ [Promise.<Response>](#Response)
Get the Workspace from a Credential ID

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| credentialId | string | Credential ID |

### coreConsoleAPI.getProjectForWorkspace(organizationId, workspaceId) ⇒ [Promise.<Response>](#Response)
Get the Project of a Workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| workspaceId | string | Workspace ID |

### ~~coreConsoleAPI.deleteCredential(organizationId, projectId, workspaceId, credentialType, credentialId) ⇒ [Promise.<Response>](#Response)~~
***Deprecated***

Delete a Workspace Credential

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| credentialType | string | Credential type (adobeid, analytics or entp). Unused. |
| credentialId | string | Credential ID |

### coreConsoleAPI.deleteCredentialById(organizationId, projectId, workspaceId, credentialId) ⇒ [Promise.<Response>](#Response)
Delete a Workspace Credential by credential id.

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| credentialId | string | Credential ID |

### coreConsoleAPI.getOrganizations() ⇒ [Promise.<Response>](#Response)
Get all Organizations

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

### coreConsoleAPI.getServicesForOrg(organizationId, sdkCodes) ⇒ [Promise.<Response>](#Response)
Get all Services available to an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| sdkCodes | string | comma separated list of sdk codes |

### coreConsoleAPI.getServicesForOrgV2(imsOrgId, sdkCodes) ⇒ [Promise.<Response>](#Response)
Get org services v2. Can be used for getting services for a user in an org irrespective of the user's role in the org.
They should just be a member. Also includes the information needed for requesting access to services that support it.

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| imsOrgId | string | IMS org id in format abc@AdobeOrg |
| sdkCodes | string | comma separated list of sdk codes |

### coreConsoleAPI.checkOrgDevTerms(organizationId) ⇒ [Promise.<Response>](#Response)
Check developer terms acceptance

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |

### coreConsoleAPI.acceptOrgDevTerms(organizationId) ⇒ [Promise.<Response>](#Response)
Accept developer terms

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |

### coreConsoleAPI.getDevTerms() ⇒ [Promise.<Response>](#Response)
Get developer terms

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

### coreConsoleAPI.createRuntimeNamespace(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Create an Adobe I/O Runtime namespace in the given workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.getPluginsForWorkspace(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Get plugins for workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.getIntegrationsForOrg(organizationId) ⇒ [Promise.<Response>](#Response)
Get Integrations for an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |

### coreConsoleAPI.createEnterpriseIntegration(organizationId, certificate, name, description) ⇒ [Promise.<Response>](#Response)
Create a new Enterprise Integration for an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| certificate | object | A Readable stream with certificate content. eg: fs.createReadStream() |
| name | string | Integration name |
| description | string | Integration description |

### coreConsoleAPI.createAdobeIdIntegration(organizationId, integrationDetails) ⇒ [Promise.<Response>](#Response)
Create a new AdobeID Integration for an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationDetails | [AdobeIdIntegrationDetails](#AdobeIdIntegrationDetails) | Integration details |

### coreConsoleAPI.updateAdobeIdIntegration(organizationId, integrationId, integrationDetails) ⇒ [Promise.<Response>](#Response)
Update an AdobeID Integration for an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID to update |
| integrationDetails | [AdobeIdIntegrationDetails](#AdobeIdIntegrationDetails) | Integration details |

### coreConsoleAPI.subscribeAdobeIdIntegrationToServices(organizationId, integrationId, serviceInfo) ⇒ [Promise.<Response>](#Response)
Subscribe Organization AdobeId Integration to Services

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |
| serviceInfo | object | Information about the services like SDK Codes, licenseConfig and roles |

### coreConsoleAPI.subscribeEnterpriseIntegrationToServices(organizationId, integrationId, serviceInfo) ⇒ [Promise.<Response>](#Response)
Subscribe Organization Enterprise Integration to Services

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |
| serviceInfo | object | Information about the services like SDK Codes, licenseConfig and roles |

### coreConsoleAPI.subscribeOAuthServerToServerIntegrationToServices(organizationId, credentialId, serviceInfo) ⇒ [Promise.<Response>](#Response)
Subscribe Organization OAuth Server-to-Server Integration to Services

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| credentialId | string | Credential ID |
| serviceInfo | object | Information about the services like SDK Codes, licenseConfig and roles |

### coreConsoleAPI.getBindingsForIntegration(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
List certification bindings for an Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.uploadAndBindCertificate(organizationId, integrationId, certificate) ⇒ [Promise.<Response>](#Response)
Upload and bind a certificate to an Organization Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |
| certificate | object | A Readable stream with certificate content. eg: fs.createReadStream() |

### coreConsoleAPI.deleteBinding(organizationId, integrationId, bindingId) ⇒ [Promise.<Response>](#Response)
Delete a certificate binding for an Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |
| bindingId | string | Binding ID |

### coreConsoleAPI.getIntegration(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
Get Integration details

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.getIntegrationSecrets(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
Get Integration secrets

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.deleteIntegration(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
Delete an Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.createIMSOrg() ⇒ [Promise.<Response>](#Response)
Create an IMS Org

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

### coreConsoleAPI.getAtlasApplicationPolicy(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
Get Application Atlas Policy for an Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.getAtlasQuotaUsage(organizationId, integrationId) ⇒ [Promise.<Response>](#Response)
Get Atlas quota usage for an Integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |

### coreConsoleAPI.getAllExtensionPoints(organizationId, [xpId], [options]) ⇒ [Promise.<Response>](#Response)
Get all available extension points

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Default | Description |
| --- | --- | --- | --- |
| organizationId | string | | Organization AMS ID |
| [xpId] | string | "firefly" | xp ID, default 'firefly' |
| [options] | object | | Get options |
| [options.offset] | number | | Offset |
| [options.pageSize] | number | | page size |

### coreConsoleAPI.getApplicationExtensions(organizationId, applicationId) ⇒ [Promise.<Response>](#Response)
Get Extensions for an App Builder application

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| applicationId | string | App Builder Application ID |

### coreConsoleAPI.getEndPointsInWorkspace(organizationId, projectId, workspaceId) ⇒ [Promise.<Response>](#Response)
Get endpoints in a workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |

### coreConsoleAPI.updateEndPointsInWorkspace(organizationId, projectId, workspaceId, endpointDetails) ⇒ [Promise.<Response>](#Response)
Update endpoints in a workspace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| projectId | string | Project ID |
| workspaceId | string | Workspace ID |
| endpointDetails | object | endpoint details |

### coreConsoleAPI.getSDKProperties(organizationId, integrationId, sdkCode) ⇒ [Promise.<Response>](#Response)
Get details about a service (SDK) subscribed to an integration

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationId | string | Integration ID |
| sdkCode | string | the service sdkCode to query (e.g. AdobeAnalyticsSDK) |

### coreConsoleAPI.createOauthS2SCredentialIntegration(organizationId, integrationDetails) ⇒ [Promise.<Response>](#Response)
Create a new oauth server to server credential for an Organization

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| integrationDetails | [OauthS2SIntegrationDetails](#OauthS2SIntegrationDetails) | Integration details |

### coreConsoleAPI.getWorkspaceInfoForRuntimeNamespace(organizationId, namespace) ⇒ [Promise.<Response>](#Response)
Returns workspace info for runtime namespace

**Kind**: instance method of [CoreConsoleAPI](#CoreConsoleAPI)
**Returns**: [Promise.<Response>](#Response) - the response

| Param | Type | Description |
| --- | --- | --- |
| organizationId | string | Organization AMS ID |
| namespace | string | Runtime namespace |

## createRequestOptions(apiKey, options) ⇒ Array
Create request options compatible with the console swagger definition

**Kind**: global function
**Returns**: Array - [{ swaggerParameters }, { requestBody }]

| Param | Type | Description |
| --- | --- | --- |
| apiKey | string | apiKey to access console api |
| options | object | optional data used for building the request options |
| [options.parameters] | object | parameters to set to the request, specific to each endpoint |
| [options.body] | object | request body for the request |

## requestInterceptorBuilder(coreConsoleAPIInstance, apihost) ⇒ function
Build a swagger request interceptor for the console sdk

**Kind**: global function
**Returns**: function - a request interceptor

| Param | Type | Description |
| --- | --- | --- |
| coreConsoleAPIInstance | object | console core api instance |
| apihost | string | console api url host |

## responseInterceptor(res) ⇒ object
A swagger response interceptor for the console sdk

**Kind**: global function
**Returns**: object - the response object

| Param | Type | Description |
| --- | --- | --- |
| res | object | the response object |

## createCredentialDirect(url, accessToken, apiKey, certificate, name, description) ⇒ object
Use axios lib to directly call console API to create credential

**Kind**: global function
**Returns**: object - The response object

| Param | Type | Description |
| --- | --- | --- |
| url | string | URL string |
| accessToken | string | Token to call the API |
| apiKey | string | Api key |
| certificate | object | A Readable stream with certificate content. eg: fs.createReadStream() |
| name | string | Credential name |
| description | string | Credential description |

## init(accessToken, apiKey, env, swaggerSpec) ⇒ [Promise.<CoreConsoleAPI>](#CoreConsoleAPI)
Returns a Promise that resolves with a new CoreConsoleAPI object

**Kind**: global function
**Returns**: [Promise.<CoreConsoleAPI>](#CoreConsoleAPI) - a Promise with a CoreConsoleAPI object

| Param | Type | Description |
| --- | --- | --- |
| accessToken | string | the access token corresponding to an integration or user token |
| apiKey | string | api key to access the Developer Console |
| env | string | The name of the environment. `prod` and `stage` are the only values supported. `prod` is default and any value other than `prod` or `stage` it is assumed to be the default value of `prod`. If not set, it will get the global cli env value. See https://github.com/adobe/aio-lib-env (which defaults to `prod` as well if not set) |
| swaggerSpec | object | the swagger spec for the API (optional) |

## Response : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| url | string | requested url |
| ok | boolean | response ok indicator |
| status | number | response status code |
| statusText | number | response status text |
| headers | object | response headers |
| body | object | response body object |
| obj | object | response body object |
| data | object | response body string |
| text | object | response body string |

## ProjectDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | string | Name |
| title | string | Title |
| [who_created] | string | Creator name |
| [description] | string | Description |
| type | string | Type (default or jaeger) |

## WorkspaceDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | string | Name |
| [title] | string | Title |
| [who_created] | string | Creator name |
| [description] | string | Description |
| [type] | string | Type |
| [quotaRule] | string | quotaRule |

## AdobeIdIntegrationDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | string | Name |
| description | string | Description |
| platform | string | Platform |
| [urlScheme] | string | url scheme |
| [redirectUriList] | object | List of redirect URIs |
| [defaultRedirectUri] | string | Default redirect URI |
| [domain] | string | domain |
| [approvalInfo] | object | approvalInfo |
| [templateId] | string | templateId |
| [services] | [Array.<SubscribeToServices>](#SubscribeToServices) | services |

## ExtensionIcon : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| id | string | Id |

## ExtensionMedia : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| id | string | Id |
| type | string | Type |
| order | string | order |

## ExtensionDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | string | Name |
| title | string | Title |
| description | string | Description |
| version | string | Version |
| icon | [ExtensionIcon](#ExtensionIcon) | Icon |
| media | [Array.<ExtensionMedia>](#ExtensionMedia) | array of Media Objects |

## ExtensionSubmissionDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| appType | string | app type |
| id | string | Id |
| notes | string | Notes |

## ExtensionWorkspaceEndpoints : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| additionalProp1 | object | additional property 1 |
| additionalProp2 | object | additional property 2 |

## ExtensionWorkspaceServices : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| code | string | Code |
| name | string | Name |
| licenseGroupIds | Array.<string> | License group Ids |

## ExtensionWorkspaceDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| id | string | Id |
| name | string | Name |
| endpoints | [ExtensionWorkspaceEndpoints](#ExtensionWorkspaceEndpoints) | Description |
| services | [ExtensionWorkspaceServices](#ExtensionWorkspaceServices) | Services |
| icon | [ExtensionIcon](#ExtensionIcon) | Icon |
| releaseNotes | string | Release Notes |
| technicalUserId | string | Technical user Id |
| appId | string | App Id |
| publisherId | string | Publisher Id |

## ServiceInfo : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| sdkCode | string | the sdk code |
| roles | [Array.<Role>](#Role) | the roles |
| licenseConfigs | [Array.<LicenseConfig>](#LicenseConfig) | the license configs |

## SubscribeToServices : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| sdkCode | string | the sdk code |
| atlasPlanCode | string | the atlas plan code |
| roles | [Array.<Role>](#Role) | the roles |
| licenseConfigs | [Array.<LicenseConfig>](#LicenseConfig) | the license configs |

## LicenseConfig : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| op | string | the operation (e.g. 'add') |
| id | string | the license id |
| productId | string | the product id |

## Role : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| id | number | the role id |
| code | string | the role code |
| name | string | the role name |

## OauthS2SIntegrationDetails : object
**Kind**: global typedef
**Properties**

| Name | Type | Description |
| --- | --- | --- |
| name | string | Name |
| description | string | Description |
| [templateId] | string | templateId |
| [services] | [Array.<SubscribeToServices>](#SubscribeToServices) | services |

### Debug Logs

```bash
LOG_LEVEL=debug
```

Prepend the `LOG_LEVEL` environment variable and `debug` value to the call that invokes your function, on the command line. This should output a lot of debug data for your SDK calls.

### Contributing

Contributions are welcome! Read the [Contributing Guide](./.github/CONTRIBUTING.md) for more information.

### Licensing

This project is licensed under the Apache V2 License. See [LICENSE](LICENSE) for more information.