Mend Access Management API
The Access Management API from Mend — 5 operation(s) for access management.
The Access Management API from Mend — 5 operation(s) for access management.
openapi: 3.0.1
info:
title: Mend Access Management 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: Access Management
paths:
/api/v3.0/login:
post:
tags:
- Access Management
summary: Login
description: 'Sign in a user with email and user key, returning a JWT token which is valid for 30 minutes.
If you omit the organization, it defaults to the last one you signed in to. '
operationId: login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoginModelDTOV3'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseV3LoginResponseDTO'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
/api/v3.0/login/accessToken:
post:
tags:
- Access Management
summary: Refresh Access Token
description: Generates a new access token from a refresh token
operationId: refreshAccessToken
parameters:
- name: wss-refresh-token
in: header
description: Refresh token
required: true
schema:
type: string
- name: orgUuid
in: query
required: false
schema:
type: string
description: 'org UUID (from the Mend App: **Administration** General > **Organization UUID**).'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AccessTokenRequestDTO'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseV3AccessTokenResponseDTO'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
/api/v3.0/logout:
post:
tags:
- Access Management
summary: Logout (revokes the refresh token)
operationId: logout
parameters:
- name: wss-refresh-token
in: header
description: Refresh token
required: true
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: string
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
/api/v2.0/login/accessToken:
post:
tags:
- Access Management
summary: Refresh Access Token
description: Generate a new access token using the provided refresh token.
operationId: refreshAccessToken
parameters:
- name: wss-refresh-token
in: header
description: Enter the refreshToken received from the login response.
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/SessionInfo'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
/api/v2.0/login:
post:
tags:
- Access Management
summary: Login
description: 'Sign in a user with email and user key, returning a JWT token which is valid for 10 minutes.
If you omit the organization, it defaults to the last one you signed in to. '
operationId: login
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LoginModelDTO'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/DWRResponseSessionInfo'
'400':
description: Bad Request
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
'403':
description: Forbidden
content:
'*/*':
schema:
$ref: '#/components/schemas/DWRResponseBase'
components:
schemas:
SessionInfo:
type: object
properties:
correlationId:
type: string
userUuid:
type: string
userName:
type: string
email:
type: string
refreshToken:
type: string
jwtToken:
type: string
orgName:
title: Organization Name
type: string
example: Organization A
orgUuid:
title: Organization Uuid
type: string
example: 123e4567-e89b-12d3-a456-426655440000
AccessTokenRequestDTO:
type: object
properties:
accessToken:
type: string
description: Previous Access Token
AccessTokenResponseDTO:
type: object
properties:
userUuid:
type: string
username:
type: string
email:
type: string
jwtToken:
type: string
tokenType:
type: string
orgName:
type: string
orgUuid:
type: string
accountName:
type: string
accountUuid:
type: string
tokenTTL:
type: integer
format: int64
systemAccess:
type: boolean
serviceSystemAccess:
type: boolean
sessionStartTime:
type: integer
format: int64
systemAccessStartTime:
type: integer
format: int64
LoginResponseDTO:
type: object
properties:
userUuid:
type: string
userName:
type: string
email:
type: string
refreshToken:
type: string
jwtTTL:
type: integer
format: int64
systemAccess:
type: boolean
serviceSystemAccess:
type: boolean
sessionStartTime:
type: integer
format: int64
systemAccessStartTime:
type: integer
format: int64
LoginModelDTOV3:
required:
- email
- userKey
type: object
properties:
email:
title: Email
type: string
example: jon.smith@mail.com
userKey:
title: User Key
type: string
description: Equivalent to a personal access token. Avoid pasting as plain text where it might be compromised. For a service user (recommended), you can find the user key in the Mend SCA App in **Admin > Users**. [Learn more](https://docs.mend.io/bundle/mend_maintenance/page/managing_service_users.html). For local testing purposes, you could also use one of your own personal user keys from your user profile page in the Mend SCA App.
example: '***********'
description: Login Model that provides user name and password for the Login process.
DWRResponseV3LoginResponseDTO:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
response:
$ref: '#/components/schemas/LoginResponseDTO'
LoginModelDTO:
required:
- email
- userKey
type: object
properties:
email:
title: Email
type: string
example: jon.smith@mail.com
orgToken:
title: Org Token
type: string
description: 'org UUID (by running Entities - Organization > Get User Organizations) or API Key (from the Mend SCA App: Integrate tab > API Key).'
example: 123e4567-e89b-12d3-a456-426655440000
userKey:
title: User Key
type: string
description: Equivalent to a personal access token. Avoid pasting as plain text where it might be compromised. For a service user (recommended), you can find the user key in the Mend SCA App in **Admin > Users**. [Learn more](https://docs.mend.io/bundle/mend_maintenance/page/managing_service_users.html). For local testing purposes, you could also use one of your own personal user keys from your user profile page in the Mend SCA App.
example: '***********'
description: Login Model that provides user name and password for the Login process.
DWRResponseSessionInfo:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
retVal:
$ref: '#/components/schemas/SessionInfo'
DWRResponseBase:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
DWRResponseV3AccessTokenResponseDTO:
type: object
properties:
supportToken:
title: Support Token
type: string
example: 1171c60d
response:
$ref: '#/components/schemas/AccessTokenResponseDTO'
securitySchemes:
bearer-key:
type: http
description: JWT token Bearer
scheme: bearer
bearerFormat: JWT