Sonatype Nexus Repository Security management: service account tokens API

The Security management: service account tokens API from Sonatype Nexus Repository — 2 operation(s) for security management: service account tokens.

Operations 3

GET /v1/security/service-account-tokens List all service account tokens (never exposes secret material) #
POST /v1/security/service-account-tokens Create a new service account token #
DELETE /v1/security/service-account-tokens/{id} Hard-delete a service account and its associated token #

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-service-account-tokens-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-service-account-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: 'Nexus Repository Manager REST Security management: service…'
  version: 3.97.2-02
servers:
- url: /service/rest
tags:
- name: 'Security management: service account tokens'
paths:
  /v1/security/service-account-tokens:
    get:
      tags:
      - 'Security management: service account tokens'
      summary: List all service account tokens (never exposes secret material)
      operationId: listSecurityServiceAccountTokens
      responses:
        '200':
          description: Service account list returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountXO'
        '403':
          description: Insufficient permissions — requires nexus:service-accounts:read
    post:
      tags:
      - 'Security management: service account tokens'
      summary: Create a new service account token
      operationId: createSecurityServiceAccountTokens
      requestBody:
        description: Service account to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceAccountCreateXO'
        required: true
      responses:
        '201':
          description: Service account created; token returned exactly once
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceAccountCreatedXO'
        '400':
          description: 'Validation error: invalid name, missing required field, or unknown roleId'
        '403':
          description: Insufficient permissions — requires nexus:service-accounts:create; or roleId is not assignable by the caller
  /v1/security/service-account-tokens/{id}:
    delete:
      tags:
      - 'Security management: service account tokens'
      summary: Hard-delete a service account and its associated token
      operationId: deleteSecurityServiceAccountTokens
      parameters:
      - name: id
        in: path
        description: Service account id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Service account deleted
        '403':
          description: Insufficient permissions — requires nexus:service-accounts:delete
        '404':
          description: Service account not found
components:
  schemas:
    ServiceAccountXO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        roleId:
          type: string
        createdBy:
          type: string
        createdAt:
          type: string
          format: date-time
        expiresAt:
          type: string
          format: date-time
        lastUsedAt:
          type: string
          format: date-time
    ServiceAccountCreatedXO:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        token:
          type: string
        expiresAt:
          type: string
          format: date-time
    ServiceAccountCreateXO:
      required:
      - name
      - roleId
      type: object
      properties:
        name:
          maxLength: 128
          minLength: 0
          pattern: ^[a-zA-Z0-9_-]+$
          type: string
        description:
          maxLength: 256
          minLength: 0
          type: string
        roleId:
          type: string
        expirationDays:
          minimum: 1
          type: integer
          format: int32