GitLab CI/CD access_requests API

Operations related to access requests

OpenAPI Specification

gitlab-ci-access-requests-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: GitLab access_requests API
  version: v4
  description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: access_requests
  description: Operations related to access requests
paths:
  /api/v4/groups/{id}/access_requests:
    get:
      summary: Gets a list of access requests for a group.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        type: string
        required: true
      - in: query
        name: page
        description: Current page number
        type: integer
        format: int32
        default: 1
        required: false
        example: 1
      - in: query
        name: per_page
        description: Number of items per page
        type: integer
        format: int32
        default: 20
        required: false
        example: 20
      responses:
        '200':
          description: Gets a list of access requests for a group.
          schema:
            $ref: '#/definitions/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: getApiV4GroupsIdAccessRequests
    post:
      summary: Requests access for the authenticated user to a group.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        type: string
        required: true
      responses:
        '200':
          description: Requests access for the authenticated user to a group.
          schema:
            $ref: '#/definitions/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: postApiV4GroupsIdAccessRequests
  /api/v4/groups/{id}/access_requests/{user_id}/approve:
    put:
      summary: Approves an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        type: string
        required: true
      - in: path
        name: user_id
        description: The user ID of the access requester
        type: integer
        format: int32
        required: true
      - name: putApiV4GroupsIdAccessRequestsUserIdApprove
        in: body
        required: true
        schema:
          $ref: '#/definitions/putApiV4GroupsIdAccessRequestsUserIdApprove'
      responses:
        '201':
          description: Approves an access request for the given user.
          schema:
            $ref: '#/definitions/API_Entities_Member'
      tags:
      - access_requests
      operationId: putApiV4GroupsIdAccessRequestsUserIdApprove
  /api/v4/groups/{id}/access_requests/{user_id}:
    delete:
      summary: Denies an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the group owned by the authenticated user
        type: string
        required: true
      - in: path
        name: user_id
        description: The user ID of the access requester
        type: integer
        format: int32
        required: true
      responses:
        '204':
          description: Denies an access request for the given user.
      tags:
      - access_requests
      operationId: deleteApiV4GroupsIdAccessRequestsUserId
  /api/v4/projects/{id}/access_requests:
    get:
      summary: Gets a list of access requests for a project.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        type: string
        required: true
      - in: query
        name: page
        description: Current page number
        type: integer
        format: int32
        default: 1
        required: false
        example: 1
      - in: query
        name: per_page
        description: Number of items per page
        type: integer
        format: int32
        default: 20
        required: false
        example: 20
      responses:
        '200':
          description: Gets a list of access requests for a project.
          schema:
            $ref: '#/definitions/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: getApiV4ProjectsIdAccessRequests
    post:
      summary: Requests access for the authenticated user to a project.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        type: string
        required: true
      responses:
        '200':
          description: Requests access for the authenticated user to a project.
          schema:
            $ref: '#/definitions/API_Entities_AccessRequester'
      tags:
      - access_requests
      operationId: postApiV4ProjectsIdAccessRequests
  /api/v4/projects/{id}/access_requests/{user_id}/approve:
    put:
      summary: Approves an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      consumes:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        type: string
        required: true
      - in: path
        name: user_id
        description: The user ID of the access requester
        type: integer
        format: int32
        required: true
      - name: putApiV4ProjectsIdAccessRequestsUserIdApprove
        in: body
        required: true
        schema:
          $ref: '#/definitions/putApiV4ProjectsIdAccessRequestsUserIdApprove'
      responses:
        '201':
          description: Approves an access request for the given user.
          schema:
            $ref: '#/definitions/API_Entities_Member'
      tags:
      - access_requests
      operationId: putApiV4ProjectsIdAccessRequestsUserIdApprove
  /api/v4/projects/{id}/access_requests/{user_id}:
    delete:
      summary: Denies an access request for the given user.
      description: This feature was introduced in GitLab 8.11.
      produces:
      - application/json
      parameters:
      - in: path
        name: id
        description: The ID or URL-encoded path of the project owned by the authenticated user
        type: string
        required: true
      - in: path
        name: user_id
        description: The user ID of the access requester
        type: integer
        format: int32
        required: true
      responses:
        '204':
          description: Denies an access request for the given user.
      tags:
      - access_requests
      operationId: deleteApiV4ProjectsIdAccessRequestsUserId
