Superface

Atlassian Accessible Resources

atlassian/accessible-resources@1.0.0
1 provider

List Accessible Resources

List currently accessible Atlassian resources (e.g. Jira sites, Confluence sites...) along with their information.

Result
resources

1.Choose a provider

2.Use ListAccessibleResources with mock in your code

Below instructions are for our Node.js SDK. Use OneService for other languages.
npm i @superfaceai/one-sdk
const { SuperfaceClient } = require('@superfaceai/one-sdk');

// You can manage tokens here: https://superface.ai/insights
const sdk = new SuperfaceClient({ sdkAuthToken: '<< Login to get your token >>' });

async function run() {
  // Load the profile
  const profile = await sdk.getProfile('atlassian/accessible-resources@1.0.0');

  // Use the profile
  const result = await profile
    .getUseCase('ListAccessibleResources')
    .perform({}, {
      provider: 'mock'
    });

  // Handle the result
  try {
    const data = result.unwrap();
    console.log(data);
  } catch (error) {
    console.error(error);
  }
}

run();

Structure details

Input (object)

Example

{}

Result (object)

resources
id
Unique ID of the resource (also known as `cloudId`).
name
Name of the resource.
url
URL of the resource.
scopes
List of scopes associated with the resource.
avatarUrl
URL of the avatar associated with the resource.

Example

{
  "resources": [
    {
      "id": "1324a887-45db-1bf4-1e99-ef0ff456d421",
      "name": "Site name",
      "url": "https://your-domain.atlassian.net",
      "scopes": [
        "write:jira-work"
      ],
      "avatarUrl": "https://site-admin-avatar-cdn.prod.public.atl-paas.net/avatars/240/flag.png"
    }
  ]
}

Implementation details

Provider
mock
Use case
ListAccessibleResources
Author
@superface
Source
Verified