Product REST APIs
Async events API
Fetch API
Storage API

Privacy API

Forge Privacy API provides functions to help app developers comply with Atlassian's user privacy requirements.

Import the Privacy API package in your app, as follows:

1
2
import { privacy } from '@forge/api';

The reportPersonalData function returns updates on whether a user account needs to be updated or erased. This helper function calls the 3LO /report-accounts endpoint and handles requests with more than 90 accounts.

1
2
const updates = await privacy.reportPersonalData([
  {
    accountId: 'account-id-a',
    updatedAt: '2018-10-25T23:08:51.382Z'
  },
  {
    accountId: 'account-id-b',
    updatedAt: '2018-10-25T23:14:44.231Z'
  },
  {
    accountId: 'account-id-c',
    updatedAt: '2018-12-01T02:44:21.020Z'
  }
]);

console.log(updates)
// [{
//   "accountId": "account-id-a",
//   "status": "closed"
// },
// {
//   "accountId": "account-id-c",
//   "status": "updated"
// }]

Method signature

1
2
reportPersonalData(
  accounts: Array<{ accountId: string; updatedAt: string }>
) => Promise<Array<{ accountId: string; status: 'updated' | 'closed' }>>;

Parameters

NameTypeDescription
accountsArray<{ accountId: string; updatedAt: string }>A list of the accounts to get updates for. Returns updates to the account after the updatedAt time.

Rate this page: