# Grants

Source: <https://everruns.com/docs/api/operations/grants/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Identity & access](https://everruns.com/docs/api/groups/identity-access/)/Grants

# Grants

Preview

Manage organizations, members, end users, invitations and connected identities.

Public APIEverruns Cloud and self-hosted Platform

GET`/v1/resources/{id}/grants`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**id**

required

string format: uuid

Resource ID

## Responses

200Explicit access grants

### 200

Explicit access grants

Media typeapplication/json

Array\<object>

Metadata for an explicit resource use grant, without credential values.

object

**constraints**

One of:

* object

  One of:

  * object

    object

    **permissions**

    required

    object

    **_key_**

    additional properties

    string

    **provider**

    required

    string

    Allowed values: github

    **repositories**

    required

    Array\<string>

* null

  object

  **permissions**

  required

  object

  **_key_**

  additional properties

  string

  **provider**

  required

  string

  Allowed values: github

  **repositories**

  required

  Array\<string>

* object

  null

**consumer_id**

Consumer identifier; absent for an organization-wide service grant.

string | null format: uuid

**consumer_label**

Human-readable consumer name, when available.

string | null

**consumer_scope**

required

Scope of the consumer authorized by this grant.

string

Allowed values: session agent virtual_user organization

**expires_at**

Absolute grant expiry in UTC, if configured.

string | null format: date-time

**id**

required

Stable grant identifier used for revocation.

string format: uuid

**usage**

required

Required invocation identity for use through this grant.

string

Allowed values: user service

### Example

```json
[
  {
    "constraints": {
      "provider": "github"
    },
    "consumer_scope": "session",
    "usage": "user"
  }
]
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/grants';
const options = {method: 'GET'};


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

Request

```sh
curl --request GET \
  --url https://app.everruns.com/api/v1/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/grants
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Explicit access grants

```json
[
  {
    "consumer_scope": "session",
    "id": "string",
    "usage": "user"
  }
]
```

## Matching endpoints