Mend Administration - Labels API
The Administration - Labels API from Mend — 2 operation(s) for administration - labels.
The Administration - Labels API from Mend — 2 operation(s) for administration - labels.
openapi: 3.0.1
info:
title: Mend Access Management Administration - Labels API
description: 'Mend''s enhanced API enables automation of workflows in a REST compliant format. The API features:
+ Access for any user with Mend credentials, via a user key available in the user''s profile page in the Mend Platform.
+ Improved security with a JWT token per organization, which expires every 10 minutes.
+ Added scalability with support for cursor pagination and limiting results size.
+ Broader functionality available programmatically.
+ New standard API documentation for easy navigation and search.
**Note:** To help you get started with the Mend API 3.0, we recommend reviewing our onboarding guide -> [Getting Started with API 3.0](https://docs.mend.io/platform/latest/getting-started-with-mend-api-3-0).
This resource covers initial setup, authentication instructions, and helpful tips to help you successfully begin working with the Mend API 3.0. If you have a dedicated instance of Mend, contact your Mend representative to access this API on your instance.'
version: '3.0'
servers:
- url: https://baseUrl
description: Generated server url
security:
- bearer-key: []
tags:
- name: Administration - Labels
paths:
/api/v3.0/orgs/{orgUuid}/labels:
get:
tags:
- Administration - Labels
summary: Get All Organization Labels
description: Returns a list of all labels in an organization (paginated)
operationId: getLabels
parameters:
- name: cursor
in: query
description: Parameter indicates the starting point for retrieving results, the first call doesn't include a cursor parameter in the request, the API response includes the first set of results along with a cursor pointing to the last item retrieved.
allowEmptyValue: true
schema:
type: string
- name: limit
in: query
description: Specifies the maximum number of items to be returned in the response.
allowEmptyValue: true
schema:
maximum: 10000
type: string
default: '50'
- name: orgUuid
in: path
description: 'org UUID (from the Mend App: **Administration** General > **Organization UUID**).'
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponsePageableV3ListOrganizationLabelDTOV3'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
post:
tags:
- Administration - Labels
summary: Add Label Definition
description: Adds a new label definition
operationId: createLabel
parameters:
- name: orgUuid
in: path
description: 'org UUID (from the Mend App: **Administration** General > **Organization UUID**).'
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/OrganizationLabelRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseV3MessageDTO'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
/api/v3.0/orgs/{orgUuid}/labels/{labelUuid}:
put:
tags:
- Administration - Labels
summary: Rename Label
description: Renames an existing label
operationId: renameLabel
parameters:
- name: orgUuid
in: path
description: 'org UUID (from the Mend App: **Administration** General > **Organization UUID**).'
required: true
schema:
type: string
- name: labelUuid
in: path
description: Label UUID (Administration > Labels)
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DomainLabelRequestDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseV3MessageDTO'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
delete:
tags:
- Administration - Labels
summary: Remove Label Definition
description: Removes a label definition
operationId: deleteLabel
parameters:
- name: orgUuid
in: path
description: 'org UUID (from the Mend App: **Administration** General > **Organization UUID**).'
required: true
schema:
type: string
- name: labelUuid
in: path
description: Label UUID (Administration > Labels)
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseV3MessageDTO'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
components:
schemas:
DWRResponsePageableV3ListOrganizationLabelDTOV3:
type: object
properties:
additionalData:
title: Provides insights into endpoint-supported pagination information.
type: object
description: '+ **totalItems**: The total count of data points returned in an API response.
'
example:
totalItems: '422'
next: http://someUrl?cursor=3
cursor: 3
supportToken:
title: Support Token
type: string
example: 1171c60d
response:
type: array
items:
$ref: '#/components/schemas/OrganizationLabelDTOV3'
OrganizationLabelRequestDTO:
required:
- namespace
- value
type: object
properties:
namespace:
title: Label Namespace
type: string
example: Label Namespace A
value:
title: Label Value
type: string
example: Label Value A
MessageDTO:
type: object
properties:
message:
title: message
type: string
example: Success!
DWRResponseBase:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
DomainLabelRequestDTO:
required:
- namespace
- value
type: object
properties:
namespace:
title: Label Namespace
type: string
example: Label Namespace A
value:
title: Label Value
type: string
example: Label Value A
DWRResponseV3MessageDTO:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
response:
$ref: '#/components/schemas/MessageDTO'
OrganizationLabelDTOV3:
type: object
properties:
uuid:
type: string
namespace:
type: string
value:
type: string
createdAt:
type: string
format: date-time
createdBy:
type: string
system:
type: boolean
applications:
type: integer
format: int64
projects:
type: integer
format: int64
id:
type: integer
format: int64
securitySchemes:
bearer-key:
type: http
description: JWT token Bearer
scheme: bearer
bearerFormat: JWT