Requests to make to Atlassian GraphQL Gateway, scoped to Compass related entities and actions.
new CompassRequests(api: Default): CompassRequests
1 2const compassRequests = new CompassRequests()
Property Name | Type | Description |
---|---|---|
api | Default |
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 2const 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(input: AddCompassComponentLabelsInput): Promise<ApiPayload<LabelsPayload>>
Adds a collection of labels to a component.
Required Oauth Scopes: write:component:compass
1 2const 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(input: AttachCompassComponentDataManagerInput): Promise<ApiPayload<ComponentPayload>>
Attaches a data manager to a component.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.attachDataManager( { "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003" } )
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 2const 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(cloudId: String, input: ): Promise<ApiPayload<ComponentPayload>>
1 2const resp = compassRequests.createBaseComponent( "2d492f5d-068a-4e9c-a9d3-3618589b56c1" )
createComponent(input: CreateComponentInput): Promise<ApiPayload<ComponentPayload>>
Creates a new component.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.createComponent( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "customFields": [ null ], "dataManager": {}, "description": "string", "externalAlias": { "externalId": "string", "externalSource": "string" }, "fields": { "string": [ "string" ] }, "labels": [ "string" ], "links": [ { "name": "string", "type": "CHAT_CHANNEL", "url": "string" } ], "name": "string", "options": { "createdFromFile": true }, "ownerId": "string", "relationships": [ { "nodeId": "string", "type": "DEPENDS_ON" } ], "slug": "string", "state": "ACTIVE", "type": "APPLICATION", "typeId": "string" } )
createCustomFieldDefinition(input: CompassCreateCustomFieldDefinitionInput): Promise<ApiPayload<CustomFieldDefinitionPayload>>
Creates a new compass custom field definition.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.createCustomFieldDefinition( {} )
createEvent(input: CompassCreateEventInput | Array<CompassCreateEventInput>): Promise<ApiPayload
Creates a new compass event. Note: This method is unstable.
1 2const resp = compassRequests.createEvent( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "event": {} } )
createEventSource(input: CreateEventSourceInput): Promise<ApiPayload<EventSourcePayload>>
Creates a new event source. Note: This method is unstable.
Required Oauth Scopes: write:event:compass
1 2const resp = compassRequests.createEventSource( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "eventType": "ALERT", "externalEventSourceId": "string" } )
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 2const 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", "externalSource": "string" } } )
createLink(input: CreateCompassComponentLinkInput): Promise<ApiPayload<LinkPayload>>
Creates a new link on a component.
Required Oauth Scopes: write:component:compass
1 2const 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(input: CompassCreateMetricDefinitionInput): Promise<ApiPayload<MetricDefinitionPayload>>
Creates a metric definition on a Compass site. A metric definition provides details for a metric source.
1 2const resp = compassRequests.createMetricDefinition( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "name": "string" } )
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 2const 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(input: CreateCompassRelationshipInput): Promise<ApiPayload<RelationshipPayload>>
Creates a new relationship between two components.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.createRelationship( { "endNodeId": "string", "startNodeId": "string", "type": "DEPENDS_ON" } )
deleteComponent(input: DeleteCompassComponentInput): Promise<ApiPayload<IdPayload>>
Deletes an existing component.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.deleteComponent( { "id": "string" } )
deleteExternalAlias(input: DeleteCompassComponentExternalAliasInput): Promise<ApiPayload<ExternalAliasPayload>>
Deletes an existing external alias from a component.
Required Oauth Scopes: write:component:compass
1 2const 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", "externalSource": "string" } } )
deleteLink(input: DeleteCompassComponentLinkInput): Promise<ApiPayload<IdPayload>>
Deletes an existing link from a component.
Required Oauth Scopes: write:component:compass
1 2const 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(input: CompassDeleteMetricDefinitionInput): Promise<ApiPayload
Deletes an existing metric definition.
1 2const resp = compassRequests.deleteMetricDefinition( { "id": "string" } )
deleteMetricSource(input: CompassDeleteMetricDefinitionInput): Promise<ApiPayload
Deletes a metric source including the metric values it contains.
1 2const resp = compassRequests.deleteMetricSource( { "id": "string" } )
deleteRelationship(input: DeleteCompassRelationshipInput): Promise<ApiPayload
Deletes an existing relationship between two components.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.deleteRelationship( { "endNodeId": "string", "startNodeId": "string", "type": "DEPENDS_ON" } )
detachDataManager(input: DetachCompassComponentDataManagerInput): Promise<ApiPayload
Detach a data manager from a component.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.detachDataManager( { "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003" } )
detachEventSource(input: DetachEventSourceInput): Promise<ApiPayload
Cleans external aliases and data managers pertaining to an externalSource.
Required Oauth Scopes: write:component:compass
1 2const 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" } )
getAllComponentTypes(input: GetAllComponentTypesInput): Promise<ApiPayload<ComponentTypePayload>>
Retrieves all component types.
Required Oauth Scopes: read:component:compass
1 2const resp = compassRequests.getAllComponentTypes( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1" } )
getApplicationManagedComponents(input: GetApplicationManagedComponentsInput): Promise<ApiPayload<ApplicationManagedComponentsPayload>>
Retrieves multiple metric definitions on the Compass Site.
1 2const resp = compassRequests.getApplicationManagedComponents( { "query": { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1" } } )
getComponent(input: GetComponentInput): Promise<ApiPayload<ComponentPayload>>
Retrieves a single component by its internal ID.
Required Oauth Scopes: read:component:compass
1 2const resp = compassRequests.getComponent( { "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003", "options": { "includeCustomFieldOptions": true, "includeCustomFields": true, "includeEventSources": true, "includeLinks": true, "includeMetricSourceValues": true, "includeMetricSources": true } } )
getComponentByExternalAlias(input: GetComponentByExternalAliasInput): Promise<ApiPayload<ComponentPayload>>
Retrieves a single component by its external alias.
Required Oauth Scopes: read:component:compass
1 2const resp = compassRequests.getComponentByExternalAlias( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "externalId": "string", "externalSource": "string", "options": { "includeCustomFieldOptions": true, "includeCustomFields": true, "includeEventSources": true, "includeLinks": true, "includeMetricSourceValues": true, "includeMetricSources": true } } )
getComponentsByReferences(references: Array<ComponentReferenceInput>): Promise<ApiPayload<ComponentsPayload>>
Retrieves multiple components by their references.
Required Oauth Scopes: read:component:compass
1 2const resp = compassRequests.getComponentsByReferences( [ {} ] )
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 2const resp = compassRequests.getEventSource( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "eventType": "ALERT", "externalEventSourceId": "string", "options": { "eventsQuery": {}, "includeEvents": true } } )
getMetricDefinition(cloudId: String, metricDefinitionId: String, options?: GetMetricDefinitionsOptions): Promise<ApiPayload<MetricDefinitionPayload>>
Retrieves a single metric definition by its internal ID.
1 2const resp = compassRequests.getMetricDefinition( "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "string", { "includeMetricSources": true } )
getMetricDefinitions(input: GetMetricDefinitionsInput): Promise<ApiPayload<MetricDefinitionsPayload>>
Retrieves multiple metric definitions on the Compass Site.
1 2const resp = compassRequests.getMetricDefinitions( { "after": "string", "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "first": 12, "options": { "includeMetricSources": true } } )
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 2const resp = compassRequests.getMetricSources( "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "string", "string" )
insertMetricValue(input: CompassInsertMetricValueInput): Promise<ApiPayload
Inserts a metric value in a component's metric source.
1 2const resp = compassRequests.insertMetricValue( { "metricSourceId": "string", "value": { "timestamp": "string", "value": 74 } } )
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 2const resp = compassRequests.insertMetricValueByExternalId( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "externalMetricSourceId": "string", "metricDefinitionId": "string", "value": { "timestamp": "string", "value": 82 } } )
removeLabels(input: RemoveCompassComponentLabelsInput): Promise<ApiPayload<LabelsPayload>>
Removes a collection of existing labels from a component.
Required Oauth Scopes: write:component:compass
1 2const 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(input: SearchComponentsInput): Promise<ApiPayload<SearchComponentsPayload>>
Searches for Compass components.
Required Oauth Scopes: read:component:compass
1 2const resp = compassRequests.searchComponents( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "query": {} } )
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 2const resp = compassRequests.syncComponentByExternalAlias( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "customFields": [ null ], "dataManager": {}, "description": "string", "eventSources": [ { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "eventType": "ALERT", "externalEventSourceId": "string" } ], "externalAlias": { "externalId": "string", "externalSource": "string" }, "fields": { "string": [ "string" ] }, "labels": [ "string" ], "links": [ { "name": "string", "type": "CHAT_CHANNEL", "url": "string" } ], "name": "string", "options": { "createComponentIfNotFound": true }, "ownerId": "string", "relationships": [ { "nodeId": "string", "type": "DEPENDS_ON" } ], "slug": "string", "type": "APPLICATION", "typeId": "string" } )
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 2const resp = compassRequests.synchronizeLinkAssociations( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "forgeAppId": "string" } )
unlinkExternalSource(input: UnlinkExternalSourceInput): Promise<ApiPayload
Clean external aliases and data managers pertaining to an externalSource.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.unlinkExternalSource( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "ecosystemAppId": "string", "externalSource": "string" } )
updateBaseComponent(input: UpdateCompassComponentInput): Promise<ApiPayload<ComponentPayload>>
1 2const resp = compassRequests.updateBaseComponent( { "id": "string" } )
updateComponent(input: UpdateComponentInput): Promise<ApiPayload<ComponentPayload>>
Updates an existing component.
Required Oauth Scopes: write:component:compass
, write:event:compass
1 2const resp = compassRequests.updateComponent( { "currentComponent": { "changeMetadata": { "createdAt": "string", "createdBy": { "accountId": "string", "accountStatus": "active", "canonicalAccountId": "string", "id": "string", "name": "string", "picture": "string" }, "lastUserModificationAt": "string", "lastUserModificationBy": { "accountId": "string", "accountStatus": "active", "canonicalAccountId": "string", "id": "string", "name": "string", "picture": "string" } }, "customFields": [ null ], "dataManager": { "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003" }, "description": "string", "eventSources": [ null ], "externalAliases": [ { "externalAliasId": "string", "externalSource": "string", "url": "string" } ], "fields": { "string": "string" }, "id": "string", "labels": [ "string" ], "links": [ { "id": "string", "name": "string", "type": "CHAT_CHANNEL", "url": "string" } ], "metricSources": [ { "derivedFrom": [ null ], "externalMetricSourceId": "string", "forgeAppId": "string", "id": "string", "title": "string", "url": "string", "values": { "edges": [ { "cursor": "string" } ], "pageInfo": { "hasNextPage": true, "hasPreviousPage": true } } } ], "name": "string", "ownerId": "string", "relationships": [ { "nodeId": "string", "type": "DEPENDS_ON" } ], "slug": "string", "type": "APPLICATION", "typeId": "string" }, "customFields": [ null ], "dataManager": {}, "description": "string", "eventSources": [ { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "eventType": "ALERT", "externalEventSourceId": "string" } ], "externalAlias": { "externalId": "string", "externalSource": "string" }, "fields": { "string": [ "string" ] }, "id": "string", "labels": [ "string" ], "links": [ { "name": "string", "type": "CHAT_CHANNEL", "url": "string" } ], "name": "string", "ownerId": "string", "relationships": [ { "nodeId": "string", "type": "DEPENDS_ON" } ], "slug": "string", "typeId": "string" } )
updateDataManager(input: UpdateCompassComponentDataManagerMetadataInput): Promise<ApiPayload
Updates a data manager of a component.
Required Oauth Scopes: write:component:compass
1 2const resp = compassRequests.updateDataManager( { "componentId": "ari:cloud:compass:2d492f5d-068a-4e9c-a9d3-3618589b56c1:component/b11fd1ac-032a-44cf-a740-0c168b619cba/c27f43a0-f394-45f1-bf17-5da9451f5003" } )
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 2const 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": [ null ] } )
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 2const resp = compassRequests.updateMetricDefinition( { "cloudId": "2d492f5d-068a-4e9c-a9d3-3618589b56c1", "id": "string" } )
Rate this page: