---
id: "en/api-get-nd-api-share-share-roles"
title: "Get a list of shared permissions"
language: "en"
description: "GET /nd/api/share/share_roles: Get the shared permission list interface description, including path, method, parameters and return information."
canonical_url: "https://www.babel.cc/public/babelwiki/en/api-get-nd-api-share-share-roles.html"
markdown_url: "https://www.babel.cc/public/babelwiki/ai/en/api-get-nd-api-share-share-roles.md"
alternates: {"en": "https://www.babel.cc/public/babelwiki/ai/en/api-get-nd-api-share-share-roles.md", "zh": "https://www.babel.cc/public/babelwiki/ai/zh/api-get-nd-api-share-share-roles.md"}
reading_note: "文档记录不等于当前部署能力；以实际版本、授权模块与配置为准。保留原文的可选、限制及待确认说明，勿补猜接口。 / Documentation is not a guarantee for every deployment. Preserve optional-module requirements, limitations and unresolved API contracts."
---

# Get the shared permission list

| Properties | Values |
| --- | --- |
| HTTP methods | `GET` |
| Interface path | `/nd/api/share/share_roles` |
| Category | Share API |

## Interface description

Returns sharing permission types for the entire system. When [setting a sharing participant's role](https://www.babel.cc/public/babelwiki/en/api-post-nd-api-share-set-participant-role.html), use the selected role's `roles[].id` as `role_id`.

Interface path: `/nd/api/share/share_roles`

HTTP method: `GET`


**HTTP method:** `GET`

#### URL parameters

No endpoint-specific parameters. Authentication headers are still required as described below.

#### Return field description

The response contains a `roles` array of role objects. The following fields and JSON types are observed in the supplied non-empty sample; this does not establish that every field is required or always non-null.

| Field | Sample type | Description |
| --- | --- | --- |
| `id` | `int` | Role ID; used as `role_id` when setting a sharing participant's permissions. |
| `name` | `string` | Role name; names can repeat and are not a substitute for IDs. |
| `description` | `string` | Role description. |
| `permission` | `int` | Permission value, not the role ID. Individual permission-bit definitions are not supplied; do not derive allowed actions from this value. |
| `forShare` | `int` | Sharing-related flag; every value in this sample is `1`. |
| `forTeamShare` | `int` | Team-sharing-related flag; sample values are `0` or `1`. |
| `forEnterprise` | `int` | Enterprise-related flag; sample values are `0` or `1`. |
| `roleOrder` | `int` | Role-order field; sort direction is not specified. |
| `enterpriseId` | `string` | Enterprise identifier; retain the string type even when it contains only digits. |
| `creator` | `string` or `null` | Creator field; both value types occur in the sample. |
| `descriptionEN` | `string` | English-description field; its actual content is not guaranteed to be English. |
| `nameEN` | `string` | English-name field; its actual content is not guaranteed to be English. |
| `systemdefault` | `int` | The sample contains `0`, `1` and `2`, not booleans. The business meaning of each value is not defined in the sample. |

The following retains the existing success-response envelope and shows one role from the sample, not the complete role list. Returned display strings are preserved as supplied:

```json
{
  "code": 0,
  "roles": [
    {
      "id": 10,
      "name": "批注评论",
      "description": "可以批注评论",
      "permission": 33,
      "forShare": 1,
      "forTeamShare": 1,
      "forEnterprise": 1,
      "roleOrder": 80,
      "enterpriseId": "0",
      "creator": null,
      "descriptionEN": "Comment",
      "nameEN": "Comment",
      "systemdefault": 0
    }
  ],
  "success": true
}
```

For this sample, select `role_id: 10`, not `permission: 33`, an array index or the role name. Read IDs from the current response rather than hard-coding the example values as a universal role mapping. Handle same-name roles separately by ID.

The system role list does not establish that the current user can assign every listed role to any file. See [Get the sharing roles the user can set for a specific file](https://www.babel.cc/public/babelwiki/en/api-get-nd-api-share-share-role-forfile.html) for file-specific choices.

## Call instructions

- Before calling, you need to complete [Get token](https://www.babel.cc/public/babelwiki/en/api-post-api-token-do.html) or the corresponding login-free authentication, and carry `Authorization: Bearer <access_token>` in the request header.
- If there are differences in parameters and return fields due to deployment versions, the actual private cloud API documents and joint debugging results should prevail.
- Category: Sharing API.
