Sonatype Nexus Repository Tasks API

The Tasks API from Sonatype Nexus Repository — 1 operation(s) for tasks.

GitHub OpenAPI

Operations 9

GET /v1/tasks/{id} Get a single task by id #
DELETE /v1/tasks/{id} Delete task by id #
GET /v1/tasks List tasks #
POST /v1/tasks Create task #
POST /v1/tasks/{id}/run Run task #
POST /v1/tasks/{id}/stop Stop task #
GET /v1/tasks/templates/{typeId} Get task template by type. This is the base to create new tasks #
GET /v1/tasks/templates List tasks of template tasks. This is the base to create new tasks #
PUT /v1/tasks/{taskId} Update an existing task #

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-tasks-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-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Nexus Repository Manager REST Tasks API
  version: 3.97.2-02
servers:
- url: /service/rest
tags:
- name: Tasks
paths:
  /v1/tasks/{id}:
    get:
      tags:
      - Tasks
      summary: Get a single task by id
      operationId: getTasks
      parameters:
      - name: id
        in: path
        description: Id of the task to get
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Task returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskXO'
        '404':
          description: Task not found
    delete:
      tags:
      - Tasks
      summary: Delete task by id
      operationId: deleteTasks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json: {}
  /v1/tasks:
    get:
      tags:
      - Tasks
      summary: List tasks
      operationId: listTasks
      parameters:
      - name: type
        in: query
        description: Type of the tasks to get
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PageTaskXO'
    post:
      tags:
      - Tasks
      summary: Create task
      operationId: createTasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskTemplateXO'
        required: true
      responses:
        '201':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskXO'
  /v1/tasks/{id}/run:
    post:
      tags:
      - Tasks
      summary: Run task
      operationId: createTasksRun
      parameters:
      - name: id
        in: path
        description: Id of the task to run
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Task was run
        '404':
          description: Task not found
        '405':
          description: Task is disabled
  /v1/tasks/{id}/stop:
    post:
      tags:
      - Tasks
      summary: Stop task
      operationId: createTasksStop
      parameters:
      - name: id
        in: path
        description: Id of the task to stop
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Task was stopped
        '409':
          description: Unable to stop task
        '404':
          description: Task not found
  /v1/tasks/templates/{typeId}:
    get:
      tags:
      - Tasks
      summary: Get task template by type. This is the base to create new tasks
      operationId: getTasksTemplates
      parameters:
      - name: typeId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskTemplateXO'
  /v1/tasks/templates:
    get:
      tags:
      - Tasks
      summary: List tasks of template tasks. This is the base to create new tasks
      operationId: listTasksTemplates
      responses:
        '200':
          description: successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskTemplateXO'
  /v1/tasks/{taskId}:
    put:
      tags:
      - Tasks
      summary: Update an existing task
      operationId: updateTasks
      parameters:
      - name: taskId
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTaskTemplateXO'
        required: true
      responses:
        '200':
          description: successful operation
          content:
            application/json: {}
