Sonatype Nexus Repository Security management: roles API

The Security management: roles API from Sonatype Nexus Repository — 3 operation(s) for security management: roles.

Operations 6

GET /v1/security/roles List roles #
POST /v1/security/roles Create role #
GET /v1/security/roles/{id} Get role #
PUT /v1/security/roles/{id} Update role #
DELETE /v1/security/roles/{id} Delete role #
GET /v1/security/roles/assignable Get assignable roles #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/nexus:nexus-security-management-roles-api"
All apis
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.

Get an API 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 Specification

nexus-security-management-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Nexus Repository Manager REST Security management: roles API'
  version: 3.97.2-02
servers:
- url: /service/rest
tags:
- name: 'Security management: roles'
paths:
  /v1/security/roles:
    get:
      tags:
      - 'Security management: roles'
      summary: List roles
      operationId: listSecurityRoles
      parameters:
      - name: source
        in: query
        description: The id of the user source to filter the roles by, if supplied. Otherwise roles from all user sources will be returned.
        schema:
          type: string
      responses:
        '200':
          description: Roles returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleXOResponse'
        '400':
          description: The specified source does not exist
        '403':
          description: Insufficient permissions to read roles
    post:
      tags:
      - 'Security management: roles'
      summary: Create role
      operationId: createSecurityRoles
      parameters:
      - name: source
        in: query
        description: The id of the user source to create the role in. Available sources can be fetched using the 'User Sources' endpoint.
        schema:
          type: string
          default: default
      requestBody:
        description: A role configuration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleXORequest'
        required: true
      responses:
        '200':
          description: Role created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleXOResponse'
        '400':
          description: The specified source does not exist, the role already exists, a referenced role or privilege was not found, or the role contains itself
        '403':
          description: Insufficient permissions to create role
  /v1/security/roles/{id}:
    get:
      tags:
      - 'Security management: roles'
      summary: Get role
      operationId: getSecurityRoles
      parameters:
      - name: source
        in: query
        description: The id of the user source to filter the roles by. Available sources can be fetched using the 'User Sources' endpoint.
        schema:
          type: string
          default: default
      - name: id
        in: path
        description: The id of the role to get
        required: true
        schema:
          minLength: 1
          type: string
      responses:
        '200':
          description: Role returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleXOResponse'
        '400':
          description: The specified source does not exist
        '403':
          description: Insufficient permissions to read roles
        '404':
          description: Role not found
    put:
      tags:
      - 'Security management: roles'
      summary: Update role
      operationId: updateSecurityRoles
      parameters:
      - name: id
        in: path
        description: The id of the role to update
        required: true
        schema:
          minLength: 1
          type: string
      - name: source
        in: query
        description: The id of the user source that contains the role. Available sources can be fetched using the 'User Sources' endpoint.
        schema:
          type: string
          default: default
      requestBody:
        description: A role configuration
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleXORequest'
        required: true
      responses:
        '400':
          description: The specified source does not exist, a referenced role or privilege was not found, the role is read-only, or the role contains itself
        '403':
          description: Insufficient permissions to update role
        '404':
          description: Role not found
    delete:
      tags:
      - 'Security management: roles'
      summary: Delete role
      operationId: deleteSecurityRoles
      parameters:
      - name: id
        in: path
        description: The id of the role to delete
        required: true
        schema:
          minLength: 1
          type: string
      - name: source
        in: query
        description: The id of the user source that contains the role. Available sources can be fetched using the 'User Sources' endpoint.
        schema:
          type: string
          default: default
      responses:
        '400':
          description: The specified source does not exist, or the role is read-only
        '403':
          description: Insufficient permissions to delete role
        '404':
          description: Role not found
        '204':
          description: Success
  /v1/security/roles/assignable:
    get:
      tags:
      - 'Security management: roles'
      summary: Get assignable roles
      operationId: listSecurityRolesAssignable
      parameters:
      - name: source
        in: query
        description: The id of the user source to filter the roles by, if supplied. Otherwise roles from default user source will be returned. Available sources can be fetched using the 'User Sources' endpoint.
        schema:
          type: string
          default: default
      responses:
        '200':
          description: Assignable roles returned
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RoleXOResponse'
        '403':
          description: Insufficient permissions to read roles
        '400':
          description: The specified source does not exist
components:
  schemas:
    RoleXOResponse:
      type: object
      properties:
        id:
          type: string
          description: The id of the role.
        source:
          type: string
          description: The user source which is the origin of this role.
        name:
          type: string
          description: The name of the role.
        description:
          type: string
          description: The description of this role.
        readOnly:
          type: boolean
          description: Indicates whether the role can be changed. The system will ignore any supplied external values.
        privileges:
          uniqueItems: true
          type: array
          description: The list of privileges assigned to this role.
          items:
            type: string
            description: The list of privileges assigned to this role.
        roles:
          uniqueItems: true
          type: array
          description: The list of roles assigned to this role.
          items:
            type: string
            description: The list of roles assigned to this role.
    RoleXORequest:
      required:
      - id
      - name
      type: object
      properties:
        id:
          minLength: 1
          type: string
          description: The id of the role.
        name:
          minLength: 1
          type: string
          description: The name of the role.
        description:
          type: string
          description: The description of this role.
        privileges:
          uniqueItems: true
          type: array
          description: The list of privileges assigned to this role.
          items:
            type: string
            description: The list of privileges assigned to this role.
        roles:
          uniqueItems: true
          type: array
          description: The list of roles assigned to this role.
          items:
            type: string
            description: The list of roles assigned to this role.