Get effective permissions
GET
/api/security/me/permissions
const url = 'https://example.com/api/security/me/permissions';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/security/me/permissions \ --header 'Authorization: Bearer <token>'Returns the calling user’s effective granular permission set used by the UI
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Effective permissions retrieved successfully
Media typeapplication/json
object
wildcard
required
True when the user has full admin access; other fields are omitted
boolean
global
Permission keys granted globally
Array<string>
repos
Per-repository permission keys, keyed by repository ID
object
key
additional properties
Array<string>
sites
Per-site permission keys, keyed by site ID
object
key
additional properties
Array<string>
Example
{ "wildcard": false}Unauthenticated
Media typeapplication/json
object
error
required
Indicates an error occurred
boolean
message
required
Error message describing what went wrong
string
Example
{ "error": true, "message": "Item not found"}