components:
  schemas:
    UpdateTaskTemplateXO:
      required:
      - enabled
      - frequency
      - name
      - notificationCondition
      type: object
      properties:
        name:
          minLength: 1
          type: string
          description: The name of the task template.
        enabled:
          type: boolean
          description: Indicates if the task would be enabled.
        alertEmail:
          type: string
          description: e-mail for task notifications.
          format: email
        notificationCondition:
          type: string
          description: Condition required to notify a task execution.
          enum:
          - FAILURE
          - SUCCESS_FAILURE
        frequency:
          $ref: '#/components/schemas/FrequencyXO'
        properties:
          type: object
          additionalProperties:
            type: string
            description: Additional properties for the task
          description: Additional properties for the task
        formFields:
          type: array
          description: Metadata for each form field declared by the task descriptor, in the order the descriptor declares them. Populated on read responses; ignored on create/update.
          items:
            $ref: '#/components/schemas/FormFieldInfo'
        concurrentRun:
          type: boolean
          description: Indicates whether the task can run concurrently with other instances of the same type.
      description: Task template for updating existing tasks (type field is immutable)
      example: null
    TaskTemplateXO:
      required:
      - enabled
      - frequency
      - name
      - notificationCondition
      - type
      type: object
      properties:
        type:
          type: string
          description: The type of task to be created.
        name:
          minLength: 1
          type: string
          description: The name of the task template.
        enabled:
          type: boolean
          description: Indicates if the task would be enabled.
        alertEmail:
          type: string
          description: e-mail for task notifications.
          format: email
        notificationCondition:
          type: string
          description: Condition required to notify a task execution.
          enum:
          - FAILURE
          - SUCCESS_FAILURE
        frequency:
          $ref: '#/components/schemas/FrequencyXO'
        properties:
          type: object
          additionalProperties:
            type: string
            description: Additional properties for the task
          description: Additional properties for the task
        formFields:
          type: array
          description: Metadata for each form field declared by the task descriptor, in the order the descriptor declares them. Populated on read responses; ignored on create/update.
          items:
            $ref: '#/components/schemas/FormFieldInfo'
        concurrentRun:
          type: boolean
          description: Indicates whether the task can run concurrently with other instances of the same type.
    FrequencyXO:
      required:
      - schedule
      type: object
      properties:
        schedule:
          type: string
          description: Type of schedule ("manual", "once", "hourly", "daily", "weekly", "monthly", "cron")
        startDate:
          type: integer
          description: Start date of the task represented in unix timestamp. Does not apply for "manual" schedule.
          format: int64
        timeZoneOffset:
          type: string
          description: 'The offset time zone of the client. Example: '
          example: -05:00
        recurringDays:
          type: array
          description: Array with the number of the days the task must run. For "weekly" schedule allowed values, 1 to 7. For "monthly" schedule allowed values, 1 to 31, and 999 for the last day of the month.
          items:
            type: integer
            description: Array with the number of the days the task must run. For "weekly" schedule allowed values, 1 to 7. For "monthly" schedule allowed values, 1 to 31, and 999 for the last day of the month.
            format: int32
        cronExpression:
          type: string
          description: Cron expression for the task. Only applies for "cron" schedule.
          example: 0 1 2 * * ?
      description: Frequency of execution of the task.
    FormFieldInfo:
      type: object
      properties:
        id:
          type: string
          description: Identifier of the form field; matches a key in the task's properties map.
        type:
          type: string
          description: Form field type, e.g. 'string', 'number', 'checkbox', 'repository'.
        label:
          type: string
          description: Human-readable label.
        helpText:
          type: string
          description: Help text shown beneath the input.
        required:
          type: boolean
          description: Whether the field must be supplied when creating or updating the task.
        initialValue:
          type:
          - string
          - 'null'
          description: Initial value to seed the form with.
        minValue:
          type:
          - string
          - 'null'
          description: Minimum numeric value (number fields only).
        maxValue:
          type:
          - string
          - 'null'
          description: Maximum numeric value (number fields only).
        regexValidation:
          type:
          - string
          - 'null'
          description: Regular expression the value must match.
        storeApi:
          type:
          - string
          - 'null'
          description: Backend store API for Selectable fields (e.g. repository combobox).
        storeFilters:
          type:
          - object
          - 'null'
          additionalProperties:
            type:
            - string
            - 'null'
            description: Filters to apply to the Selectable's store (e.g. 'type' = 'hosted,proxy', 'format' = 'maven2').
          description: Filters to apply to the Selectable's store (e.g. 'type' = 'hosted,proxy', 'format' = 'maven2').
      description: Metadata for each form field declared by the task descriptor, in the order the descriptor declares them. Populated on read responses; ignored on create/update.
    PageTaskXO:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/TaskXO'
        continuationToken:
          type: string
        total:
          type: integer
          format: int64
    TaskXO:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the task
        name:
          type: string
          description: The name of the task
          example: Compact blob store
        type:
          type: string
          description: The type identifier of the task
          example: blobstore.compact
        typeName:
          type: string
          description: The human-readable name of the task type
          example: Admin - Compact blob store
        message:
          type: string
          description: A human-readable message describing the task
          example: Admin - Compact blob store
        currentState:
          type: string
          description: The current state of the task
          example: WAITING
        lastRunResult:
          type: string
          description: The result of the last run
          example: OK
        nextRun:
          type: string
          description: The next scheduled run time (ISO 8601 format)
          format: date-time
        lastRun:
          type: string
          description: The last run start time (ISO 8601 format)
          format: date-time
        schedule:
          type: string
          description: The schedule type
          example: manual
        properties:
          type: object
          additionalProperties:
            type: string
            description: Task-specific configuration properties
          description: Task-specific configuration properties
        enabled:
          type: boolean
          description: Whether the task is enabled
          example: true
        alertEmail:
          type: string
          description: Email address to send notifications to
          example: admin@example.com
        notificationCondition:
          type: string
          description: Condition for sending notifications
          example: FAILURE
          enum:
          - FAILURE
          - SUCCESS_FAILURE
        startDate:
          type: string
          description: The start date for scheduled tasks (ISO 8601 format)
          format: date-time
        recurringDays:
          type: array
          description: Days of the week/month for recurring schedules (1=Sunday, 7=Saturday, 999=last day of month)
          example:
          - 1
          - 4
          items:
            type: integer
            description: Days of the week/month for recurring schedules (1=Sunday, 7=Saturday, 999=last day of month)
            format: int32
        cronExpression:
          type: string
          description: Cron expression for advanced schedules
          example: 0 0 12 * * ?
        timeZoneOffset:
          type: string
          description: Time zone offset for cron schedules
          example: +00:00
      description: Represents a task in Nexus Repository Manager