# uploadGrants

```graphql
query UploadGrants($input: UploadGrantsInput!) {
  uploadGrants(input: $input) {
    data {
      userId
      permission
      createdAt
    }
    resolvedPath
    resolvedType
    resolvedId
  }
}
```

List every user grant on the upload or folder that governs a path, with the target that was resolved. Requires project.uploads.admin.

## Arguments

| Name                     | Type               | Required | Description                                                                                                               |
| ------------------------ | ------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `input`                  | UploadGrantsInput! | Yes      |                                                                                                                           |
| `input.projectReference` | String!            | Yes      | Project UUID, slug or configured domain.                                                                                  |
| `input.uploadPath`       | String!            | Yes      | Upload UUID for grants on that upload, or an upload path or folder prefix resolved to the folder setting that governs it. |

## Variables

```json
{
  "input": {
    "projectReference": "string",
    "uploadPath": "string"
  }
}
```

## Responses

| Status | Description                                 |
| ------ | ------------------------------------------- |
| 200    | The UploadPathGrants! in data.uploadGrants. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query UploadGrants($input: UploadGrantsInput!) {\n  uploadGrants(input: $input) {\n    data {\n      userId\n      permission\n      createdAt\n    }\n    resolvedPath\n    resolvedType\n    resolvedId\n  }\n}",
  "variables": {
    "input": {
      "projectReference": "string",
      "uploadPath": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "uploadGrants": {
      "data": [
        {
          "userId": "string",
          "permission": "read",
          "createdAt": "string"
        }
      ],
      "resolvedPath": "string",
      "resolvedType": "upload",
      "resolvedId": "string"
    }
  }
}
```
