Documentation
Documentation
https://docs.gitlab.com/api/
APIReference
https://docs.gitlab.com/api/api_resources/
Authentication
https://docs.gitlab.com/api/rest/authentication/
swagger: '2.0'
info:
title: GitLab access_requests badges API
version: v4
description: Operations related to access requests
host: gitlab.com
produces:
- application/json
tags:
- name: badges
description: Operations about badges
paths:
/api/v4/groups/{id}/badges:
get:
summary: Gets a list of group badges viewable by the authenticated user.
description: This feature was introduced in GitLab 10.6.
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
- in: query
name: name
description: Name for the badge
type: string
required: false
responses:
'200':
description: Gets a list of group badges viewable by the authenticated user.
schema:
type: array
items:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: getApiV4GroupsIdBadges
post:
summary: Adds a badge to a group.
description: This feature was introduced in GitLab 10.6.
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
- name: postApiV4GroupsIdBadges
in: body
required: true
schema:
$ref: '#/definitions/postApiV4GroupsIdBadges'
responses:
'201':
description: Adds a badge to a group.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: postApiV4GroupsIdBadges
/api/v4/groups/{id}/badges/render:
get:
summary: Preview a badge from a group.
description: This feature was introduced in GitLab 10.6.
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: link_url
description: URL of the badge link
type: string
required: true
- in: query
name: image_url
description: URL of the badge image
type: string
required: true
responses:
'200':
description: Preview a badge from a group.
schema:
$ref: '#/definitions/API_Entities_BasicBadgeDetails'
tags:
- badges
operationId: getApiV4GroupsIdBadgesRender
/api/v4/groups/{id}/badges/{badge_id}:
get:
summary: Gets a badge of a group.
description: This feature was introduced in GitLab 10.6.
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: badge_id
description: The badge ID
type: integer
format: int32
required: true
responses:
'200':
description: Gets a badge of a group.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: getApiV4GroupsIdBadgesBadgeId
put:
summary: Updates a badge of a group.
description: This feature was introduced in GitLab 10.6.
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: badge_id
type: integer
format: int32
required: true
- name: putApiV4GroupsIdBadgesBadgeId
in: body
required: true
schema:
$ref: '#/definitions/putApiV4GroupsIdBadgesBadgeId'
responses:
'200':
description: Updates a badge of a group.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: putApiV4GroupsIdBadgesBadgeId
delete:
summary: Removes a badge from the group.
description: This feature was introduced in GitLab 10.6.
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: badge_id
description: The badge ID
type: integer
format: int32
required: true
responses:
'204':
description: Removes a badge from the group.
tags:
- badges
operationId: deleteApiV4GroupsIdBadgesBadgeId
/api/v4/projects/{id}/badges:
get:
summary: Gets a list of project badges viewable by the authenticated user.
description: This feature was introduced in GitLab 10.6.
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
- in: query
name: name
description: Name for the badge
type: string
required: false
responses:
'200':
description: Gets a list of project badges viewable by the authenticated user.
schema:
type: array
items:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: getApiV4ProjectsIdBadges
post:
summary: Adds a badge to a project.
description: This feature was introduced in GitLab 10.6.
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
- name: postApiV4ProjectsIdBadges
in: body
required: true
schema:
$ref: '#/definitions/postApiV4ProjectsIdBadges'
responses:
'201':
description: Adds a badge to a project.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: postApiV4ProjectsIdBadges
/api/v4/projects/{id}/badges/render:
get:
summary: Preview a badge from a project.
description: This feature was introduced in GitLab 10.6.
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: link_url
description: URL of the badge link
type: string
required: true
- in: query
name: image_url
description: URL of the badge image
type: string
required: true
responses:
'200':
description: Preview a badge from a project.
schema:
$ref: '#/definitions/API_Entities_BasicBadgeDetails'
tags:
- badges
operationId: getApiV4ProjectsIdBadgesRender
/api/v4/projects/{id}/badges/{badge_id}:
get:
summary: Gets a badge of a project.
description: This feature was introduced in GitLab 10.6.
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: badge_id
description: The badge ID
type: integer
format: int32
required: true
responses:
'200':
description: Gets a badge of a project.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: getApiV4ProjectsIdBadgesBadgeId
put:
summary: Updates a badge of a project.
description: This feature was introduced in GitLab 10.6.
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: badge_id
type: integer
format: int32
required: true
- name: putApiV4ProjectsIdBadgesBadgeId
in: body
required: true
schema:
$ref: '#/definitions/putApiV4ProjectsIdBadgesBadgeId'
responses:
'200':
description: Updates a badge of a project.
schema:
$ref: '#/definitions/API_Entities_Badge'
tags:
- badges
operationId: putApiV4ProjectsIdBadgesBadgeId
delete:
summary: Removes a badge from the project.
description: This feature was introduced in GitLab 10.6.
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: badge_id
description: The badge ID
type: integer
format: int32
required: true
responses:
'204':
description: Removes a badge from the project.
tags:
- badges
operationId: deleteApiV4ProjectsIdBadgesBadgeId
definitions:
API_Entities_BasicBadgeDetails:
type: object
properties:
name:
type: string
example: Pipeline Status
link_url:
type: string
example: https://example.gitlab.com
image_url:
type: string
example: https://example.gitlab.com
rendered_link_url:
type: string
example: https://example.gitlab.com
rendered_image_url:
type: string
example: https://example.gitlab.com
required:
- name
- link_url
- image_url
- rendered_link_url
- rendered_image_url
description: API_Entities_BasicBadgeDetails model
putApiV4GroupsIdBadgesBadgeId:
type: object
properties:
link_url:
type: string
description: URL of the badge link
image_url:
type: string
description: URL of the badge image
name:
type: string
description: Name for the badge
description: Updates a badge of a group.
postApiV4GroupsIdBadges:
type: object
properties:
link_url:
type: string
description: URL of the badge link
image_url:
type: string
description: URL of the badge image
name:
type: string
description: Name for the badge
required:
- link_url
- image_url
description: Adds a badge to a group.
API_Entities_Badge:
type: object
properties:
name:
type: string
example: Pipeline Status
link_url:
type: string
example: https://example.gitlab.com
image_url:
type: string
example: https://example.gitlab.com
rendered_link_url:
type: string
example: https://example.gitlab.com
rendered_image_url:
type: string
example: https://example.gitlab.com
id:
type: integer
format: int32
example: 1
kind:
type: string
example: project
required:
- name
- link_url
- image_url
- rendered_link_url
- rendered_image_url
- id
- kind
description: API_Entities_Badge model
putApiV4ProjectsIdBadgesBadgeId:
type: object
properties:
link_url:
type: string
description: URL of the badge link
image_url:
type: string
description: URL of the badge image
name:
type: string
description: Name for the badge
description: Updates a badge of a project.
postApiV4ProjectsIdBadges:
type: object
properties:
link_url:
type: string
description: URL of the badge link
image_url:
type: string
description: URL of the badge image
name:
type: string
description: Name for the badge
required:
- link_url
- image_url
description: Adds a badge to a project.
securityDefinitions:
access_token_header:
type: apiKey
name: PRIVATE-TOKEN
in: header
access_token_query:
type: apiKey
name: private_token
in: query