Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c80787e7
Commit
c80787e7
authored
Jan 08, 2021
by
Jim Cser
Committed by
Achilleas Pipinellis
Jan 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation: Adds access request endpoint for OpenAPI spec (redo)
parent
cbcc0b6e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
431 additions
and
9 deletions
+431
-9
changelogs/unreleased/add_access_request_endpoint.yml
changelogs/unreleased/add_access_request_endpoint.yml
+5
-0
doc/api/openapi/openapi.yaml
doc/api/openapi/openapi.yaml
+45
-9
doc/api/openapi/v4/access_requests.yaml
doc/api/openapi/v4/access_requests.yaml
+381
-0
No files found.
changelogs/unreleased/add_access_request_endpoint.yml
0 → 100644
View file @
c80787e7
---
title
:
Add access request endpoint to OpenAPI standard
merge_request
:
51000
author
:
Jim Cser
type
:
changed
doc/api/openapi/openapi.yaml
View file @
c80787e7
openapi
:
"
3.0.0"
openapi
:
3.0.0
tags
:
-
name
:
version
description
:
Version
-
name
:
access_requests
description
:
Access requests for projects and groups
info
:
info
:
description
:
|
description
:
|
An OpenAPI definition for the GitLab REST API.
An OpenAPI definition for the GitLab REST API.
Only one API resource/endpoint is
currently included.
Few API resources or endpoints are
currently included.
The intent is to expand this to match the entire Markdown documentation of the API:
The intent is to expand this to match the entire Markdown documentation of the API:
<https://docs.gitlab.com/ee/api/>. Contributions are welcome.
<https://docs.gitlab.com/ee/api/>. Contributions are welcome.
...
@@ -12,15 +17,46 @@ info:
...
@@ -12,15 +17,46 @@ info:
so each request is made using your account.
so each request is made using your account.
Read more at <https://docs.gitlab.com/ee/development/documentation/restful_api_styleguide.html>.
Read more at <https://docs.gitlab.com/ee/development/documentation/restful_api_styleguide.html>.
version
:
"
v4"
version
:
v4
title
:
"
GitLab
API"
title
:
GitLab API
termsOfService
:
"
https://about.gitlab.com/terms/"
termsOfService
:
'
https://about.gitlab.com/terms/'
license
:
license
:
name
:
"
CC
BY-SA
4.0"
name
:
CC BY-SA
4.0
url
:
"
https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE"
url
:
'
https://gitlab.com/gitlab-org/gitlab/-/blob/master/LICENSE'
servers
:
servers
:
-
url
:
"
https://gitlab.com/api/"
-
url
:
'
https://gitlab.com/api/'
security
:
-
ApiKeyAuth
:
[]
components
:
securitySchemes
:
ApiKeyAuth
:
type
:
apiKey
in
:
header
name
:
Private-Token
paths
:
paths
:
# VERSION
/v4/version
:
/v4/version
:
$ref
:
"
v4/version.yaml"
$ref
:
'
v4/version.yaml'
# ACCESS REQUESTS (PROJECTS)
/v4/projects/{id}/access_requests
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsProjects'
/v4/projects/{id}/access_requests/{user_id}/approve
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsProjectsApprove'
/v4/projects/{id}/access_requests/{user_id}
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsProjectsDeny'
# ACCESS REQUESTS (GROUPS)
/v4/groups/{id}/access_requests
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsGroups'
/v4/groups/{id}/access_requests/{user_id}/approve
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsGroupsApprove'
/v4/groupss/{id}/access_requests/{user_id}
:
$ref
:
'
v4/access_requests.yaml#/accessRequestsGroupsDeny'
doc/api/openapi/v4/access_requests.yaml
0 → 100644
View file @
c80787e7
# Markdown documentation: https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/api/access_requests.md
#/v4/projects/{id}/access_requests
accessRequestsProjects
:
get
:
description
:
Lists access requests for a project
summary
:
List access requests for a project
operationId
:
accessRequestsProjects_get
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the project owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
ProjectAccessResponse
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
requested_at
:
type
:
string
example
:
-
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
-
"
id"
:
2
"
username"
:
"
john_doe"
"
name"
:
"
John
Doe"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
post
:
description
:
Requests access for the authenticated user to a project
summary
:
Requests access for the authenticated user to a project
operationId
:
accessRequestsProjects_post
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the project owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
ProjectAccessRequest
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
requested_at
:
type
:
string
example
:
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
#/v4/projects/{id}/access_requests/{user_id}/approve
accessRequestsProjectsApprove
:
put
:
description
:
Approves access for the authenticated user to a project
summary
:
Approves access for the authenticated user to a project
operationId
:
accessRequestsProjectsApprove_put
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the project owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
-
name
:
user_id
in
:
path
description
:
The userID of the access requester
required
:
true
schema
:
type
:
integer
-
name
:
access_level
in
:
query
description
:
A valid project access level. 0 = no access , 10 = guest, 20 = reporter, 30 = developer, 40 = Maintainer. Default is 30.'
required
:
false
schema
:
enum
:
[
0
,
10
,
20
,
30
,
40
]
default
:
30
type
:
integer
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
ProjectAccessApprove
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
access_level
:
type
:
integer
example
:
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
access_level"
:
20
#/v4/projects/{id}/access_requests/{user_id}
accessRequestsProjectsDeny
:
delete
:
description
:
Denies a project access request for the given user
summary
:
Denies a project access request for the given user
operationId
:
accessRequestProjectsDeny_delete
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the project owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
-
name
:
user_id
in
:
path
description
:
The user ID of the access requester
required
:
true
schema
:
type
:
integer
responses
:
# Does anything go here? Markdown doc does not list a response.
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
#/v4/groups/{id}/access_requests
accessRequestsGroups
:
get
:
description
:
List access requests for a group
summary
:
List access requests for a group
operationId
:
accessRequestsGroups_get
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the group owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
GroupAccessResponse
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
requested_at
:
type
:
string
example
:
-
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
-
"
id"
:
2
"
username"
:
"
john_doe"
"
name"
:
"
John
Doe"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
post
:
description
:
Requests access for the authenticated user to a group
summary
:
Requests access for the authenticated user to a group
operationId
:
accessRequestsGroups_post
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the group owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
GroupAccessRequest
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
requested_at
:
type
:
string
example
:
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
requested_at"
:
"
2012-10-22T14:13:35Z"
#/v4/groups/{id}/access_requests/{user_id}/approve
accessRequestsGroupsApprove
:
put
:
description
:
Approves access for the authenticated user to a group
summary
:
Approves access for the authenticated user to a group
operationId
:
accessRequestsGroupsApprove_put
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the group owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
-
name
:
user_id
in
:
path
description
:
The userID of the access requester
required
:
true
schema
:
type
:
integer
-
name
:
access_level
in
:
query
description
:
A valid group access level. 0 = no access , 10 = Guest, 20 = Reporter, 30 = Developer, 40 = Maintainer, 50 = Owner. Default is 30.
required
:
false
schema
:
enum
:
[
0
,
10
,
20
,
30
,
40
,
50
]
default
:
30
type
:
integer
responses
:
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
content
:
application/json
:
schema
:
title
:
GroupAccessApprove
type
:
object
properties
:
id
:
type
:
integer
usename
:
type
:
string
name
:
type
:
string
state
:
type
:
string
created_at
:
type
:
string
access_level
:
type
:
integer
example
:
"
id"
:
1
"
username"
:
"
raymond_smith"
"
name"
:
"
Raymond
Smith"
"
state"
:
"
active"
"
created_at"
:
"
2012-10-22T14:13:35Z"
"
access_level"
:
20
#/v4/groups/{id}/access_requests/{user_id}
accessRequestsGroupsDeny
:
delete
:
description
:
Denies a group access request for the given user
summary
:
Denies a group access request for the given user
operationId
:
accessRequestsGroupsDeny_delete
tags
:
-
access_requests
parameters
:
-
name
:
id
in
:
path
description
:
The ID or URL-encoded path of the group owned by the authenticated user.
required
:
true
schema
:
oneOf
:
-
type
:
integer
-
type
:
string
-
name
:
user_id
in
:
path
description
:
The userID of the access requester
required
:
true
schema
:
type
:
integer
responses
:
# Does anything go here? Markdown doc does not list a response.
'
401'
:
description
:
Unauthorized operation
'
200'
:
description
:
Successful operation
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment