Classes

Rate this page:

CompassRequests

Requests to make to Atlassian GraphQL Gateway, scoped to Compass related entities and actions.

Constructors

new CompassRequests(api: Default): CompassRequests

1
2
const compassRequests = new CompassRequests()

Properties

Property NameTypeDescription
apiDefault

Methods

AddEventSource

addEventSource(input: AddEventSourceInput): Promise<ApiPayload<EventSourcePayload>>

Creates a new event source and attaches that event source to a specified component. Note: This method is unstable.

Required Oauth Scopes: write:component:compass, write:event:compass

1
2
const resp = compassRequests.addEventSource(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "eventSource": {
      "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
      "eventType": "ALERT",
      "externalEventSourceId": "string"
    }
  }
)

AddLabels

addLabels(input: AddCompassComponentLabelsInput): Promise<ApiPayload<LabelsPayload>>

Adds a collection of labels to a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.addLabels(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "labelNames": [
      "string"
    ]
  }
)

AttachDataManager

attachDataManager(input: AttachCompassComponentDataManagerInput): Promise<ApiPayload<ComponentPayload>>

Attaches a data manager to a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.attachDataManager(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003"
  }
)

AttachEventSource

attachEventSource(input: AttachEventSourceInput): Promise<ApiPayload>

Attaches an existing event source to a specified component. Note: This method is unstable.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.attachEventSource(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "eventSourceId": "string"
  }
)

CreateBaseComponent

createBaseComponent(cloudId: String, input: CreateCompassComponentInput): Promise<ApiPayload<ComponentPayload>>

1
2
const resp = compassRequests.createBaseComponent(
  "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
  {
    "name": "string",
    "type": "APPLICATION"
  }
)

CreateComponent

createComponent(input: CreateComponentInput): Promise<ApiPayload<ComponentPayload>>

Creates a new component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.createComponent(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "dataManager": {},
    "description": "string",
    "externalAlias": {
      "externalId": "string"
    },
    "fields": {
      "string": [
        "string"
      ]
    },
    "labels": [
      "string"
    ],
    "links": [
      {
        "name": "string",
        "type": "CHAT_CHANNEL",
        "url": "string"
      }
    ],
    "name": "string",
    "ownerId": "string",
    "relationships": [
      {
        "nodeId": "string",
        "type": "DEPENDS_ON"
      }
    ],
    "type": "APPLICATION"
  }
)

CreateDeploymentEvent

createDeploymentEvent(input: CreateDeploymentEventInput | Array<CreateDeploymentEventInput>): Promise<ApiPayload>

Creates a new deployment event. Note: This method is unstable.

Required Oauth Scopes: write:event:compass

1
2
const resp = compassRequests.createDeploymentEvent(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "deploymentSequenceNumber": "string",
    "description": "string",
    "displayName": "string",
    "environment": {
      "category": "DEVELOPMENT",
      "displayName": "string",
      "environmentId": "string"
    },
    "externalEventSourceId": "string",
    "lastUpdated": "string",
    "pipeline": {
      "displayName": "string",
      "pipelineId": "string",
      "url": "string"
    },
    "state": "CANCELLED",
    "updateSequenceNumber": "string",
    "url": "string"
  }
)

CreateEvent

createEvent(input: CompassCreateEventInput | Array<CompassCreateEventInput>): Promise<ApiPayload>

Creates a new compass event. Note: This method is unstable.

Required Oauth Scopes

  • write:event:compass
1
2
const resp = compassRequests.createEvent(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "event": {}
  }
)

CreateEventSource

createEventSource(input: CreateEventSourceInput): Promise<ApiPayload<EventSourcePayload>>

Creates a new event source. Note: This method is unstable.

Required Oauth Scopes: write:event:compass

1
2
const resp = compassRequests.createEventSource(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "eventType": "ALERT",
    "externalEventSourceId": "string"
  }
)

CreateExternalAlias

createExternalAlias(input: CreateCompassComponentExternalAliasInput): Promise<ApiPayload<ExternalAliasPayload>>

Creates a new external alias for a component. An external alias is an identifier used to describe a component in an external system.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.createExternalAlias(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "externalAlias": {
      "externalId": "string"
    }
  }
)

createLink(input: CreateCompassComponentLinkInput): Promise<ApiPayload<LinkPayload>>

