### Clone Confluence Blueprint Example Source: https://developer.atlassian.com/cloud/confluence/multi-page-blueprints-with-confluence-connect Clone the example repository to start building your blueprint. ```bash $ git clone https://bitbucket.org/atlassianlabs/confluence-multipage-blueprint-example.git ``` -------------------------------- ### Start Confluence Connect App Source: https://developer.atlassian.com/cloud/confluence/multi-page-blueprints-with-confluence-connect Start your Atlassian Connect app using npm to begin the installation process. ```bash $ npm start ``` -------------------------------- ### Get license Source: https://developer.atlassian.com/cloud/jira/platform/jiracloud.2.postman.json Returns licensing information about the Jira instance. Use this resource to get available metrics for Jira licences. ```APIDOC ## GET /rest/api/2/instance/license ### Description Returns licensing information about the Jira instance. ### Method GET ### Endpoint {{basePath}}rest/api/2/instance/license ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ### Permissions None. ``` -------------------------------- ### Python Example for GET Request Source: https://developer.atlassian.com/cloud/assets/rest A Python example demonstrating how to fetch object data from the Assets API using the 'requests' library. Ensure you have the library installed. ```python import requests url = "https://api.atlassian.com/ex/jira/{cloudId}/jsm/assets/workspace/{workspaceId}/v1/aql/objects" headers = { 'Authorization': "Bearer ", 'Accept': "application/json" } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Basic Bulk Customer Profile Creation Example Source: https://developer.atlassian.com/cloud/customer-service-management/bulk-apis A complete example demonstrating how to create customer profiles in bulk. Ensure the 'Idempotency-Key' header is included for safe retries. ```bash curl -X POST \ https://your-domain.atlassian.net/rest/api/v1/customer/profiles/bulk \ -H 'Authorization: Basic ' -H 'Idempotency-Key: f47ac10b-58cc-4372-a567-0e02b2c3d479' \ -H 'Content-Type: application/json' \ -d '{ "customers": [ { "externalId": "cust123", "email": "test@example.com", "name": "Test Customer" } ] }' ``` -------------------------------- ### Navigate to Java Example Directory Source: https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-oauth-authentication Navigate to the 'java' directory within the cloned atlassian-oauth-examples repository to access the example client application code. ```bash cd atlassian-oauth-examples/java ``` -------------------------------- ### Get available workitem link types Source: https://developer.atlassian.com/cloud/acli/reference/commands/jira-workitem-link-type Use this command to list all available work item link types in Jira. No setup or imports are required beyond having the 'acli' tool installed. ```bash acli jira workitem link type [flags] ``` ```bash # Get available workitem link types $ acli jira workitem link type ``` -------------------------------- ### Example UI Support Configuration Source: https://developer.atlassian.com/cloud/confluence/modules/custom-content Shows how to configure the UI support for custom content, specifying a content view component by its module key. ```json { "contentViewComponent": { "addonKey": "addon-key", "moduleKey": "general-page-module-key" } } ``` -------------------------------- ### Get Request SLA Information (JSON Response) Source: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request This is an example of the JSON response when retrieving SLA information. It details completed and ongoing SLA cycles, including start and stop times, breach times, and durations. ```json { "_expands": [], "size": 3, "start": 3, "limit": 3, "isLastPage": false, "_links": { "base": "https://your-domain.atlassian.net/rest/servicedeskapi", "context": "context", "next": "https://your-domain.atlassian.net/rest/servicedeskapi/request/101102/sla?start=6&limit=3", "prev": "https://your-domain.atlassian.net/rest/servicedeskapi/request/101102/sla?start=0&limit=3" }, "values": [ { "name": "Time To First Response", "_links": { "self": "https://your-domain.atlassian.net/rest/servicedeskapi/request/101102/sla/10030" }, "completedCycles": [ { "startTime": { "epochMillis": 1444362323000, "friendly": "Yesterday 10:45 AM", "iso8601": "2015-10-09T10:45:23+0700", "jira": "2015-10-09T10:45:23.000+0700" }, "stopTime": { "epochMillis": 1444362743000, "friendly": "Yesterday 10:52 AM", "iso8601": "2015-10-09T10:52:23+0700", "jira": "2015-10-09T10:52:23.000+0700" }, "breachTime": { "epochMillis": 1444362623000, "friendly": "Yesterday 10:50 AM", "iso8601": "2015-10-09T10:50:23+0700", "jira": "2015-10-09T10:50:23.000+0700" }, "breached": false, "goalDuration": { "millis": 14400000, "friendly": "4h 240m" }, "elapsedTime": { "millis": 420000, "friendly": "0h 7m" }, "remainingTime": { "millis": 13980000, "friendly": "3h 233m" } }, { "startTime": { "epochMillis": 1444449143000, "friendly": "Today 10:52 AM", "iso8601": "2015-10-10T10:52:23+0700", "jira": "2015-10-10T10:52:23.000+0700" }, "stopTime": { "epochMillis": 1444468523000, "friendly": "Today 16:15 PM", "iso8601": "2015-10-10T16:15:23+0700", "jira": "2015-10-10T16:15:23.000+0700" }, "breachTime": { "epochMillis": 1444464743000, "friendly": "Today 15:12 PM", "iso8601": "2015-10-10T15:12:23+0700", "jira": "2015-10-10T15:12:23.000+0700" }, "breached": true, "goalDuration": { "millis": 14400000, "friendly": "4h 240m" }, "elapsedTime": { "millis": 19380000, "friendly": "5h 323m" }, "remainingTime": { "millis": -4980000, "friendly": "-1h -83m" } } ], "ongoingCycle": { "startTime": { "epochMillis": 1444479323000, "friendly": "Today 19:15 PM", "iso8601": "2015-10-10T19:15:23+0700", "jira": "2015-10-10T19:15:23.000+0700" }, "breached": false, "paused": false, "withinCalendarHours": false, "goalDuration": { "millis": 14400000, "friendly": "4h 240m" }, "elapsedTime": { "millis": 5640000, "friendly": "1h 94m" }, "remainingTime": { "millis": 8760000, "friendly": "2h 146m" } } }, { "name": "Time To Resolution", "_links": { "self": "https://your-domain.atlassian.net/rest/servicedeskapi/request/101102/sla/10040" }, "completedCycles": [ { "startTime": { "epochMillis": 1444362323000, "friendly": "Yesterday 10:45 AM", "iso8601": "2015-10-09T10:45:23+0700", "jira": "2015-10-09T10:45:23.000+0700" }, "stopTime": { "epochMillis": 1444398743000, "friendly": "Yesterday 20:52 PM", "iso8601": "2015-10-09T20:52:23+0700", "jira": "2015-10-09T20:52:23.000+0700" }, "breachTime": { "epochMillis": 1444398623000, "friendly": "Yesterday 20:50 PM", "iso8601": "2015-10-09T20:50:23+0700", "jira": "2015-10-09T20:50:23.000+0700" }, "breached": false, "goalDuration": { "millis": 72000000, "friendly": "20h 1200m" }, "elapsedTime": { "millis": 36420000, "friendly": "10h 607m" }, "remainingTime": { "millis": 35580000, "friendly": "9h 593m" } }, { "startTime": { "epochMillis": 1444485143000, "friendly": "Today 20:52 PM", "iso8601": "2015-10-10T20:52:23+0700", "jira": "2015-10-10T20:52:23.000+0700" }, "stopTime": { "epochMillis": 1444504523000, "friendly": "Today 02:15 AM", "iso8601": "2015-10-11T02:15:23+0700", "jira": "2015-10-11T02:15:23.000+0700" } } ] } ] } ``` -------------------------------- ### Get Available Transitions Source: https://developer.atlassian.com/cloud/jira/platform/jiracloud.3.postman.json Retrieve available transitions for issues using a GET request. Parameters include issue IDs or keys, and optional pagination cursors. ```http GET {{basePath}}rest/api/3/bulk/issues/transition?issueIdsOrKeys={{issueIdsOrKeys}} HTTP/1.1 Host: {{host}} Accept: application/json ``` -------------------------------- ### Project Deploy Keys Response Example Source: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments An example JSON response when listing project deploy keys. It includes details like key, label, and creation date. ```json { "pagelen": 10, "values": [ { "comment": "thakseth@C02W454JHTD8", "last_used": null, "links": { "self": { "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/1234" } }, "label": "test", "project": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" } }, "type": "project", "name": "cooperative standard", "key": "TEST_PROJECT", "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" }, "created_on": "2021-07-28T21:20:19.491721+00:00", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDX5yfMOEw6HG9jKTYTisbmDTJ4MCUTSVGr5e4OWvY3UuI2A6F8SdzQqa2f5BABA/4g5Sk5awJrYHlNu3EzV1V2I44tR3A4fnZAG71ZKyDPi1wvdO7UYmFgxV/Vd18H9QZFFjICGDM7W0PT2mI0kON/jN3qNWi+GiB/xgaeQKSqynysdysDp8lnnI/8Sh3ikURP9UP83ShRCpAXszOUNaa+UUlcYQYBDLIGowsg51c4PCkC3DNhAMxppkNRKoSOWwyl+oRVXHSDylkiJSBHW3HH4Q6WHieD54kGrjbhWBKdnnxKX7QAAZBDseY+t01N36m6/ljvXSUEcBWtHxBYye0r", "type": "project_deploy_key", "id": 1234 } ], "page": 1, "size": 1 } ``` -------------------------------- ### Get Organizations Response Example Source: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-organization Example JSON response for the 'Get organizations' API call, showing paginated organization data. ```json { "_expands": [], "size": 1, "start": 1, "limit": 1, "isLastPage": false, "_links": { "base": "https://your-domain.atlassian.net/rest/servicedeskapi", "context": "context", "next": "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=2&limit=1", "prev": "https://your-domain.atlassian.net/rest/servicedeskapi/organization?start=0&limit=1" }, "values": [ { "_links": { "self": "https://your-domain.atlassian.net/rest/servicedeskapi/organization/1" }, "id": "1", "name": "Charlie Cakes Franchises", "scimManaged": false } ] } ``` -------------------------------- ### Node.js Example for GET /rest/api/3/notificationscheme/project Source: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-notification-schemes Example of how to call the Get notification schemes by project API using Node.js with Atlassian Forge. ```javascript // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import { requestJira } from "@forge/bridge"; const response = await requestJira(`/rest/api/3/notificationscheme/project`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); ``` -------------------------------- ### Example DataProviderResponse Implementation Source: https://developer.atlassian.com/cloud/compass/integrations/create-a-data-provider-app This example demonstrates how to implement a data provider function for Bitbucket. It shows how to extract a URL, determine if it's a valid repository, and construct a DataProviderResponse with events, metrics, and initial values. ```typescript import { DataProviderResponse, DataProviderEventTypes, BuiltinMetricDefinitions, DataProviderResult, } from '@atlassian/forge-graphql' async function dataProvider(request: { url: string }): Promise { const { url } = request; const externalSourceId = getExternalSourceIdFromUrlStub(url); if (!externalSourceId) { // The URL doesn't represent a repo in the connected Bitbucket workspace. // In this case, just return `null` to show that you don't care about the link. return null; } // Initialize the `DataProviderResponse` class with desired events & metrics to enable const response = new DataProviderResponse(externalSourceId, { eventTypes: [DataProviderEventTypes.DEPLOYMENTS, DataProviderEventTypes.BUILDS], builtInMetricDefinitions: [{ name: BuiltinMetricDefinitions.BUILD_SUCCESS_RATE, derived: true}], customMetricDefinitions: [{ name: 'My custom metric', format: { suffix: 'req/min' } }], }); // Retrieve events from the external system & calculate metrics const deploymentValues = await getDeploymentValuesFromBitbucketStub(externalSourceId); const buildValues = await getBuildValuesFromBitbucketStub(externalSourceId); const buildSuccessRate = calculateBuildSuccessRateStub(buildValues); const customMetric = 33; // Add initial values & return the response return response .addDeployments(deploymentValues) .addBuilds(buildValues) .addBuiltInMetricValue(BuiltinMetricDefinitions.BUILD_SUCCESS_RATE, buildSuccessRate) .addCustomMetricValue('My custom metric', customMetric) .build(); } ``` -------------------------------- ### Get all tasks response example Source: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-task Example JSON response for the 'Get tasks' endpoint, showing a list of tasks with their details and pagination links. ```json { "results": [ { "id": "", "localId": "", "spaceId": "", "pageId": "", "blogPostId": "", "status": "complete", "body": { "storage": {}, "atlas_doc_format": {} }, "createdBy": "", "assignedTo": "", "completedBy": "", "createdAt": "", "updatedAt": "", "dueAt": "", "completedAt": "" } ], "_links": { "next": "", "base": "" } } ``` -------------------------------- ### Listing Repositories (Example) Source: https://developer.atlassian.com/cloud/bitbucket/scopes-for-oauth-2-3LO-and-forge-apps Example of how to list all repositories using curl. ```APIDOC ## GET /2.0/repositories ### Description Lists all repositories. ### Method GET ### Endpoint `https://api.bitbucket.org/2.0/repositories/` ### Request Example ```bash curl https://api.bitbucket.org/2.0/repositories/tutorials/tutorials.bitbucket.org ``` ``` -------------------------------- ### Get license Source: https://developer.atlassian.com/cloud/jira/platform/jiracloud.3.postman.json Returns licensing information about the Jira instance. No specific permissions are required. ```APIDOC ## GET /rest/api/3/instance/license ### Description Returns licensing information about the Jira instance. ### Method GET ### Endpoint /rest/api/3/instance/license ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Get task by ID response example Source: https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-task Example JSON response for the 'Get task by id' endpoint, detailing a single task's properties. ```json { "id": "", "localId": "", "spaceId": "", "pageId": "", "blogPostId": "", "status": "complete", "body": { "storage": { "representation": "", "value": "" }, "atlas_doc_format": { "representation": "", "value": "" } }, "createdBy": "", "assignedTo": "", "completedBy": "", "createdAt": "", "updatedAt": "", "dueAt": "", "completedAt": "" } ``` -------------------------------- ### Authenticate with API Token Example Source: https://developer.atlassian.com/cloud/acli/changelog/rss/a/c5df2fd1-189f-4e24-9717-8f36d1d9c2f6 An updated example for 'acli auth login' demonstrating authentication with an API token. ```bash acli auth login ``` -------------------------------- ### Node.js Example for GET Request Source: https://developer.atlassian.com/cloud/assets/rest Example of how to make a GET request to the Assets API using Node.js. This snippet demonstrates fetching object data. ```javascript const fetch = require('node-fetch'); const options = { method: 'GET', headers: { 'Authorization': 'Bearer ', 'Accept': 'application/json' } }; fetch('https://api.atlassian.com/ex/jira/{cloudId}/jsm/assets/workspace/{workspaceId}/v1/aql/objects', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err)); ``` -------------------------------- ### Example Page Module Configuration Source: https://developer.atlassian.com/cloud/confluence/modules/page This JSON snippet shows how to define generalPages and a postInstallPage within the modules section of a descriptor. It includes URLs, icons, and names for the pages. ```json { "modules": { "generalPages": [ { "url": "/my-general-page", "icon": { "width": 80, "height": 80, "url": "/maps/icon.png" }, "name": { "value": "My General Page" }, "key": "my-general-page" } ], "postInstallPage": { "url": "/my-post-install-page", "name": { "value": "My Post-Install Page", "i18n": "mypostinstallpage.name" }, "key": "my-post-install-page" } } } ``` -------------------------------- ### Project Deploy Key Response Example Source: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments This is an example of a successful response when creating or retrieving a project deploy key. It includes details like the key's label, project information, and the public key itself. ```json { "comment": "mleu@C02W454JHTD8", "last_used": null, "links": { "self": { "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT/deploy-keys/5/" } }, "label": "myprojectkey", "project": { "links": { "self": { "href": "https://api.bitbucket.org/2.0/workspaces/standard/projects/TEST_PROJECT" } }, "type": "project", "name": "cooperative standard", "key": "TEST_PROJECT", "uuid": "{3b3e510b-7f2b-414d-a2b7-76c4e405c1c0}" }, "created_on": "2021-08-10T05:28:00.570859+00:00", "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAK/b1cHHDr/TEV1JGQl+WjCwStKG6Bhrv0rFpEsYlyTBm1fzN0VOJJYn4ZOPCPJwqse6fGbXntEs+BbXiptR+++HycVgl65TMR0b5ul5AgwrVdZdT7qjCOCgaSV74/9xlHDK8oqgGnfA7ZoBBU+qpVyaloSjBdJfLtPY/xqj4yHnXKYzrtn/uFc4Kp9Tb7PUg9Io3qohSTGJGVHnsVblq/rToJG7L5xIo0OxK0SJSQ5vuId93ZuFZrCNMXj8JDHZeSEtjJzpRCBEXHxpOPhAcbm4MzULgkFHhAVgp4JbkrT99/wpvZ7r9AdkTg7HGqL3rlaDrEcWfL7Lu6TnhBdq5", "type": "project_deploy_key", "id": 5 } ``` -------------------------------- ### Get Groups in an Organization Response Example Source: https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups Example JSON response for the 'Get groups in an organization' API call, showing group data, counts, and pagination links. ```json { "data": [ { "id": "12345678-1234-1234-1234-123456789012", "name": "jira-administrators", "description": "This group provides admin access to Jira.", "directoryId": "12345678-1234-1234-1234-123456789012", "managementAccess": { "deletable": true, "modifiable": true, "readable": true }, "externalSynced": true, "managedBy": "external", "counts": { "users": 10, "resources": 109 }, "links": { "self": "ECg53CukK1twBo0LK1u9nw" } } ], "links": { "self": "ObSbZxpM1f1fzia2_GnuJw", "prev": "LIZFEbzCT2pCCkQhPIUgIQ", "next": "kloHX1ZQVasDAkx_P48NYQ" } } ``` -------------------------------- ### Create Jira work item with summary, project, and type Source: https://developer.atlassian.com/cloud/acli/reference/commands/jira-workitem-create Use this example to create a basic Jira work item by providing its summary, project key, and type directly via flags. ```bash acli jira workitem create --summary "New Task" --project "TEAM" --type "Task" ``` -------------------------------- ### Get Available Priorities by Priority Scheme Source: https://developer.atlassian.com/cloud/jira/platform/jiracloud.2.postman.json Retrieve a paginated list of available priorities for a given priority scheme. This GET request can be filtered by name using the 'query' parameter and can exclude specific priority IDs. Pagination parameters 'startAt' and 'maxResults' are also available. ```url ?startAt={{startAt}}&maxResults={{maxResults}}&query={{query}}&schemeId={{schemeId}}&exclude={{exclude}} ``` -------------------------------- ### Example App Descriptor Source: https://developer.atlassian.com/cloud/confluence/app-descriptor A basic example of an atlassian-connect.json file, illustrating its structure and common properties. ```json { "key": "com.example.my-app", "name": "My Sample App", "baseUrl": "https://example.com", "vendor": { "name": "Atlassian", "url": "https://atlassian.com" }, "authentication": { "type": "jwt" }, "lifecycle": { "installed": "/installed", "uninstalled": "/uninstalled", "enabled": "/enabled", "disabled": "/disabled" }, "scopes": [ "read", "write" ], "modules": { "generalPages": [ { "url": "/", "name": { "value": "Home" }, "key": "home" } ], "webPanels": [ { "url": "/profile-panel", "name": { "value": "Profile" }, "key": "profile-panel", "location": "system.user.profile.panel" } ] } } ``` -------------------------------- ### Example GET Request Log Source: https://developer.atlassian.com/cloud/confluence/working-with-a-macro-body This shows an example of the GET request logged by the server when the app's route handler is invoked. It includes query parameters like macroId, pageId, and pageVersion. ```log GET /myMacro?macroId=729c5f82-f62c-465b-b010-31777343d357&pageId=358416385&pageVersion=1&xdm_e=https%3A%2F%2Fyour%20dev%20instance.atlassian.net&xdm_c=channel-my-macro&cp=%2Fwiki&xdm_deprecated_addon_key_do_not_use=my-app&lic=none&cv=1.695.0 200 402.004 ms - 1391 ``` -------------------------------- ### Example Modules Configuration Source: https://developer.atlassian.com/cloud/bitbucket/app-descriptor Configures various integration points for a Bitbucket app, including OAuth consumers, webhooks, web items, repository pages, and web panels. ```json "modules": { "oauthConsumer": { "clientId": "{{consumerKey}}" }, "webhooks": [ { "event": "*", "url": "/webhook" } ], "webItems": [ { "url": "http://example.com?repoUuid={repository.uuid}", "name": { "value": "Example Web Item" }, "location": "org.bitbucket.repository.navigation", "key": "example-web-item", "params": { "auiIcon": "aui-iconfont-link" } } ], "repoPages": [ { "url": "/connect-example?repoUuid={repository.uuid}", "name": { "value": "Example Page" }, "location": "org.bitbucket.repository.navigation", "key": "example-repo-page", "params": { "auiIcon": "aui-iconfont-doc" } } ], "webPanels": [ { "url": "/connect-example?repoUuid={repository.uuid}", "name": { "value": "Example Web Panel" }, "location": "org.bitbucket.repository.overview.informationPanel", "key": "example-web-panel" } ] }, } ``` -------------------------------- ### Get all issue types response example Source: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-types Example JSON response when fetching all issue types. ```json [ { "avatarId": 1, "description": "A task that needs to be done.", "hierarchyLevel": 0, "iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10299&avatarType=issuetype", "id": "3", "name": "Task", "self": "https://your-domain.atlassian.net/rest/api/3/issueType/3", "subtask": false }, { "avatarId": 10002, "description": "A problem with the software.", "entityId": "9d7dd6f7-e8b6-4247-954b-7b2c9b2a5ba2", "hierarchyLevel": 0, "iconUrl": "https://your-domain.atlassian.net/secure/viewavatar?size=xsmall&avatarId=10316&avatarType=issuetype", "id": "1", "name": "Bug", "scope": { "project": { "id": "10000" }, "type": "PROJECT" }, "self": "https://your-domain.atlassian.net/rest/api/3/issueType/1", "subtask": false } ] ``` -------------------------------- ### Get Objecttype Response Example Source: https://developer.atlassian.com/cloud/assets/rest/api-group-objecttype Example JSON response for a successful GET request to retrieve an object type. It details the object type's properties, including its name, description, icon, and associated workspace. ```json { "workspaceId": "g2778e1d-939d-581d-c8e2-9d5g59de456b", "globalId": "g2778e1d-939d-581d-c8e2-9d5g59de456b:23", "id": "23", "name": "Office", "type": 0, "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nec ex.", "icon": { "id": "13", "name": "Building", "url16": "https://api.atlassian.com/ex/jira/{cloudId}/jsm/assets/workspace/g2778e1d-939d-581d-c8e2-9d5g59de456b/v1/objecttype/23/icon.png?size=16", "url48": "https://api.atlassian.com/ex/jira/{cloudId}/jsm/assets/workspace/g2778e1d-939d-581d-c8e2-9d5g59de456b/v1/objecttype/23/icon.png?size=48" }, "position": 2, "created": "2021-02-16T19:36:51.951Z", "updated": "2021-04-16T15:17:03.384Z", "objectCount": 4, "objectSchemaId": "6", "inherited": false, "abstractObjectType": false, "parentObjectTypeInherited": false } ``` -------------------------------- ### Example Response for Create Repository Action Source: https://developer.atlassian.com/cloud/jira/platform/modules/development-tool This snippet shows the expected response format after successfully creating a repository, including its details. ```json { // Identifier of the repository which will be used to hydrate repository details "id": "f730ce9c-3442-4f8a-93a4-a44f3b35c46b/target/111-222-333", // Human readable name of the repository "name": "my-repo-name", // Url allowing Jira to link directly to the provider's repository "url": "https://my.devinfo.provider.com/f730ce9c-3442-4f8a-93a4-a44f3b35c46b/repo/f730ce9c-3442-4f8a-93a4-a44f3b35c46b", // Optional, url providing the avatar for the repository. "avatarUrl": "https://res.cloudinary.com/snyk/image/upload/v1584038122/groups/Atlassian_Logo.png", // The date and time this repository was last scanned/updated "lastUpdatedDate": "2022-01-19T23:27:25+00:00" } ``` -------------------------------- ### List Environments Response Example Source: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-deployments Example JSON response structure for listing deployment environments. ```json { "page": 102, "values": [ { "type": "", "uuid": "", "name": "" } ], "size": 142, "pagelen": 159, "next": "", "previous": "" } ``` -------------------------------- ### Example Response for Get Feedback Source: https://developer.atlassian.com/cloud/jira/service-desk/rest/api-group-request An example of a successful 200 OK response when retrieving feedback for a request. ```json { "type": "csat", "rating": 4, "comment": { "body": "Great work!" } } ``` -------------------------------- ### Example JSON response for getting a snippet comment Source: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-snippets This is an example of the JSON response when successfully retrieving a snippet comment. ```json { "type": "", "links": { "self": { "href": "", "name": "" }, "html": { "href": "", "name": "" } }, "snippet": { "type": "" } } ``` -------------------------------- ### Basic Example Source: https://developer.atlassian.com/cloud/jira/software/jsapi/events Demonstrates how to use AP.events.on, AP.events.emit, AP.events.emitPublic, and AP.events.onPublic for inter-addon communication. ```APIDOC ## Basic Example This example shows how Add-on A can emit events and how Add-on B can listen for them. ### Add-on A Code: ```javascript // The following will create an alert message every time the event `customEvent` is triggered. AP.events.on('customEvent', function(){ alert('event fired'); }); AP.events.emit('customEvent'); AP.events.emitPublic('customPublicEvent'); ``` ### Add-on B Code: ```javascript // The following will create an alert message every time the event `customPublicEvent` is triggered by add-on A. AP.events.onPublic('customPublicEvent', function(){ alert('public event fired'); }); ``` ``` -------------------------------- ### Get Project Components Paginated Source: https://developer.atlassian.com/cloud/jira/platform/jiracloud.2.postman.json Retrieves a paginated list of components for a given project. ```APIDOC ## GET /rest/api/2/project/:projectIdOrKey/component ### Description Retrieves a paginated list of components for a given project. ### Method GET ### Endpoint {{basePath}}rest/api/2/project/:projectIdOrKey/component ### Parameters #### Path Parameters - **projectIdOrKey** (string) - Required - The project ID or project key. #### Query Parameters - **startAt** (integer) - Optional - The index of the first item to return in a page of results (page offset). - **maxResults** (integer) - Optional - The maximum number of items to return per page. ### Response #### Success Response (200) (No specific response fields documented in the source.) #### Error Response (Error handling details not provided in the source.) ``` -------------------------------- ### Start Confluence Connect App Source: https://developer.atlassian.com/cloud/confluence/creating-a-general-page Run the npm start command to launch your Confluence Connect app on a local machine and initiate installation to your Confluence Cloud development instance. ```bash npm start ``` -------------------------------- ### Confluence Cloud API GET Request Example Source: https://developer.atlassian.com/cloud/confluence/confcloud.2.postman.json Example of a GET request to retrieve the status of an async space permission transition task. Requires a taskId from a previous operation. The request includes authentication details and an Accept header. ```json { "path": "{{basePath}}space-permissions/transition/tasks/:taskId", "query": [], "variable": [ { "key": "taskId", "value": "{{taskId}}", "description": "The ID of the async task, as returned by the generate-combinations, assign-roles, or remove-access endpoints.", "disabled": false } ] }, "method": "GET", "header": [ { "description": "", "disabled": false, "key": "Accept", "value": "application/json" } ], "description": "Retrieves the status of an async space permission transition task. Use the taskId returned\nfrom the generate-combinations, assign-roles, or remove-access endpoints to poll for\nprogress and completion.\n\n**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:\nUser must be a Confluence administrator.", "auth": { "type": "basic", "basic": { "username": "{{username}}", "password": "{{apiToken}}" } } } ``` -------------------------------- ### Node.js Example Source: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components Example of how to fetch project components using Node.js with Atlassian Forge. ```javascript // This sample uses Atlassian Forge // https://developer.atlassian.com/platform/forge/ import { requestJira } from "@forge/bridge"; const response = await requestJira(`/rest/api/3/project/{projectIdOrKey}/component`, { headers: { 'Accept': 'application/json' } }); console.log(`Response: ${response.status} ${response.statusText}`); console.log(await response.json()); ``` -------------------------------- ### Member Cards Response Example Source: https://developer.atlassian.com/cloud/trello/rest/api-group-members Example JSON response for the 'Get Member Cards' endpoint, detailing card properties. ```json [ { "id": "5abbe4b7ddc1b351ef961414", "address": "", "badges": { "attachmentsByType": { "trello": { "board": 2154, "card": 2154 } }, "location": true, "votes": 2154, "viewingMemberVoted": false, "subscribed": false, "fogbugz": "", "checkItems": 0, "checkItemsChecked": 0, "comments": 0, "attachments": 0, "description": true, "due": "", "start": "", "dueComplete": true }, "cardRole": "mirror", "checkItemStates": [ "" ], "closed": true, "coordinates": "", "creationMethod": "", "dateLastActivity": "2019-09-16T16:19:17.156Z", "desc": "πŸ‘‹Hey there,\n\nTrello's Platform team uses this board to keep developers up-to-date.", "descData": { "emoji": {} }, "due": "", "dueReminder": "", "idBoard": "5abbe4b7ddc1b351ef961414", "idChecklists": [ { "id": "5abbe4b7ddc1b351ef961414" } ], "idLabels": [ { "id": "5abbe4b7ddc1b351ef961414", "idBoard": "5abbe4b7ddc1b351ef961414", "name": "Overdue", "color": "yellow" } ], "idList": "5abbe4b7ddc1b351ef961414", "idMembers": [ "5abbe4b7ddc1b351ef961414" ], "idMembersVoted": [ "5abbe4b7ddc1b351ef961414" ], "idShort": 2154, "labels": [ "5abbe4b7ddc1b351ef961414" ], "limits": { "attachments": { "perBoard": {} } }, "locationName": "", "manualCoverAttachment": false, "name": "πŸ‘‹ What? Why? How?", "pos": 65535, "shortLink": "H0TZyzbK", "shortUrl": "https://trello.com/c/H0TZyzbK", "subscribed": false, "url": "https://trello.com/c/H0TZyzbK/4-%F0%9F%91%8B-what-why-how", "cover": { "color": "yellow", "idUploadedBackground": true, "size": "normal", "brightness": "light", "isTemplate": false } } ] ``` -------------------------------- ### Full Request Example Source: https://developer.atlassian.com/cloud/migration/update-product-links This example shows how to set environment variables for your email, API token, and site ID, and then use curl to make a POST request to the Atlassian API. Ensure you have the necessary authentication credentials and the correct site ID. ```bash export YOUR_EMAIL=charlie@atlassian.com export YOUR_API_TOKEN=21Iv4we2ZtoLixXX21OUQiF06a export SITE_ID=b436336f-99ce-2fbc-4520-7301132h1674 export REQUEST_BODY="{ \"product\": \"jira\", \"productURL\": \"https://jira.atlassian.net\", \"destinationURL\": \"https://confluence.atlassian.net\", \"migratedFrom\": \"https://confluence-datacenter.com\", \"migratedFromOverride\": \"https://confluence-dc-production.com\", \"createBackup\": \"true\" }" curl \ -u "$YOUR_EMAIL:$YOUR_API_TOKEN" \ -H 'Content-Type: application/json' \ -XPOST "https://api.atlassian.com/links/v1/${SITE_ID}/jobs/cma" \ --data "$REQUEST_BODY" ``` -------------------------------- ### Workspace Data Policy Response Example Source: https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-data-policies Example JSON response for a successful request to get the workspace data policy. ```json { "anyContentBlocked": false } ``` -------------------------------- ### Example JSON for Configuration Description Source: https://developer.atlassian.com/cloud/jira/software/modules/workflow-condition Shows an example of a dynamic configuration description using a Jira expression. ```json { "expression": "config.myField == 'someValue'" } ``` -------------------------------- ### Get Stakeholders Response Example Source: https://developer.atlassian.com/cloud/incidents/rest/api-group-stakeholders Example JSON response when successfully retrieving stakeholders for a Jira Service Management incident. ```json { "stakeholders": [ { "ari": "ari:cloud:identity::user/627bf6c6a20bd0006fda4da3" } ] } ``` -------------------------------- ### Third-Party CDN Example (unpkg) Source: https://developer.atlassian.com/cloud/jira/platform/changelog/rss/a/c5df2fd1-189f-4e24-9717-8f36d1d9c2f6 Use unpkg to serve AUI npm packages. This is an alternative if migrating to Forge or bundling directly is not suitable. ```url https://unpkg.com/aui@latest/ ``` -------------------------------- ### Get list of policies response Source: https://developer.atlassian.com/cloud/admin/control/rest/api-group-policies Example JSON response for the 'Get list of policies' endpoint, showing pagination metadata. ```json { "data": [ {} ], "meta": { "next": "", "page_size": 25 }, "links": { "self": "", "prev": "", "next": "", "page_size": "" } } ``` -------------------------------- ### Provision Product Instance on New Site Source: https://developer.atlassian.com/cloud/admin/cookbook-install-apps-products Use this request to create a new cloud site and provision a product instance. Ensure you have the offering ID, admin email, desired site name, and timezone. ```curl curl --request POST \ --url 'https://api.atlassian.com/admin/installations/v2/orgs/{orgId}/products' \ --header 'Authorization: Bearer ' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --data '{ "offerings": [ { "id": "39605741-b92f-4763-8229-7bba2d16433c", //offering ID "location": "us" }, ... ], "parameters": { "adminEmail": "", "name": "acme-2", "timezone": "Australia/Sydney" } }' ```