
> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getunleash.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server.

# Gets available permissions

GET https://app.unleash-instance.example.com/api/admin/permissions

**Enterprise feature**

Returns a list of available permissions

Reference: https://docs.getunleash.io/api/get-permissions

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: admin-api
  version: 1.0.0
paths:
  /api/admin/permissions:
    get:
      operationId: get-permissions
      summary: Gets available permissions
      description: |-
        **Enterprise feature**

        Returns a list of available permissions
      tags:
        - subpackage_auth
      parameters:
        - name: Authorization
          in: header
          description: API key needed to access this API
          required: true
          schema:
            type: string
      responses:
        '200':
          description: adminPermissionsSchema
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminPermissionsSchema'
servers:
  - url: https://app.unleash-instance.example.com
    description: Your Unleash instance (replace with your actual URL)
components:
  schemas:
    adminPermissionSchema:
      type: object
      properties:
        id:
          type: integer
          description: The identifier for this permission
        name:
          type: string
          description: The name of this permission
        displayName:
          type: string
          description: The name to display in listings of permissions
        type:
          type: string
          description: >-
            What level this permission applies to. Either root, project or the
            name of the environment it applies to
        environment:
          type:
            - string
            - 'null'
          description: Which environment this permission applies to
      required:
        - id
        - name
        - displayName
        - type
      description: Describes a single permission
      title: adminPermissionSchema
    AdminPermissionsSchemaPermissionsEnvironmentsItems:
      type: object
      properties:
        name:
          type: string
          description: The name of the environment
        permissions:
          type: array
          items:
            $ref: '#/components/schemas/adminPermissionSchema'
          description: Permissions available for this environment
      required:
        - name
        - permissions
      title: AdminPermissionsSchemaPermissionsEnvironmentsItems
    AdminPermissionsSchemaPermissions:
      type: object
      properties:
        root:
          type: array
          items:
            $ref: '#/components/schemas/adminPermissionSchema'
          description: >-
            Permissions available at the root level, i.e. not connected to any
            specific project or environment
        project:
          type: array
          items:
            $ref: '#/components/schemas/adminPermissionSchema'
          description: Permissions available at the project level
        environments:
          type: array
          items:
            $ref: >-
              #/components/schemas/AdminPermissionsSchemaPermissionsEnvironmentsItems
          description: A list of environments with available permissions per environment
      required:
        - project
        - environments
      description: >-
        Returns permissions available at all three levels
        (root|project|environment)
      title: AdminPermissionsSchemaPermissions
    AdminPermissionsSchemaVersion:
      type: string
      enum:
        - '1'
        - '2'
      description: >-
        The api version of this response. A natural increasing number. Only
        increases if format changes
      title: AdminPermissionsSchemaVersion
    adminPermissionsSchema:
      type: object
      properties:
        permissions:
          $ref: '#/components/schemas/AdminPermissionsSchemaPermissions'
          description: >-
            Returns permissions available at all three levels
            (root|project|environment)
        version:
          $ref: '#/components/schemas/AdminPermissionsSchemaVersion'
          description: >-
            The api version of this response. A natural increasing number. Only
            increases if format changes
      required:
        - permissions
        - version
      description: What kind of permissions are available
      title: adminPermissionsSchema
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: API key needed to access this API
    bearerToken:
      type: http
      scheme: bearer
      description: API key needed to access this API, in Bearer token format

```

## Examples



**Response**

```json
{
  "permissions": {
    "project": [
      {
        "id": 3,
        "name": "UPDATE_FEATURE",
        "displayName": "Update feature flags",
        "type": "project",
        "environment": "development"
      }
    ],
    "environments": [
      {
        "name": "development",
        "permissions": [
          {
            "id": 3,
            "name": "UPDATE_FEATURE",
            "displayName": "Update feature flags",
            "type": "project",
            "environment": "development"
          }
        ]
      }
    ],
    "root": [
      {
        "id": 3,
        "name": "UPDATE_FEATURE",
        "displayName": "Update feature flags",
        "type": "project",
        "environment": "development"
      }
    ]
  },
  "version": 1
}
```

**SDK Code**

```python
import requests

url = "https://app.unleash-instance.example.com/api/admin/permissions"

headers = {"Authorization": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.unleash-instance.example.com/api/admin/permissions';
const options = {method: 'GET', headers: {Authorization: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.unleash-instance.example.com/api/admin/permissions"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.unleash-instance.example.com/api/admin/permissions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.unleash-instance.example.com/api/admin/permissions")
  .header("Authorization", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.unleash-instance.example.com/api/admin/permissions', [
  'headers' => [
    'Authorization' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.unleash-instance.example.com/api/admin/permissions");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/permissions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```