Creates a new link on a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.createLink(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "link": {
      "type": "CHAT_CHANNEL",
      "url": "string"
    }
  }
)

CreateMetricDefinition

createMetricDefinition(input: CompassCreateMetricDefinitionInput): Promise<ApiPayload<MetricDefinitionPayload>>

Creates a metric definition on a Compass site. A metric definition provides details for a metric source.

1
2
const resp = compassRequests.createMetricDefinition(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "name": "string"
  }
)

CreateMetricSource

createMetricSource(input: CompassCreateMetricSourceInput): Promise<ApiPayload<MetricSourceIdPayload>>

Creates a metric source for a component. A metric source contains values providing numerical data about a component.

1
2
const resp = compassRequests.createMetricSource(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "externalMetricSourceId": "string",
    "metricDefinitionId": "string"
  }
)

CreateRelationship

createRelationship(input: CreateCompassRelationshipInput): Promise<ApiPayload<RelationshipPayload>>

Creates a new relationship between two components.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.createRelationship(
  {
    "endNodeId": "string",
    "startNodeId": "string",
    "type": "DEPENDS_ON"
  }
)

DeleteComponent

deleteComponent(input: DeleteCompassComponentInput): Promise<ApiPayload<IdPayload>>

Deletes an existing component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.deleteComponent(
  {
    "id": "string"
  }
)

DeleteExternalAlias

deleteExternalAlias(input: DeleteCompassComponentExternalAliasInput): Promise<ApiPayload<ExternalAliasPayload>>

Deletes an existing external alias from a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.deleteExternalAlias(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "externalAlias": {
      "externalId": "string"
    }
  }
)

deleteLink(input: DeleteCompassComponentLinkInput): Promise<ApiPayload<IdPayload>>

Deletes an existing link from a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.deleteLink(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "link": "string"
  }
)

DeleteMetricDefinition

deleteMetricDefinition(input: CompassDeleteMetricDefinitionInput): Promise<ApiPayload>

Deletes an existing metric definition.

1
2
const resp = compassRequests.deleteMetricDefinition(
  {
    "id": "string"
  }
)

DeleteMetricSource

deleteMetricSource(input: CompassDeleteMetricDefinitionInput): Promise<ApiPayload>

Deletes a metric source including the metric values it contains.

1
2
const resp = compassRequests.deleteMetricSource(
  {
    "id": "string"
  }
)

DeleteRelationship

deleteRelationship(input: DeleteCompassRelationshipInput): Promise<ApiPayload>

Deletes an existing relationship between two components.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.deleteRelationship(
  {
    "endNodeId": "string",
    "startNodeId": "string",
    "type": "DEPENDS_ON"
  }
)

DetachDataManager

detachDataManager(input: DetachCompassComponentDataManagerInput): Promise<ApiPayload>

Detach a data manager from a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.detachDataManager(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003"
  }
)

DetachEventSource

detachEventSource(input: DetachEventSourceInput): Promise<ApiPayload>

Cleans external aliases and data managers pertaining to an externalSource.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.detachEventSource(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "eventSourceId": "string"
  }
)

GetComponent

getComponent(input: GetComponentInput): Promise<ApiPayload<ComponentPayload>>

Retrieves a single component by its internal ID. Required Oauth Scopes: read:component:compass

1
2
const resp = compassRequests.getComponent(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "options": {
      "includeEventSources": true,
      "includeLinks": true,
      "includeMetricSources": true
    }
  }
)

GetComponentByExternalAlias

getComponentByExternalAlias(input: GetComponentByExternalAliasInput): Promise<ApiPayload<ComponentPayload>>

Retrieves a single component by its external alias.

Required Oauth Scopes: read:component:compass

1
2
const resp = compassRequests.getComponentByExternalAlias(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "externalId": "string",
    "externalSource": "string",
    "options": {
      "includeEventSources": true,
      "includeLinks": true,
      "includeMetricSources": true
    }
  }
)

GetEventSource

getEventSource(input: GetEventSourceInput): Promise<ApiPayload<EventSourcePayload>>

Retrieves a single event source by its external event source ID and event type. Required Oauth Scopes: read:event:compass

1
2
const resp = compassRequests.getEventSource(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "eventType": "ALERT",
    "externalEventSourceId": "string",
    "options": {
      "eventsQuery": {},
      "includeEvents": true
    }
  }
)

