> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bedrock.quarry-systems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Permissions by Scope

> Retrieve all permissions defined within a specific scope

## Path Parameters

<ParamField path="scopeId" type="string" required>
  The scope ID to get permissions for
</ParamField>

## Response

Returns an array of permission objects belonging to the specified scope.

<ResponseField name="permissions" type="array">
  <Expandable title="Permission object">
    <ResponseField name="id" type="string">
      Unique identifier for the permission
    </ResponseField>

    <ResponseField name="name" type="string">
      Display name of the permission
    </ResponseField>

    <ResponseField name="description" type="string">
      Description of the permission
    </ResponseField>

    <ResponseField name="scopeId" type="string">
      The scope this permission belongs to
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.example.com/permissions/by-scope/scope_123' \
    -H 'Authorization: Bearer YOUR_TOKEN'
  ```

  ```javascript Node.js theme={null}
  const axios = require('axios');

  const { data } = await axios.get('https://api.example.com/permissions/by-scope/scope_123', {
    headers: { 'Authorization': 'Bearer YOUR_TOKEN' },
  });
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  [
    {
      "id": "perm_1",
      "name": "read:documents",
      "description": "Can read documents",
      "scopeId": "scope_123"
    },
    {
      "id": "perm_2",
      "name": "write:documents",
      "description": "Can write documents",
      "scopeId": "scope_123"
    }
  ]
  ```
</ResponseExample>
