Sonatype Nexus Repository Content selectors API

The Content selectors API from Sonatype Nexus Repository — 2 operation(s) for content selectors.

Operations 5

GET /v1/security/content-selectors List content selectors #
POST /v1/security/content-selectors Create a new content selector #
GET /v1/security/content-selectors/{name} Get a content selector by name #
PUT /v1/security/content-selectors/{name} Update a content selector #
DELETE /v1/security/content-selectors/{name} Delete a content selector #

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-content-selectors-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-content-selectors-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nexus Repository Manager REST Content selectors API
  version: 3.97.2-02
servers:
- url: /service/rest
tags:
- name: Content selectors
paths:
  /v1/security/content-selectors:
    get:
      tags:
      - Content selectors
      summary: List content selectors
      operationId: listSecurityContentSelectors
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ContentSelectorApiResponse'
        '403':
          description: Insufficient permissions to read content selectors
    post:
      tags:
      - Content selectors
      summary: Create a new content selector
      operationId: createSecurityContentSelectors
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentSelectorApiCreateRequest'
      responses:
        '204':
          description: Content selector successfully created
        '400':
          description: Invalid request
        '403':
          description: Insufficient permissions to create content selectors
  /v1/security/content-selectors/{name}:
    get:
      tags:
      - Content selectors
      summary: Get a content selector by name
      operationId: getSecurityContentSelectors
      parameters:
      - name: name
        in: path
        description: The content selector name
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentSelectorApiResponse'
        '403':
          description: Insufficient permissions to read the content selector
    put:
      tags:
      - Content selectors
      summary: Update a content selector
      operationId: updateSecurityContentSelectors
      parameters:
      - name: name
        in: path
        description: The content selector name
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentSelectorApiUpdateRequest'
      responses:
        '204':
          description: Content selector updated successfully
        '400':
          description: Invalid request
        '403':
          description: Insufficient permissions to update the content selector
    delete:
      tags:
      - Content selectors
      summary: Delete a content selector
      operationId: deleteSecurityContentSelectors
      parameters:
      - name: name
        in: path
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Content selector deleted successfully
        '400':
          description: Invalid request
        '403':
          description: Insufficient permissions to delete the content selector
components:
  schemas:
    ContentSelectorApiResponse:
      type: object
      properties:
        name:
          type: string
          description: The content selector name cannot be changed after creation
        type:
          type: string
          description: The type of content selector the backend is using
        description:
          type: string
          description: A human-readable description
        expression:
          type: string
          description: The expression used to identify content
          example: format == "maven2" and path =^ "/org/sonatype/nexus"
    ContentSelectorApiCreateRequest:
      required:
      - expression
      - name
      type: object
      properties:
        name:
          minLength: 1
          pattern: ^[a-zA-Z0-9\-]{1}[a-zA-Z0-9_\-\.]*$
          type: string
          description: The content selector name cannot be changed after creation
        description:
          type: string
          description: A human-readable description
        expression:
          minLength: 1
          type: string
          description: The expression used to identify content
          example: format == "maven2" and path =^ "/org/sonatype/nexus"
    ContentSelectorApiUpdateRequest:
      required:
      - expression
      type: object
      properties:
        description:
          type: string
          description: An optional description of this content selector
        expression:
          minLength: 1
          type: string
          description: The expression used to identify content
          example: format == "maven2" and path =^ "/org/sonatype/nexus"