GetMetricDefinition

getMetricDefinition(cloudId: String, metricDefinitionId: String, options?: GetMetricDefinitionsOptions): Promise<ApiPayload<MetricDefinitionPayload>>

Retrieves a single metric definition by its internal ID.

1
2
const resp = compassRequests.getMetricDefinition(
  "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
  "string",
  {
    "includeMetricSources": true
  }
)

GetMetricDefinitions

getMetricDefinitions(input: GetMetricDefinitionsInput): Promise<ApiPayload<MetricDefinitionsPayload>>

Retrieves multiple metric definitions on the Compass Site.

1
2
const resp = compassRequests.getMetricDefinitions(
  {
    "after": "string",
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "first": 13,
    "options": {
      "includeMetricSources": true
    }
  }
)

GetMetricSources

getMetricSources(cloudId: String, metricDefinitionId: String, after?: String): Promise<ApiPayload<MetricSourcesPayload>>

Retrieves metric sources associated with a given metric definitiona single metric definition by its internal ID.

1
2
const resp = compassRequests.getMetricSources(
  "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
  "string",
  "string"
)

InsertMetricValue

insertMetricValue(input: CompassInsertMetricValueInput): Promise<ApiPayload>

Inserts a metric value in a component's metric source.

1
2
const resp = compassRequests.insertMetricValue(
  {
    "metricSourceId": "string",
    "value": {
      "timestamp": "string",
      "value": 94
    }
  }
)

InsertMetricValueByExternalId

insertMetricValueByExternalId(input: CompassInsertMetricValueByExternalIdInput): Promise<ApiPayload>

Inserts a metric value into every metric source that matches the provided definition ID and external ID.

Required Oauth Scopes: write:metric:compass

1
2
const resp = compassRequests.insertMetricValueByExternalId(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "externalMetricSourceId": "string",
    "metricDefinitionId": "string",
    "value": {
      "timestamp": "string",
      "value": 66
    }
  }
)

RemoveLabels

removeLabels(input: RemoveCompassComponentLabelsInput): Promise<ApiPayload<LabelsPayload>>

Removes a collection of existing labels from a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.removeLabels(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "labelNames": [
      "string"
    ]
  }
)

SearchComponents

searchComponents(input: SearchComponentsInput): Promise<ApiPayload<SearchComponentsPayload>>

Searches for Compass components. Required Oauth Scopes: read:component:compass

1
2
const resp = compassRequests.searchComponents(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "options": {
      "includeEventSources": true,
      "includeLinks": true,
      "includeMetricSources": true
    },
    "query": {}
  }
)

SyncComponentByExternalAlias

syncComponentByExternalAlias(input: SyncComponentByExternalAliasInput): Promise<ApiPayload<ComponentPayload>>

Creates a component if it's external alias does not exist or updates the component if the external alias does exist.

Required Oauth Scopes: write:component:compass, write:event:compass

1
2
const resp = compassRequests.syncComponentByExternalAlias(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "dataManager": {},
    "description": "string",
    "eventSources": [
      {
        "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
        "eventType": "ALERT",
        "externalEventSourceId": "string"
      }
    ],
    "externalAlias": {
      "externalId": "string"
    },
    "fields": {
      "string": [
        "string"
      ]
    },
    "labels": [
      "string"
    ],
    "links": [
      {
        "id": "string",
        "name": "string",
        "type": "CHAT_CHANNEL",
        "url": "string"
      }
    ],
    "name": "string",
    "options": {
      "createComponentIfNotFound": true
    },
    "ownerId": "string",
    "relationships": [
      {
        "nodeId": "string",
        "type": "DEPENDS_ON"
      }
    ],
    "type": "APPLICATION"
  }
)

SynchronizeLinkAssociations

synchronizeLinkAssociations(input: CompassSynchronizeLinkAssociationsInput): Promise<ApiPayload<ComponentPayload>>

Synchronizes event and metric information for the current set of component links on a Compass site using the provided Forge app. Required Oauth Scopes: write:component:compass, write:event:compass, write:metric:compass

1
2
const resp = compassRequests.synchronizeLinkAssociations(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "forgeAppId": "string"
  }
)

UnlinkExternalSource

