Enterprise¶
An enterprise is the namespace above organizations. With the API you can manage enterprise members and their roles, view enterprise custom roles and associated organizations, and maintain enterprise milestones, enterprise labels, and custom fields for enterprise issues.
Every endpoint in this group uses the /api/v8 prefix, unlike the /api/v5 used elsewhere. The enterprise member endpoints also have /api/v5 versions in the organizations group.
Objects¶
| Object | Description | Related endpoint |
|---|---|---|
| Enterprise member | Member list, single-member details, invitations, removal, role permissions | List all members of the enterprise |
| Custom role | Enterprise-level role definitions | Get enterprise custom roles |
| Associated organization | The enterprise relationship an organization belongs to | Get the enterprises associated with an organization |
| Enterprise milestone | Create, read, update, and delete milestones and their associated projects | Get the enterprise milestone list |
| Enterprise label | Create, update, and delete labels | Create an enterprise label |
| Issue extension field | Custom field definitions for enterprise issues (read-only) | Get the custom fields of enterprise issues |
| Enterprise issue | Issue list at the enterprise level | Get the enterprise issue list |
Identification¶
- Enterprises are identified by
enterpriseorenterprise_id(both placeholders are used in this group; follow each endpoint page). - Members use
username, milestones usemilestone_id, and labels uselabel_id. - The endpoint that resolves an organization's enterprise uses the singular
org:/api/v8/org/{org}/enterprise.
Common tasks¶
| Task | Endpoint |
|---|---|
| List enterprise members | GET /api/v8/enterprises/{enterprise}/members |
| Invite enterprise members | POST /api/v8/enterprises/{enterprise}/memberships/{username} |
| Modify enterprise member permissions | PUT /api/v8/enterprises/{enterprise}/members/{username} |
| Delete an enterprise member | DELETE /api/v8/enterprises/{enterprise}/members/{username} |
| Get enterprise custom roles | GET /api/v8/enterprise/{enterprise_id}/customized_roles |
| Get the enterprise of an organization | GET /api/v8/org/{org}/enterprise |
| Create an enterprise milestone | POST /api/v8/enterprises/{enterprise}/milestones |
| Create an enterprise label | POST /api/v8/enterprises/{enterprise_id}/label |
| Get the enterprise issue list | POST /api/v8/enterprises/{enterprise_id}/issues |
| Create an enterprise label | POST /api/v8/enterprises/{enterprise_id}/label |
Notes¶
- The whole group uses
/api/v8: the enterprise member endpoints in the organizations group are/api/v5versions with the same meaning but a different version, so paths are not interchangeable and the returned fields may differ. - Placeholders are mixed: some endpoints use
{enterprise}and others{enterprise_id}; custom roles use the singularenterprise, and the organization-to-enterprise endpoint uses the singularorg. - The enterprise label path segment is the singular
label(notlabels), and creation, update, and deletion all live under/label. - The enterprise issue list is fetched with
POST(notGET), the opposite of the convention for repository issues. - Enterprise members and organization members are two separate sets of endpoints, and the enterprise-side role enum (viewer, tester, developer, and so on) differs from the organization side.
Endpoint list¶
This module contains 18 endpoints in total.
| # | Endpoint | Method and path | Description |
|---|---|---|---|
| 1 | Get a member of the enterprise | GET /api/v8/enterprises/{enterprise}/members/{username} |
Call this endpoint to get a member of the enterprise. |
| 2 | List all members of the enterprise | GET /api/v8/enterprises/{enterprise}/members |
Call this endpoint to list all members of the enterprise. |
| 3 | Invite enterprise members | POST /api/v8/enterprises/{enterprise}/memberships/{username} |
Call this endpoint to invite enterprise members. |
| 4 | Delete an enterprise member | DELETE /api/v8/enterprises/{enterprise}/members/{username} |
Call this endpoint to delete an enterprise member. |
| 5 | Modify enterprise member permissions | PUT /api/v8/enterprises/{enterprise}/members/{username} |
Call this endpoint to modify enterprise member permissions. |
| 6 | Get the enterprises associated with an organization | GET /api/v8/org/{org}/enterprise |
Call this endpoint to get the enterprises associated with an organization. |
| 7 | Get enterprise custom roles | GET /api/v8/enterprise/{enterprise_id}/customized_roles |
Call this endpoint to get enterprise custom roles. |
| 8 | Create an enterprise milestone | POST /api/v8/enterprises/{enterprise}/milestones |
Call this endpoint to create an enterprise milestone. |
| 9 | Modify an enterprise milestone | PUT /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
Call this endpoint to modify an enterprise milestone. |
| 10 | Get enterprise milestone details | GET /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
Call this endpoint to get enterprise milestone details. |
| 11 | Delete an enterprise milestone | DELETE /api/v8/enterprises/{enterprise}/milestones/{milestone_id} |
Call this endpoint to delete an enterprise milestone. |
| 12 | Get the enterprise milestone list | GET /api/v8/enterprises/{enterprise}/milestones |
Call this endpoint to get the enterprise milestone list. |
| 13 | Get the list of projects that enterprise milestones can be associated with | GET /api/v8/enterprises/{enterprise}/groups/projects |
Call this endpoint to get the list of projects that enterprise milestones can be associated with. |
| 14 | Get the list of custom fields for enterprise issues | GET /api/v8/enterprises/{enterprise_id}/issue_extend_field |
Call this endpoint to get the list of custom fields for enterprise issues. |
| 15 | Get the enterprise issue list | POST /api/v8/enterprises/{enterprise_id}/issues |
Call this endpoint to get the enterprise issue list. |
| 16 | Create an enterprise label | POST /api/v8/enterprises/{enterprise_id}/label |
Call this endpoint to create an enterprise label. |
| 17 | Update an enterprise label | PUT /api/v8/enterprises/{enterprise_id}/label/{label_id} |
Call this endpoint to update an enterprise label. |
| 18 | Delete an enterprise label | DELETE /api/v8/enterprises/{enterprise_id}/label/{label_id} |
Call this endpoint to delete an enterprise label. |
Markdown source: View on AtomGit·Content from the open-source project gitcode-dev/atomgit-api-doc