Sonatype Nexus Repository Security management: OAuth2 users API
The Security management: OAuth2 users API from Sonatype Nexus Repository — 2 operation(s) for security management: oauth2 users.
The Security management: OAuth2 users API from Sonatype Nexus Repository — 2 operation(s) for security management: oauth2 users.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nexus:nexus-security-management-oauth2-users-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: 'Nexus Repository Manager REST Security management: OAuth2…'
version: 3.97.2-02
servers:
- url: /service/rest
tags:
- name: 'Security management: OAuth2 users'
paths:
/v1/security/oauth2/users:
get:
tags:
- 'Security management: OAuth2 users'
summary: Retrieve a list of cached OAuth2 users
description: Returns the OAuth2 user records cached in the Nexus Repository database. The response is limited to 1,000 users.
operationId: listSecurityOauth2Users
parameters:
- name: userId
in: query
description: An optional term to search user IDs for.
schema:
type: string
responses:
'200':
description: List of OAuth2 users returned
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OAuth2UserXO'
'401':
description: Authentication required
'403':
description: Insufficient permissions
post:
tags:
- 'Security management: OAuth2 users'
summary: Create a cached OAuth2 user record
description: 'This operation applies only to the OAuth2 user records cached in the Nexus Repository database. Nothing is sent to the remote OAuth2 identity provider. This allows an administrator to pre-assign roles that apply from the moment the record is created until the user''s first login. Those roles are not durable: at first login the identity provider''s groups claim replaces them, along with the first name, last name and email address.'
operationId: createSecurityOauth2Users
requestBody:
description: The OAuth2 user to create
content:
application/json:
schema:
$ref: '#/components/schemas/OAuth2UserXO'
required: true
responses:
'201':
description: OAuth2 user created
'400':
description: Invalid user data
'401':
description: Authentication required
'403':
description: Insufficient permissions
'409':
description: A record already exists for this user ID
/v1/security/oauth2/users/{userId}:
get:
tags:
- 'Security management: OAuth2 users'
summary: Retrieve a cached OAuth2 user by user ID
description: This operation applies only to the OAuth2 user records cached in the Nexus Repository database. Nothing is sent to the remote OAuth2 identity provider.
operationId: getSecurityOauth2Users
parameters:
- name: userId
in: path
description: The user ID the request should apply to.
required: true
schema:
type: string
responses:
'200':
description: OAuth2 user returned
content:
application/json:
schema:
$ref: '#/components/schemas/OAuth2UserXO'
'401':
description: Authentication required
'403':
description: Insufficient permissions
'404':
description: User not found
put:
tags:
- 'Security management: OAuth2 users'
summary: Update the status of a cached OAuth2 user
description: 'This operation applies only to the OAuth2 user records cached in the Nexus Repository database. Nothing is sent to the remote OAuth2 identity provider. Only the status is updated: the first name, last name, email address and roles are re-applied from the ID token on every login, so changes to those fields would not survive the user''s next sign-in and are ignored.'
operationId: updateSecurityOauth2Users
parameters:
- name: userId
in: path
description: The user ID the request should apply to.
required: true
schema:
type: string
requestBody:
description: The OAuth2 user to update
content:
application/json:
schema:
$ref: '#/components/schemas/OAuth2UserXO'
required: true
responses:
'204':
description: OAuth2 user updated
'400':
description: Invalid user data, or user ID in path does not match the body
'401':
description: Authentication required
'403':
description: Insufficient permissions
'404':
description: User not found
components:
schemas:
OAuth2UserXO:
required:
- status
- userId
type: object
properties:
userId:
maxLength: 200
minLength: 0
type: string
description: The userid for the OAuth2 user
firstName:
maxLength: 200
minLength: 0
type: string
description: The first name of the OAuth2 user
lastName:
maxLength: 200
minLength: 0
type: string
description: The last name of the OAuth2 user
emailAddress:
maxLength: 200
minLength: 0
type: string
description: The email address of the OAuth2 user
format: email
status:
type: string
description: 'The status of the OAuth2 user. One of: active, locked, disabled'
enum:
- active
- locked
- disabled
roles:
uniqueItems: true
type: array
description: The roles assigned to the OAuth2 user
items:
type: string
description: The roles assigned to the OAuth2 user