definitions:
  API_Entities_CustomAttribute:
    type: object
    properties:
      key:
        type: string
        example: foo
      value:
        type: string
        example: bar
    required:
    - key
    - value
    description: API_Entities_CustomAttribute model
  API_Entities_MemberRole:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 2
      group_id:
        type: integer
        format: int32
        example: 2
      name:
        type: text
        example: Custom guest
      description:
        type: text
        example: Guest user who can also read_code
      base_access_level:
        type: integer
        format: int32
        enum:
        - 5
        - 10
        - 15
        - 20
        - 30
        - 40
        example: 40
      apply_security_scan_profiles:
        type: boolean
      admin_merge_request:
        type: boolean
      archive_project:
        type: boolean
      remove_project:
        type: boolean
      remove_group:
        type: boolean
      manage_security_policy_link:
        type: boolean
      admin_compliance_framework:
        type: boolean
      admin_cicd_variables:
        type: boolean
      manage_deploy_tokens:
        type: boolean
      manage_group_access_tokens:
        type: boolean
      admin_group_member:
        type: boolean
      admin_integrations:
        type: boolean
      manage_merge_request_settings:
        type: boolean
      manage_project_access_tokens:
        type: boolean
      admin_protected_branch:
        type: boolean
      admin_protected_environments:
        type: boolean
      manage_protected_tags:
        type: boolean
      admin_push_rules:
        type: boolean
      admin_runners:
        type: boolean
      admin_security_attributes:
        type: boolean
      admin_terraform_state:
        type: boolean
      admin_vulnerability:
        type: boolean
      admin_web_hook:
        type: boolean
      read_compliance_dashboard:
        type: boolean
      read_security_scan_profiles:
        type: boolean
      read_virtual_registry:
        type: boolean
      read_admin_cicd:
        type: boolean
      read_crm_contact:
        type: boolean
      read_dependency:
        type: boolean
      read_admin_groups:
        type: boolean
      read_admin_projects:
        type: boolean
      read_code:
        type: boolean
      read_runners:
        type: boolean
      read_security_attribute:
        type: boolean
      read_admin_subscription:
        type: boolean
      read_admin_monitoring:
        type: boolean
      read_admin_users:
        type: boolean
      read_vulnerability:
        type: boolean
    required:
    - id
    - group_id
    - name
    - description
    - base_access_level
    - apply_security_scan_profiles
    - admin_merge_request
    - archive_project
    - remove_project
    - remove_group
    - manage_security_policy_link
    - admin_compliance_framework
    - admin_cicd_variables
    - manage_deploy_tokens
    - manage_group_access_tokens
    - admin_group_member
    - admin_integrations
    - manage_merge_request_settings
    - manage_project_access_tokens
    - admin_protected_branch
    - admin_protected_environments
    - manage_protected_tags
    - admin_push_rules
    - admin_runners
    - admin_security_attributes
    - admin_terraform_state
    - admin_vulnerability
    - admin_web_hook
    - read_compliance_dashboard
    - read_security_scan_profiles
    - read_virtual_registry
    - read_admin_cicd
    - read_crm_contact
    - read_dependency
    - read_admin_groups
    - read_admin_projects
    - read_code
    - read_runners
    - read_security_attribute
    - read_admin_subscription
    - read_admin_monitoring
    - read_admin_users
    - read_vulnerability
  putApiV4ProjectsIdAccessRequestsUserIdApprove:
    type: object
    properties:
      access_level:
        type: integer
        format: int32
        description: 'A valid access level (defaults: `30`, the Developer role)'
        default: 30
    description: Approves an access request for the given user.
  API_Entities_UserBasic:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 1
      username:
        type: string
        example: admin
      public_email:
        type: string
        example: john@example.com
      name:
        type: string
        example: Administrator
      state:
        type: string
        example: active
      locked:
        type: boolean
      avatar_url:
        type: string
        example: https://gravatar.com/avatar/1
      avatar_path:
        type: string
        example: /user/avatar/28/The-Big-Lebowski-400-400.png
      custom_attributes:
        type: array
        items:
          $ref: '#/definitions/API_Entities_CustomAttribute'
      web_url:
        type: string
        example: https://gitlab.example.com/root
    required:
    - id
    - username
    - public_email
    - name
    - state
    - locked
    - avatar_url
    - web_url
    description: API_Entities_UserBasic model
  API_Entities_Identity:
    type: object
    properties:
      provider:
        type: string
      extern_uid:
        type: string
      saml_provider_id:
        type: string
    required:
    - provider
    - extern_uid
    - saml_provider_id
  putApiV4GroupsIdAccessRequestsUserIdApprove:
    type: object
    properties:
      access_level:
        type: integer
        format: int32
        description: 'A valid access level (defaults: `30`, the Developer role)'
        default: 30
    description: Approves an access request for the given user.
  API_Entities_Member:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 1
      username:
        type: string
        example: admin
      public_email:
        type: string
        example: john@example.com
      name:
        type: string
        example: Administrator
      state:
        type: string
        example: active
      locked:
        type: boolean
      avatar_url:
        type: string
        example: https://gravatar.com/avatar/1
      avatar_path:
        type: string
        example: /user/avatar/28/The-Big-Lebowski-400-400.png
      custom_attributes:
        type: array
        items:
          $ref: '#/definitions/API_Entities_CustomAttribute'
      web_url:
        type: string
        example: https://gitlab.example.com/root
      access_level:
        type: string
      created_at:
        type: string
      created_by:
        $ref: '#/definitions/API_Entities_UserBasic'
      expires_at:
        type: string
      group_saml_identity:
        $ref: '#/definitions/API_Entities_Identity'
      group_scim_identity:
        $ref: '#/definitions/API_Entities_ScimIdentity'
      email:
        type: string
      is_using_seat:
        type: string
      override:
        type: string
      membership_state:
        type: string
      member_role:
        $ref: '#/definitions/API_Entities_MemberRole'
    required:
    - id
    - username
    - public_email
    - name
    - state
    - locked
    - avatar_url
    - web_url
    - access_level
    - created_at
    - expires_at
    - membership_state
    description: API_Entities_Member model
  API_Entities_ScimIdentity:
    type: object
    properties:
      extern_uid:
        type: string
      group_id:
        type: string
      active:
        type: string
    required:
    - extern_uid
    - group_id
    - active
  API_Entities_AccessRequester:
    type: object
    properties:
      id:
        type: integer
        format: int32
        example: 1
      username:
        type: string
        example: admin
      public_email:
        type: string
        example: john@example.com
      name:
        type: string
        example: Administrator
      state:
        type: string
        example: active
      locked:
        type: boolean
      avatar_url:
        type: string
        example: https://gravatar.com/avatar/1
      avatar_path:
        type: string
        example: /user/avatar/28/The-Big-Lebowski-400-400.png
      custom_attributes:
        type: array
        items:
          $ref: '#/definitions/API_Entities_CustomAttribute'
      web_url:
        type: string
        example: https://gitlab.example.com/root
      requested_at:
        type: string
    required:
    - id
    - username
    - public_email
    - name
    - state
    - locked
    - avatar_url
    - web_url
    - requested_at
    description: API_Entities_AccessRequester model
securityDefinitions:
  access_token_header:
    type: apiKey
    name: PRIVATE-TOKEN
    in: header
  access_token_query:
    type: apiKey
    name: private_token
    in: query