{"openapi":"3.0.1","info":{"title":"Compass REST API","version":"1"},"servers":[{"url":"https://your-domain.atlassian.net/gateway/api"}],"security":[{"basicAuth":[]}],"tags":[{"name":"Metrics","description":"This resource represents metrics. Use this resource to send metric values into a component's metric source."},{"name":"Events","description":"This resource represents events. Use this resource to send events into an event source."}],"paths":{"/compass/v1/component/{componentId}/app/{forgeAppId}/attachment/{key}":{"get":{"tags":["attachment-rest-controller"],"summary":"Get Forge App attachment","description":"Get a file attached to a component. If you need to have attachment upload enabled for your Compass Forge app, contact Atlassian support.","operationId":"getAttachment","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"forgeAppId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if the file exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Returned if the Forge app does not have attachment upload enabled. If your Compass Forge app needs this functionality enabled, contact Atlassian support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the component or attachment is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}},"put":{"tags":["attachment-rest-controller"],"summary":"Upload Forge App attachment","description":"Attach a file to a component. If you need to have attachment upload enabled for your Compass Forge app, contact Atlassian support.","operationId":"uploadAttachment","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"forgeAppId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}},"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Returned if the file upload is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Returned if the Forge app does not have attachment upload enabled. If your Compass Forge app needs this functionality enabled, contact Atlassian support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the component is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"422":{"description":"Returned if the uploaded file type is not accepted and/or file content cannot be parsed. Accepted file types include JSON, YAML, and XML.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}},"delete":{"tags":["attachment-rest-controller"],"summary":"Delete Forge App attachment","description":"Delete file attached to a component. If you need to have attachment upload enabled for your Compass Forge app, contact Atlassian support.","operationId":"deleteAttachment","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"forgeAppId","in":"path","required":true,"schema":{"type":"string"}},{"name":"key","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if the file delete is successful."},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Returned if the Forge app does not have attachment upload enabled. If your Compass Forge app needs this functionality enabled, contact Atlassian support.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the component is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}},"/compass/v1/component/{componentId}/api_specs":{"put":{"tags":["attachment-rest-controller"],"summary":"Upload Component API Spec","description":"Add/Update api specs for a component.","operationId":"uploadAPISpec","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}},"application/json":{"schema":{"required":["file"],"type":"object","properties":{"file":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"Returned if the file upload is successful.","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Returned if the api spec file is not valid.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Returned if the user is not authorized to upload API specs.","content":{"application/json":{"schema":{"type":"string"}}}},"422":{"description":"Returned if the uploaded file type is not accepted and/or file content cannot be parsed. Accepted file types are JSON and YML.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/compass/v1/webhooks/{webhookId}":{"post":{"tags":["incoming-webhooks-rest-controller"],"summary":"An invocation of an inbound webhook","description":"Third parties can call these inbound webhooks to dothings within compass, like create deployment events for webhooks coming from github","operationId":"handleWebhookInvocation","parameters":[{"name":"webhookId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}},"required":true},"responses":{"202":{"description":"Returned if the process of invoking a webhook with a payload has been enqueud."},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"401":{"description":"Returned if the request token is invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the webhook is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"405":{"description":"Returned if the request was not a POST","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Returned if the request exceeds the rate limit.","content":{"application/json":{"schema":{"type":"string"}}}}}}},"/compass/v1/metrics":{"post":{"tags":["Metrics"],"summary":"Send metric value","description":"Sends a metric value into a metric source for a [component](/cloud/compass/components/what-is-a-component/). This API is rate limited. Only 100 requests per user per minute are allowed.","operationId":"insertMetricValue","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InsertMetricByMetricDefinitionRequestDto"},{"$ref":"#/components/schemas/InsertMetricByMetricSourceRequestDto"}]}}},"required":true},"responses":{"200":{"description":"Returned if the request is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertMetricResponseDto"}}}},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"403":{"description":"Returned if the user does not have permission to insert metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the metric source, metric definition or component is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Returned if the request exceeds the rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsertMetricResponseDto"}}}}}}},"/compass/v1/fct":{"post":{"tags":["forge-context-token-controller"],"operationId":"getForgeContextToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeContextTokenRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgeContextTokenResponse"}}}}}}},"/compass/v1/events":{"post":{"tags":["Events"],"summary":"Send event","description":"Sends an event into an event source. This API is rate limited. Only 100 requests per user per minute are allowed.","operationId":"createCompassEvent","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStreamlinedEventRequest"}}},"required":true},"responses":{"202":{"description":"Returned if the process of sending of an event is started."},"400":{"description":"Returned if the request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"404":{"description":"Returned if the event source is not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}},"429":{"description":"Returned if the request exceeds the rate limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unit"}}}}}}},"/compass/v1/entitlements":{"post":{"tags":["entitlement-rest-controller"],"summary":"Get Entitlement Results","description":"Get entitlement results for a given user and site","operationId":"evaluateEntitlements","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementRequestDto"}}},"required":true},"responses":{"200":{"description":"Returned if the file upload is successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementResponseDto"}}}},"401":{"description":"Returned if the user is not authenticated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}}}}},"components":{"schemas":{"ErrorDto":{"type":"object","properties":{"type":{"type":"string","description":"A code representing the type of error."},"message":{"type":"string","description":"A message describing the error."}},"description":"An error."},"ErrorResponseDto":{"type":"object","properties":{"errors":{"type":"array","description":"A list of errors that occurred.","items":{"$ref":"#/components/schemas/ErrorDto"}}},"description":"A list of errors that occurred."},"Attachment":{"required":["lastModifiedAt","name","url"],"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}}},"InsertMetricByMetricDefinitionRequestDto":{"required":["componentId","metricDefinitionId","value"],"type":"object","allOf":[{"$ref":"#/components/schemas/InsertMetricRequestDto"},{"type":"object","properties":{"metricDefinitionId":{"type":"string","description":"The metric definition ID corresponding to the metric source to send the value into."},"componentId":{"type":"string","description":"The component ID corresponding to the metric source to send the value into."}}}]},"InsertMetricByMetricSourceRequestDto":{"required":["metricSourceId","value"],"type":"object","allOf":[{"$ref":"#/components/schemas/InsertMetricRequestDto"},{"type":"object","properties":{"metricSourceId":{"type":"string","description":"The ID of the metric source to send the value into."}}}]},"InsertMetricRequestDto":{"required":["value"],"type":"object","properties":{"title":{"type":"string","description":"The title of the metric value source. The title of the metric source being inserted into will be updated to match this value.If this property is not provided, the existing value on the metric source will not be updated."},"value":{"type":"number","description":"The metric value to send.","format":"double"},"timestamp":{"type":"string","description":"The time the metric value was collected.","format":"date-time"},"url":{"type":"string","description":"The url of the metric value source. The url of the metric source being inserted into will be updated to match this value. If this property is not provided, the existing value on the metric source will not be updated."}}},"InsertMetricResponseDto":{"required":["metricSourceId","timestamp","value"],"type":"object","properties":{"metricSourceId":{"type":"string","description":"The ID of the metric source."},"value":{"type":"number","description":"The value of the metric.","format":"double"},"timestamp":{"type":"string","description":"The time the metric value was collected.","format":"date-time"}},"description":"The metric value that was sent into the metric source."},"ForgeContextTokenRequest":{"required":["appVersion","contextIds","extensionData","extensionId","extensionKey"],"type":"object","properties":{"contextIds":{"type":"array","items":{"type":"string"}},"extensionData":{"type":"object","additionalProperties":{"type":"object"}},"extensionId":{"type":"string"},"extensionKey":{"type":"string"},"appVersion":{"type":"string"}}},"ForgeContextTokenResponse":{"required":["success"],"type":"object","properties":{"extensionId":{"type":"string"},"jwt":{"type":"string"},"expiresAt":{"type":"integer","format":"int64"},"success":{"type":"boolean"},"errors":{"type":"array","items":{"type":"string"}}}},"CompassAlertEventPropertiesInputDto":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the alert."},"status":{"type":"string","description":"Status of the alert.","enum":["OPENED","ACKNOWLEDGED","SNOOZED","CLOSED"]},"priority":{"type":"string","description":"Priority of the alert.","enum":["P1","P2","P3","P4","P5"]},"createdAt":{"type":"string","description":"Timestamp for when the alert was created, when status is set to OPENED.","format":"date-time"},"acknowledgedAt":{"type":"string","description":"The last time the alert status changed to ACKNOWLEDGED.","format":"date-time"},"snoozedAt":{"type":"string","description":"The last time the alert status changed to SNOOZED.","format":"date-time"},"closedAt":{"type":"string","description":"The last time the alert status changed to CLOSED.","format":"date-time"}},"description":"The list of properties of the alert event."},"CompassBuildEventPipelineInputDto":{"required":["pipelineId"],"type":"object","properties":{"pipelineId":{"type":"string","description":"The ID of the build event pipeline should be unique per build event. Otherwise, any existing event with a matching value will be overwritten."},"url":{"type":"string","description":"The URL to the build event pipeline."},"displayName":{"type":"string","description":"The name of the build event pipeline."}},"description":"The build event pipeline."},"CompassBuildEventPropertiesInputDto":{"required":["pipeline","startedAt","state"],"type":"object","properties":{"state":{"type":"string","description":"The state of the build.","enum":["IN_PROGRESS","SUCCESSFUL","CANCELLED","FAILED","ERROR","TIMED_OUT","UNKNOWN"]},"pipeline":{"$ref":"#/components/schemas/CompassBuildEventPipelineInputDto"},"startedAt":{"type":"string","description":"The time the build started.","format":"date-time"},"completedAt":{"type":"string","description":"The time the build completed.","format":"date-time"}},"description":"The list of properties of the build event."},"CompassCreateAlertEventInputDto":{"required":["alertProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"alertProperties":{"$ref":"#/components/schemas/CompassAlertEventPropertiesInputDto"}},"description":"An alert event."},"CompassCreateBuildEventInputDto":{"required":["buildProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"buildProperties":{"$ref":"#/components/schemas/CompassBuildEventPropertiesInputDto"}},"description":"A build event."},"CompassCreateCustomEventInputDto":{"required":["customEventProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"customEventProperties":{"$ref":"#/components/schemas/CompassCustomEventPropertiesInputDto"}},"description":"A custom event."},"CompassCreateDeploymentEventInputDto":{"required":["deploymentProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the deployment event."},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"url":{"type":"string","description":"The URL of the deployment event."},"description":{"type":"string","description":"The description of the deployment event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"deploymentProperties":{"$ref":"#/components/schemas/CompassCreateDeploymentEventPropertiesInputDto"}},"description":"A deployment event."},"CompassCreateDeploymentEventPropertiesInputDto":{"required":["environment","pipeline","sequenceNumber","state"],"type":"object","properties":{"sequenceNumber":{"type":"integer","description":"The sequence number for the deployment.","format":"int64"},"state":{"type":"string","description":"The state of the deployment.","enum":["PENDING","IN_PROGRESS","SUCCESSFUL","CANCELLED","FAILED","ROLLED_BACK","UNKNOWN"]},"pipeline":{"$ref":"#/components/schemas/CompassDeploymentEventPipelineInputDto"},"environment":{"$ref":"#/components/schemas/CompassDeploymentEventEnvironmentInputDto"},"startedAt":{"type":"string","description":"The time this deployment was started at.","format":"date-time"},"completedAt":{"type":"string","description":"The time this deployment was completed at.","format":"date-time"}},"description":"The list of properties of the deployment event."},"CompassCreateFlagEventInputDto":{"required":["description","displayName","externalEventSourceId","flagProperties","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"flagProperties":{"$ref":"#/components/schemas/CompassCreateFlagEventPropertiesInputDto"}},"description":"A flag event."},"CompassCreateFlagEventPropertiesInputDto":{"required":["id"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the flag."},"status":{"type":"string","description":"The flag's status. The recognized values (case-insensitive) are on, off, created, archived, deleted, and targeting_updated. Any other value, although acceptable, will be displayed as unknown on the activity feed."}},"description":"The list of properties of the flag event."},"CompassCreateIncidentEventInputDto":{"required":["description","displayName","externalEventSourceId","incidentProperties","lastUpdated","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"incidentProperties":{"$ref":"#/components/schemas/CompassCreateIncidentEventPropertiesInputDto"}},"description":"An incident event."},"CompassCreateIncidentEventPropertiesInputDto":{"required":["id","startTime","state"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the incident."},"state":{"type":"string","description":"The state of the incident.","enum":["OPEN","RESOLVED","DELETED"]},"severity":{"$ref":"#/components/schemas/CompassIncidentEventSeverityInputDto"},"startTime":{"type":"string","description":"The time when the incident started","format":"date-time"},"endTime":{"type":"string","description":"The time when the incident ended","format":"date-time"}},"description":"The list of properties of the incident event."},"CompassCreateLifecycleEventInputDto":{"required":["description","displayName","externalEventSourceId","lastUpdated","lifecycleProperties","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"lifecycleProperties":{"$ref":"#/components/schemas/CompassLifecycleEventInputPropertiesDto"}},"description":"A lifecycle event."},"CompassCreatePullRequestEventInputDto":{"required":["lastUpdated","pullRequestProperties"],"type":"object","properties":{"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"cloudId":{"type":"string","description":"The cloud ID of the event."},"pullRequestProperties":{"$ref":"#/components/schemas/CompassPullRequestInputPropertiesDto"}},"description":"A pull request event. Warning: This option is currently only usable by Forge apps and does not add events to the Activity Feed."},"CompassCreatePushEventInputDto":{"required":["description","displayName","externalEventSourceId","lastUpdated","pushEventProperties","updateSequenceNumber","url"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"pushEventProperties":{"$ref":"#/components/schemas/CompassPushEventInputPropertiesDto"}},"description":"A push event."},"CompassCreateVulnerabilityEventInputDto":{"required":["description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url","vulnerabilityProperties"],"type":"object","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","description":"The last time this event was updated.","format":"date-time"},"updateSequenceNumber":{"type":"integer","description":"A number specifying the order of the update to the event. Must be incremented to save new events. Otherwise, the request will be ignored.","format":"int64"},"description":{"type":"string","description":"The description of the event."},"url":{"type":"string","description":"The URL of the event."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"vulnerabilityProperties":{"$ref":"#/components/schemas/CompassCreateVulnerabilityEventPropertiesInputDto"}},"description":"A vulnerability event."},"CompassCreateVulnerabilityEventPropertiesInputDto":{"required":["discoveryTime","id","severity","state"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the vulnerability."},"state":{"type":"string","description":"The state of the vulnerability.","enum":["OPEN","REMEDIATED","DECLINED"]},"severity":{"$ref":"#/components/schemas/CompassVulnerabilityEventSeverityInputDto"},"score":{"type":"number","description":"The CVSS score of the vulnerability (0-10).","format":"double"},"discoverySource":{"type":"string","description":"The source or tool that discovered the vulnerability."},"vulnerableTarget":{"type":"string","description":"The target system or component that is vulnerable."},"discoveryTime":{"type":"string","description":"The time when the vulnerability was discovered.","format":"date-time"},"remediationTime":{"type":"string","description":"The time when the vulnerability was remediated.","format":"date-time"}},"description":"The list of properties of the vulnerability event."},"CompassCustomEventPropertiesInputDto":{"required":["icon","id"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the custom event."},"icon":{"type":"string","description":"The icon for the custom event.","enum":["INFO","WARNING","CHECKPOINT"]}},"description":"The list of properties of the custom event."},"CompassDeploymentEventEnvironmentInputDto":{"required":["category","displayName","environmentId"],"type":"object","properties":{"category":{"type":"string","description":"The type of environment where the deployment event occurred.","enum":["PRODUCTION","STAGING","TESTING","DEVELOPMENT","UNMAPPED"]},"displayName":{"type":"string","description":"The display name of the environment where the deployment event occurred."},"environmentId":{"type":"string","description":"The ID of the environment where the deployment event occurred."}},"description":"The environment where the deployment event has occurred."},"CompassDeploymentEventPipelineInputDto":{"required":["displayName","pipelineId","url"],"type":"object","properties":{"pipelineId":{"type":"string","description":"The ID of the deployment event pipeline."},"url":{"type":"string","description":"The URL of the deployment event pipeline."},"displayName":{"type":"string","description":"The name of the deployment event pipeline."}},"description":"The deployment event pipeline."},"CompassEventInputDto":{"type":"object","properties":{"deployment":{"$ref":"#/components/schemas/CompassCreateDeploymentEventInputDto"},"build":{"$ref":"#/components/schemas/CompassCreateBuildEventInputDto"},"incident":{"$ref":"#/components/schemas/CompassCreateIncidentEventInputDto"},"flag":{"$ref":"#/components/schemas/CompassCreateFlagEventInputDto"},"alert":{"$ref":"#/components/schemas/CompassCreateAlertEventInputDto"},"lifecycle":{"$ref":"#/components/schemas/CompassCreateLifecycleEventInputDto"},"custom":{"$ref":"#/components/schemas/CompassCreateCustomEventInputDto"},"push":{"$ref":"#/components/schemas/CompassCreatePushEventInputDto"},"pullRequest":{"$ref":"#/components/schemas/CompassCreatePullRequestEventInputDto"},"vulnerability":{"$ref":"#/components/schemas/CompassCreateVulnerabilityEventInputDto"}},"description":"The type of event. One and only one of the fields in this input type must be provided."},"CompassIncidentEventSeverityInputDto":{"type":"object","properties":{"label":{"type":"string","description":"The label to use for displaying the severity of the incident"},"level":{"type":"string","description":"The severity level. A severity level of 'ONE' is the most severe, and a level of 'FIVE' is the least severe.","enum":["ONE","TWO","THREE","FOUR","FIVE"]}},"description":"The severity of an incident"},"CompassLifecycleEventInputPropertiesDto":{"required":["id","stage"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the lifecycle."},"stage":{"type":"string","description":"The stage of the lifecycle event.","enum":["PRE_RELEASE","PRODUCTION","DEPRECATION","END_OF_LIFE"]}},"description":"The list of properties of the lifecycle event."},"CompassPullRequestInputPropertiesDto":{"required":["id","pullRequestUrl","repoUrl","status"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the pull request event."},"repoUrl":{"type":"string","description":"The URL of the repository of the pull request."},"pullRequestUrl":{"type":"string","description":"The URL of the pull request."},"status":{"type":"string","description":"The status of the pull request.","enum":["CREATED","IN_REVIEW","MERGED","REJECTED"]}},"description":"The list of properties of the pull event."},"CompassPushEventAuthorInputDto":{"type":"object","properties":{"name":{"type":"string","description":"The name of the author."},"email":{"type":"string","description":"The email of the author."}},"description":"The author who made the push"},"CompassPushEventInputPropertiesDto":{"required":["branchName","id"],"type":"object","properties":{"id":{"type":"string","description":"The ID of the push to event."},"branchName":{"type":"string","description":"The name of the branch being pushed to."},"author":{"$ref":"#/components/schemas/CompassPushEventAuthorInputDto"}},"description":"The list of properties of the push event."},"CompassVulnerabilityEventSeverityInputDto":{"required":["level"],"type":"object","properties":{"label":{"type":"string","description":"The label to use for displaying the severity"},"level":{"type":"string","description":"The severity level of the vulnerability","enum":["CRITICAL","HIGH","MEDIUM","LOW"]}},"description":"The severity of a vulnerability"},"CreateStreamlinedEventRequest":{"required":["cloudId","event"],"type":"object","properties":{"cloudId":{"type":"string"},"event":{"$ref":"#/components/schemas/CompassEventInputDto"},"componentId":{"type":"string"},"externalEventSourceId":{"type":"string"}}},"Unit":{"type":"object"},"EntitlementRequestDto":{"required":["entitlements"],"type":"object","properties":{"entitlements":{"uniqueItems":true,"type":"array","description":"The entitlements to evaluate for the given user and site","items":{"type":"string","description":"The entitlements to evaluate for the given user and site"}}}},"EntitlementResponseDto":{"required":["entitlements"],"type":"object","properties":{"entitlements":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EntitlementResultDto"},"description":"A map of entitlements to the result given a user and site"}}},"EntitlementResultDto":{"required":["@class"],"type":"object","properties":{"@class":{"type":"string"}},"description":"A map of entitlements to the result given a user and site","discriminator":{"propertyName":"@class"}}},"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic"}}},"x-atlassian-narrative":{"documents":[{"title":"About","anchor":"about","body":"This is the reference for the Compass REST API.\nThe REST API enables you to interact with [Compass](/cloud/compass/overview/what-is-compass/) programmatically.\nUse this API for scripting interactions with Compass and sending data from external tools.\nThis page documents the REST resources available in Compass, including the HTTP response codes and example requests and responses.\n\nIn addition to the Compass REST API, you can use our [Atlassian platform GraphQL API](/cloud/compass/graphql/) to use many more Compass features."},{"title":"Version","anchor":"version","body":"This documentation is for version 1 of the Compass REST API."},{"title":"Authentication","anchor":"authentication","body":"The REST API supports basic auth.\n\n### Get an API token\nBasic auth requires API tokens. You generate an API token for your Atlassian account and use it to authenticate anywhere where you would have used a password. This authentication enhances security because:\n\n* you're not saving your primary account password outside of where you authenticate\n* you can quickly revoke individual API tokens on a per-use basis\n* API tokens allow you to authenticate even if your Atlassian Cloud organization has two-factor authentication or SAML enabled\n\nSee the Atlassian Cloud Support [API tokens](https://confluence.atlassian.com/x/Vo71Nw) article to discover how to generate an API token.\n\n### Simple example\nMost client software provides a simple mechanism for supplying a user name (in our case, the email address) and API token that the client uses to build the required authentication headers. For example, you can specify the `--user` argument in cURL as follows:\n\n```\ncurl --request POST \\\n --url 'https://your-domain.atlassian.net/gateway/api/compass/v1/metrics' \\\n --user 'email@example.com:' \\\n --header 'Accept: application/json' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"metricSourceId\": \"\",\n \"value\": 32,\n \"timestamp\": \"\"\n}'\n```\n\n### Supply basic auth headers\nYou can construct and send basic auth headers, including a base64-encoded string that contains your Atlassian account email and API token.\n\nTo use basic auth headers, perform the following steps:\n\n1. Generate an API Token for your Atlassian Account: https://id.atlassian.com/manage/api-tokens\n1. Build a string of the form `your_email@domain.com:your_user_api_token`\n1. You need to encode your authorization credentials to base64. There are online tools (such as, https://www.base64encode.net/) that you can use to create your base64 encoded string. For example, `your_email@domain.com:your_user_api_token` base64 encoded is `eW91cl9lbWFpbEBkb21haW4uY29tOnlvdXJfdXNlcl9hcGlfdG9rZW4=`\n1. Supply an `Authorization` header with content `Basic` followed by the encoded string. Example: `Authorization: Basic eW91cl9lbWFpbEBkb21haW4uY29tOnlvdXJfdXNlcl9hcGlfdG9rZW4=`"},{"title":"Authorization","anchor":"authorization","body":"If you are making calls directly against the REST API, authorization is based on the user used in the authentication process."},{"title":"Status codes","anchor":"status-code","body":"The Compass REST API uses the [standard HTTP status codes](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).\n\nResponses that return an error status code also return a response body, similar to this:\n```json\n{\n \"errors\": [\n {\n \"type\": \"FORMAT_INVALID\",\n \"message\": \"Field [value] is invalid.\"\n }\n ]\n}\n```"}]}}