{ "info": { "_postman_id": "5f14ff39-ae3f-4bbe-91cb-b4ff797a522b", "name": "Compass REST API", "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" }, "item": [ { "name": "Metrics", "description": "This resource represents metrics. Use this resource to send metric values into a component's metric source.", "item": [ { "name": "Send metric value", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/metrics", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "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.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "raw", "raw": "" } }, "response": [] } ] }, { "name": "Events", "description": "This resource represents events. Use this resource to send events into an event source.", "item": [ { "name": "Send event", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/events", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Sends an event into an event source. This API is rate limited. Only 100 requests per user per minute are allowed.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "raw", "raw": "" } }, "response": [] } ] }, { "name": "Package Dependencies", "description": "This resource represents package dependencies. Use this resource to associate package dependencies with a component.", "item": [ { "name": "Upload Package Dependencies via Lock File", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/package_dependencies/lock_file", "query": [ { "key": "sourceId", "value": "{{sourceId}}", "disabled": false }, { "key": "baseSourceUrl", "value": "{{baseSourceUrl}}", "disabled": false }, { "key": "componentId", "value": "{{componentId}}", "disabled": false } ], "variable": [] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" }, { "description": "", "disabled": false, "key": "Accept", "value": "*/*" } ], "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```", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "formdata", "formdata": [ { "key": "file", "disabled": false, "type": "file" } ] } }, "response": [] }, { "name": "Delete Package Dependencies given a Source", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/package_dependencies/lock_file/:componentId/:sourceId", "query": [], "variable": [ { "key": "componentId", "value": "{{componentId}}", "disabled": false }, { "key": "sourceId", "value": "{{sourceId}}", "disabled": false } ] }, "method": "DELETE", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "*/*" } ], "description": "Delete all the package dependencies associated with a particular source.The `sourceId` parameter needs to be Base64 encoded.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } } }, "response": [] } ] }, { "name": "Other operations", "item": [ { "name": "Get Forge App attachment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/component/:componentId/app/:forgeAppId/attachment/:key", "query": [], "variable": [ { "key": "componentId", "value": "{{componentId}}", "disabled": false }, { "key": "forgeAppId", "value": "{{forgeAppId}}", "disabled": false }, { "key": "key", "value": "{{key}}", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get a file attached to a component. If you need to have attachment upload enabled for your Compass Forge app, contact Atlassian support.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } } }, "response": [] }, { "name": "Upload Forge App attachment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/component/:componentId/app/:forgeAppId/attachment/:key", "query": [], "variable": [ { "key": "componentId", "value": "{{componentId}}", "disabled": false }, { "key": "forgeAppId", "value": "{{forgeAppId}}", "disabled": false }, { "key": "key", "value": "{{key}}", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "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```", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "formdata", "formdata": [ { "key": "file", "disabled": false, "type": "file" } ] } }, "response": [] }, { "name": "Delete Forge App attachment", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/component/:componentId/app/:forgeAppId/attachment/:key", "query": [], "variable": [ { "key": "componentId", "value": "{{componentId}}", "disabled": false }, { "key": "forgeAppId", "value": "{{forgeAppId}}", "disabled": false }, { "key": "key", "value": "{{key}}", "disabled": false } ] }, "method": "DELETE", "header": [], "description": "Delete file attached to a component. If you need to have attachment upload enabled for your Compass Forge app, contact Atlassian support.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } } }, "response": [] }, { "name": "Upload Component API Spec", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/component/:componentId/api_specs", "query": [], "variable": [ { "key": "componentId", "value": "{{componentId}}", "disabled": false } ] }, "method": "PUT", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "multipart/form-data" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "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```", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "formdata", "formdata": [ { "key": "file", "disabled": false, "type": "file" } ] } }, "response": [] }, { "name": "An invocation of an inbound webhook", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/webhooks/:webhookId", "query": [], "variable": [ { "key": "webhookId", "value": "{{webhookId}}", "disabled": false } ] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" } ], "description": "Third parties can call these inbound webhooks to dothings within compass, like create deployment events for webhooks coming from github", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "raw", "raw": "" } }, "response": [] }, { "name": "Get Entitlement Results", "request": { "url": { "protocol": "{{protocol}}", "host": "{{host}}", "path": "{{basePath}}compass/v1/entitlements", "query": [], "variable": [] }, "method": "POST", "header": [ { "description": "", "disabled": false, "key": "Content-Type", "value": "application/json" }, { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Get entitlement results for a given user and site", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } }, "body": { "mode": "raw", "raw": "" } }, "response": [] } ] } ], "variable": [ { "key": "protocol", "name": "Protocol", "description": "The HTTP Protocol that should be used for this REST API.", "type": "string", "value": "https" }, { "key": "host", "name": "Host", "description": "The HTTP host that should be used for this REST API.", "type": "string", "value": "your-domain.atlassian.net" }, { "key": "basePath", "name": "Base Path", "description": "The path, after the host, of the base of the REST API.", "type": "string", "value": "gateway/api/" } ] }