{"openapi":"3.1.0","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."},{"name":"Package Dependencies","description":"This resource represents package dependencies. Use this resource to associate package dependencies with a component."}],"paths":{"/compass/v1/package_dependencies/lock_file":{"put":{"tags":["Package Dependencies"],"summary":"Upload Package Dependencies via Lock File","description":"Upload package dependencies for a component.\n\nThe file with package dependency information. Currently, we only accept package-lock.json files that are below 2MB. \\\n\\\nThe baseSourceUrl should be a url link to your lock file, ideally with \"#lines-\" appended at the end, if from Bitbucket, or \"#L\" appended if a GitHub link. This will let link to specific lines in your lock file where dependencies were found. \\\n\\\nThe sourceId should be a string that uniquely identifies the given lock file. We recommend using the filepath to the lock file, with the \"/\" characters replaced with \"_\" characters.\n\nExample: This curl command uploads a lock file to populate package dependencies for the component.\n```bash\ncurl --request PUT \\\n--url 'https://your-domain.atlassian.net/gateway/api/compass/v1/package_dependencies/lock_file' \\\n--user 'email@example.com:' \\\n--header 'Content-Type: multipart/form-data' \\\n--form file=@/path/to/file/package-lock.json;type=application/json\n--form componentId=\n--form baseSourceUrl=\n--form sourceId=\n```","operationId":"uploadLockFile","parameters":[{"name":"sourceId","in":"query","required":true,"schema":{"type":"string"}},{"name":"baseSourceUrl","in":"query","required":true,"schema":{"type":"string"}},{"name":"componentId","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"responses":{"200":{"description":"Returned if the file upload is successful.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Returned if the request is not valid.","content":{"*/*":{"schema":{"type":"string"}}}},"403":{"description":"Returned if the user is not permitted to modify the given component.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Returned if the component is not found.","content":{"*/*":{"schema":{"type":"string"}}}},"422":{"description":"Returned if the uploaded file type is not accepted and/or file content cannot be parsed.","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/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.\n\nThe request body should be a file.\n\nExample: This curl command attaches a file to a component.\n```bash\ncurl --request PUT \\\n--url 'https://your-domain.atlassian.net/gateway/api/compass/v1/component/{componentId}/app/{forgeAppId}/attachment/{key}' \\\n--user 'email@example.com:' \\\n--header 'Content-Type: multipart/form-data' \\\n--form file=@/path/to/attachment.txt\n```","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":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"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"}}}},"500":{"description":"Returned if the file upload to Optic fails for an unexpected reason.","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":"Upload api specs for a component.\n\nThe request body should be a file with the api-spec content.\n\nExample: This curl command uploads a spec file (swagger.yaml) for the component.\n```bash\ncurl --request PUT \\\n--url 'https://your-domain.atlassian.net/gateway/api/compass/v1/component/{componentId}/api_specs' \\\n--user 'email@example.com:' \\\n--header 'Content-Type: multipart/form-data' \\\n--form file=@/path/to/file/swagger.yaml\n```","operationId":"uploadAPISpec","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"}},"required":["file"]}}}},"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"}}}}}},"delete":{"tags":["attachment-rest-controller"],"summary":"Delete API spec for a component","description":"Delete the API spec file for a component.","operationId":"deleteAPISpec","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Returned if the API spec deletion is successful.","content":{"application/json":{"schema":{"type":"string"}}}},"403":{"description":"Returned if the user is not authorized to delete API specs.","content":{"application/json":{"schema":{"type":"string"}}}},"404":{"description":"Returned if the component is not found.","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/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":{}}}}},"/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"}}}}}}},"/compass/v1/package_dependencies/lock_file/{componentId}/{sourceId}":{"delete":{"tags":["Package Dependencies"],"summary":"Delete Package Dependencies given a Source","description":"Delete all the package dependencies associated with a particular source.The `sourceId` parameter needs to be Base64 encoded.","operationId":"deleteLockFile","parameters":[{"name":"componentId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sourceId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Returned if the file upload is successful.","content":{"*/*":{"schema":{"type":"string"}}}},"400":{"description":"Returned if the request is not valid.","content":{"*/*":{"schema":{"type":"string"}}}},"403":{"description":"Returned if the user is not permitted to modify the given component.","content":{"*/*":{"schema":{"type":"string"}}}},"404":{"description":"Returned if the component is not found.","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"ErrorDto":{"type":"object","description":"An error.","properties":{"type":{"type":"string","description":"A code representing the type of error."},"message":{"type":"string","description":"A message describing the error."}}},"ErrorResponseDto":{"type":"object","description":"A list of errors that occurred.","properties":{"errors":{"type":"array","description":"A list of errors that occurred.","items":{"$ref":"#/components/schemas/ErrorDto"}}}},"Attachment":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"lastModifiedAt":{"type":"string","format":"date-time"}},"required":["lastModifiedAt","name","url"]},"InsertMetricByMetricDefinitionRequestDto":{"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."}}}],"required":["componentId","metricDefinitionId","value"]},"InsertMetricByMetricSourceRequestDto":{"allOf":[{"$ref":"#/components/schemas/InsertMetricRequestDto"},{"type":"object","properties":{"metricSourceId":{"type":"string","description":"The ID of the metric source to send the value into."}}}],"required":["metricSourceId","value"]},"InsertMetricRequestDto":{"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","format":"double","description":"The metric value to send."},"annotation":{"type":"string","description":"The ADF annotation attached to a metric value."},"timestamp":{"type":"string","format":"date-time","description":"The time the metric value was collected."},"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."}},"required":["value"]},"InsertMetricResponseDto":{"type":"object","description":"The metric value that was sent into the metric source.","properties":{"metricSourceId":{"type":"string","description":"The ID of the metric source."},"value":{"type":"number","format":"double","description":"The value of the metric."},"timestamp":{"type":"string","format":"date-time","description":"The time the metric value was collected."},"annotation":{"type":"string","description":"The metric value annotation."}},"required":["metricSourceId","timestamp","value"]},"CompassAlertEventPropertiesInputDto":{"type":"object","description":"The list of properties of the alert event.","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","format":"date-time","description":"Timestamp for when the alert was created, when status is set to OPENED."},"acknowledgedAt":{"type":"string","format":"date-time","description":"The last time the alert status changed to ACKNOWLEDGED."},"snoozedAt":{"type":"string","format":"date-time","description":"The last time the alert status changed to SNOOZED."},"closedAt":{"type":"string","format":"date-time","description":"The last time the alert status changed to CLOSED."}},"required":["id"]},"CompassBuildEventPipelineInputDto":{"type":"object","description":"The build event pipeline.","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."}},"required":["pipelineId"]},"CompassBuildEventPropertiesInputDto":{"type":"object","description":"The list of properties of the build event.","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","description":"The build event pipeline."},"startedAt":{"type":"string","format":"date-time","description":"The time the build started."},"completedAt":{"type":"string","format":"date-time","description":"The time the build completed."}},"required":["pipeline","startedAt","state"]},"CompassCreateAlertEventInputDto":{"type":"object","description":"An alert event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the alert event."}},"required":["alertProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"]},"CompassCreateBuildEventInputDto":{"type":"object","description":"A build event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the build event."}},"required":["buildProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"]},"CompassCreateCustomEventInputDto":{"type":"object","description":"A custom event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the custom event."}},"required":["customEventProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"]},"CompassCreateDeploymentEventInputDto":{"type":"object","description":"A deployment event.","properties":{"displayName":{"type":"string","description":"The name of the deployment event."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"url":{"type":"string","description":"The URL of the deployment event."},"description":{"type":"string","description":"The description of the deployment event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"externalEventSourceId":{"type":"string","description":"The ID of the external event source."},"deploymentProperties":{"$ref":"#/components/schemas/CompassCreateDeploymentEventPropertiesInputDto","description":"The list of properties of the deployment event."}},"required":["deploymentProperties","description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url"]},"CompassCreateDeploymentEventPropertiesInputDto":{"type":"object","description":"The list of properties of the deployment event.","properties":{"sequenceNumber":{"type":"integer","format":"int64","description":"The sequence number for the deployment."},"state":{"type":"string","description":"The state of the deployment.","enum":["PENDING","IN_PROGRESS","SUCCESSFUL","CANCELLED","FAILED","ROLLED_BACK","UNKNOWN"]},"pipeline":{"$ref":"#/components/schemas/CompassDeploymentEventPipelineInputDto","description":"The deployment event pipeline."},"environment":{"$ref":"#/components/schemas/CompassDeploymentEventEnvironmentInputDto","description":"The environment where the deployment event has occurred."},"startedAt":{"type":"string","format":"date-time","description":"The time this deployment was started at."},"completedAt":{"type":"string","format":"date-time","description":"The time this deployment was completed at."}},"required":["environment","pipeline","sequenceNumber","state"]},"CompassCreateFlagEventInputDto":{"type":"object","description":"A flag event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the flag event."}},"required":["description","displayName","externalEventSourceId","flagProperties","lastUpdated","updateSequenceNumber","url"]},"CompassCreateFlagEventPropertiesInputDto":{"type":"object","description":"The list of properties of the flag event.","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."}},"required":["id"]},"CompassCreateIncidentEventInputDto":{"type":"object","description":"An incident event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the incident event."}},"required":["description","displayName","externalEventSourceId","incidentProperties","lastUpdated","updateSequenceNumber","url"]},"CompassCreateIncidentEventPropertiesInputDto":{"type":"object","description":"The list of properties of the incident event.","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","description":"The severity of the incident"},"startTime":{"type":"string","format":"date-time","description":"The time when the incident started"},"endTime":{"type":"string","format":"date-time","description":"The time when the incident ended"}},"required":["id","startTime","state"]},"CompassCreateLifecycleEventInputDto":{"type":"object","description":"A lifecycle event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the lifecycle event."}},"required":["description","displayName","externalEventSourceId","lastUpdated","lifecycleProperties","updateSequenceNumber","url"]},"CompassCreatePullRequestEventInputDto":{"type":"object","description":"A pull request event. Warning: This option is currently only usable by Forge apps and does not add events to the Activity Feed.","properties":{"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"cloudId":{"type":"string","description":"The cloud ID of the event."},"pullRequestProperties":{"$ref":"#/components/schemas/CompassPullRequestInputPropertiesDto","description":"The list of properties of the pull request event."}},"required":["lastUpdated","pullRequestProperties"]},"CompassCreatePushEventInputDto":{"type":"object","description":"A push event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the push event."}},"required":["description","displayName","externalEventSourceId","lastUpdated","pushEventProperties","updateSequenceNumber","url"]},"CompassCreateVulnerabilityEventInputDto":{"type":"object","description":"A vulnerability event.","properties":{"displayName":{"type":"string","description":"The name of the event."},"lastUpdated":{"type":"string","format":"date-time","description":"The last time this event was updated."},"updateSequenceNumber":{"type":"integer","format":"int64","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."},"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":"The list of properties of the vulnerability event."}},"required":["description","displayName","externalEventSourceId","lastUpdated","updateSequenceNumber","url","vulnerabilityProperties"]},"CompassCreateVulnerabilityEventPropertiesInputDto":{"type":"object","description":"The list of properties of the vulnerability event.","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","description":"The severity of the vulnerability"},"score":{"type":"number","format":"double","description":"The CVSS score of the vulnerability (0-10)."},"discoverySource":{"type":"string","description":"The source or tool that discovered the vulnerability."},"vulnerableTarget":{"type":"string","description":"The target system or component that is vulnerable."},"vulnerabilityStartTime":{"type":"string","format":"date-time","description":"The time when the vulnerability started."},"remediationTime":{"type":"string","format":"date-time","description":"The time when the vulnerability was remediated."}},"required":["id","severity","state","vulnerabilityStartTime"]},"CompassCustomEventPropertiesInputDto":{"type":"object","description":"The list of properties of the custom event.","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"]}},"required":["icon","id"]},"CompassDeploymentEventEnvironmentInputDto":{"type":"object","description":"The environment where the deployment event has occurred.","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."}},"required":["category","displayName","environmentId"]},"CompassDeploymentEventPipelineInputDto":{"type":"object","description":"The deployment event pipeline.","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."}},"required":["displayName","pipelineId","url"]},"CompassEventInputDto":{"type":"object","description":"The type of event. One and only one of the fields in this input type must be provided.","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"}}},"CompassIncidentEventSeverityInputDto":{"type":"object","description":"The severity of an incident","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"]}}},"CompassLifecycleEventInputPropertiesDto":{"type":"object","description":"The list of properties of the lifecycle event.","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"]}},"required":["id","stage"]},"CompassPullRequestInputPropertiesDto":{"type":"object","description":"The list of properties of the pull event.","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"]}},"required":["id","pullRequestUrl","repoUrl","status"]},"CompassPushEventAuthorInputDto":{"type":"object","description":"The author who made the push","properties":{"name":{"type":"string","description":"The name of the author."},"email":{"type":"string","description":"The email of the author."}}},"CompassPushEventInputPropertiesDto":{"type":"object","description":"The list of properties of the push event.","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 author who made the push."}},"required":["branchName","id"]},"CompassVulnerabilityEventSeverityInputDto":{"type":"object","description":"The severity of a vulnerability","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"]}},"required":["level"]},"CreateStreamlinedEventRequest":{"type":"object","properties":{"cloudId":{"type":"string"},"event":{"$ref":"#/components/schemas/CompassEventInputDto"},"componentId":{"type":"string"}},"required":["cloudId","event"]},"EntitlementRequestDto":{"type":"object","properties":{"entitlements":{"type":"array","description":"The entitlements to evaluate for the given user and site","items":{"type":"string"},"uniqueItems":true}},"required":["entitlements"]},"EntitlementResponseDto":{"type":"object","properties":{"entitlements":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/EntitlementResultDto"},"description":"A map of entitlements to the result given a user and site"}},"required":["entitlements"]},"EntitlementResultDto":{"discriminator":{"propertyName":"@class"},"properties":{"@class":{"type":"string"}},"required":["@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```"}]}}