unlinkExternalSource(input: UnlinkExternalSourceInput): Promise<ApiPayload>

Clean external aliases and data managers pertaining to an externalSource.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.unlinkExternalSource(
  {
    "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
    "ecosystemAppId": "string",
    "externalSource": "string"
  }
)

UpdateBaseComponent

updateBaseComponent(input: UpdateCompassComponentInput): Promise<ApiPayload<ComponentPayload>>

1
2
const resp = compassRequests.updateBaseComponent(
  {
    "id": "string"
  }
)

UpdateComponent

updateComponent(input: UpdateComponentInput): Promise<ApiPayload<ComponentPayload>>

Updates an existing component.

Required Oauth Scopes: write:component:compass, write:event:compass

1
2
const resp = compassRequests.updateComponent(
  {
    "currentComponent": {
      "dataManager": {
        "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003"
      },
      "description": "string",
      "eventSources": [
        {
          "eventType": "ALERT",
          "events": {
            "edges": [
              null
            ],
            "pageInfo": {
              "hasNextPage": true,
              "hasPreviousPage": true
            }
          },
          "externalEventSourceId": "string",
          "forgeAppId": "string",
          "id": "string"
        }
      ],
      "externalAliases": [
        {
          "externalAliasId": "string",
          "externalSource": "string"
        }
      ],
      "fields": {
        "string": "string"
      },
      "id": "string",
      "labels": [
        "string"
      ],
      "links": [
        {
          "id": "string",
          "name": "string",
          "type": "CHAT_CHANNEL",
          "url": "string"
        }
      ],
      "metricSources": [
        {
          "externalMetricSourceId": "string",
          "id": "string",
          "metricDefinition": {
            "description": "string",
            "id": "string",
            "type": "BUILT_IN"
          },
          "url": "string",
          "values": {
            "edges": [
              {
                "cursor": "string"
              }
            ],
            "pageInfo": {
              "hasNextPage": true,
              "hasPreviousPage": true
            }
          }
        }
      ],
      "name": "string",
      "ownerId": "string",
      "relationships": [
        {
          "nodeId": "string",
          "type": "DEPENDS_ON"
        }
      ],
      "type": "APPLICATION"
    },
    "dataManager": {},
    "description": "string",
    "eventSources": [
      {
        "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
        "eventType": "ALERT",
        "externalEventSourceId": "string"
      }
    ],
    "externalAlias": {
      "externalId": "string"
    },
    "fields": {
      "string": [
        "string"
      ]
    },
    "id": "string",
    "labels": [
      "string"
    ],
    "links": [
      {
        "id": "string",
        "name": "string",
        "type": "CHAT_CHANNEL",
        "url": "string"
      }
    ],
    "name": "string",
    "ownerId": "string",
    "relationships": [
      {
        "nodeId": "string",
        "type": "DEPENDS_ON"
      }
    ]
  }
)

UpdateDataManager

updateDataManager(input: UpdateCompassComponentDataManagerMetadataInput): Promise<ApiPayload>

Updates a data manager of a component.

Required Oauth Scopes: write:component:compass

1
2
const resp = compassRequests.updateDataManager(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003"
  }
)

UpdateEventSources

updateEventSources(input: UpdateEventSourcesInput): Promise<ApiPayload<EventSourcesPayload>>

Updates the collection of event sources associated with a component.

Required Oauth Scopes: write:component:compass, write:event:compass

1
2
const resp = compassRequests.updateEventSources(
  {
    "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003",
    "newEventSources": [
      {
        "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1",
        "eventType": "ALERT",
        "externalEventSourceId": "string"
      }
    ],
    "oldEventSources": [
      {
        "eventType": "ALERT",
        "events": {
          "edges": [
            null
          ],
          "pageInfo": {
            "hasNextPage": true,
            "hasPreviousPage": true
          }
        },
        "externalEventSourceId": "string",
        "forgeAppId": "string",
        "id": "string"
      }
    ]
  }
)

UpdateMetricDefinition

updateMetricDefinition(input: CompassUpdateMetricDefinitionInput): Promise<ApiPayload<MetricDefinitionPayload>>

Updates an existing metric definition on a Compass site. A metric definition provides details for a metric source.

1
2
const resp = compassRequests.updateMetricDefinition(
  {
    "id": "string"
  }
)

Rate this page: