NGINX Workers API

The Workers API from NGINX — 2 operation(s) for workers.

Operations 4

GET /workers/ NGINX Return Statistics for All Worker Processes #
DELETE /workers/ NGINX Reset Statistics for All Worker Processes #
GET /workers/{workerId} NGINX Return Status of a Worker Process #
DELETE /workers/{workerId} NGINX Reset Statistics for a Worker Process #

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/nginx-workers-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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

nginx-workers-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '9.0'
  title: NGINX Plus REST Workers API
  description: NGINX Plus REST [API](https://nginx.org/en/docs/http/ngx_http_api_module.html) provides access to NGINX Plus status information, on-the-fly configuration of upstream servers and key-value pairs management for [http](https://nginx.org/en/docs/http/ngx_http_keyval_module.html) and [stream](https://nginx.org/en/docs/stream/ngx_stream_keyval_module.html).
servers:
- url: /api/9
tags:
- name: Workers
paths:
  /workers/:
    get:
      tags:
      - Workers
      summary: NGINX Return Statistics for All Worker Processes
      description: Returns statistics for all worker processes such as accepted, dropped, active, idle connections, total and current requests.
      operationId: getWorkers
      parameters:
      - in: query
        name: fields
        description: Limits which fields of worker process statistics will be output.
        x-example: ''
        schema:
          type: string
      responses:
        '200':
          description: Success
          x-microcks-refs:
          - name: getWorkers200Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxWorkersMap'
              example:
              - id: 0
                pid: 32212
                connections:
                  accepted: 1
                  dropped: 0
                  active: 1
                  idle: 0
                http:
                  requests:
                    total: 19
                    current: 1
              - id: 1
                pid: 32214
                connections:
                  accepted: 1
                  dropped: 0
                  active: 1
                  idle: 0
                http:
                  requests:
                    total: 15
                    current: 0
        '404':
          description: 'Worker not found (*WorkerNotFound*),

            unknown version (*UnknownVersion*)

            '
          x-microcks-refs:
          - name: getWorkers404Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Workers
      summary: NGINX Reset Statistics for All Worker Processes
      description: 'Resets statistics for all worker processes such as

        accepted, dropped, active, idle connections, total and current requests.

        '
      operationId: deleteWorkersStat
      responses:
        '204':
          description: Success
        '404':
          description: 'Worker not found (*WorkerNotFound*),

            unknown version (*UnknownVersion*)

            '
          x-microcks-refs:
          - name: deleteWorkersStat404Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
        '405':
          description: Method disabled (*MethodDisabled*)
          x-microcks-refs:
          - name: deleteWorkersStat405Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /workers/{workerId}:
    parameters:
    - name: workerId
      in: path
      description: The ID of the worker process.
      required: true
      x-example: example_workerId
      schema:
        type: string
    get:
      tags:
      - Workers
      summary: NGINX Return Status of a Worker Process
      description: Returns status of a particular worker process.
      operationId: getWorker
      parameters:
      - in: query
        name: fields
        description: Limits which fields of worker process statistics will be output.
        x-example: ''
        schema:
          type: string
      responses:
        '200':
          description: Success
          x-microcks-refs:
          - name: getWorker200Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxWorker'
              example:
                id: 0
                pid: 32212
                connections:
                  accepted: 1
                  dropped: 0
                  active: 1
                  idle: 0
                http:
                  requests:
                    total: 15
                    current: 1
        '404':
          description: 'Worker not found (*WorkerNotFound*),

            unknown version (*UnknownVersion*)

            '
          x-microcks-refs:
          - name: getWorker404Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    delete:
      tags:
      - Workers
      summary: NGINX Reset Statistics for a Worker Process
      description: 'Resets statistics of accepted, dropped, active, idle connections,

        as well as total and current requests.

        '
      operationId: deleteWorkerStat
      responses:
        '204':
          description: Success
        '404':
          description: 'Worker not found (*WorkerNotFound*),

            unknown version (*UnknownVersion*)

            '
          x-microcks-refs:
          - name: deleteWorkerStat404Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
        '405':
          description: Method disabled (*MethodDisabled*)
          x-microcks-refs:
          - name: deleteWorkerStat405Example
            x-microcks-default: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NginxError'
              example:
                error: {}
                request_id: example-request_id
                href: example-href
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    NginxWorker:
      title: Worker process
      description: 'Statistics per each worker process.

        '
      properties:
        id:
          type: integer
          description: The ID of the worker process.
          example: 0
        pid:
          type: integer
          description: The PID identifier of the worker process used by the operating system.
          example: 4521
        connections:
          type: object
          description: 'The number of accepted, dropped, active, and idle connections

            per worker process.

            '
          properties:
            accepted:
              type: integer
              description: 'The total number of client connections

                accepted by the worker process.

                '
              example: 4968119
            dropped:
              type: integer
              description: 'The total number of client connections

                dropped by the worker process.

                '
              example: 0
            active:
              type: integer
              description: 'The current number of active client connections

                that are currently being handled by the worker process.

                '
              example: 5
            idle:
              type: integer
              description: 'The number of idle client connections

                that are currently being handled by the worker process.

                '
              example: 117
          example: {}
        http:
          type: object
          properties:
            requests:
              type: object
              description: The total number of client requests handled by the worker process.
              properties:
                total:
                  type: integer
                  description: The total number of client requests received by the worker process.
                  example: 98765
                current:
                  type: integer
                  description: The current number of client requests that are currently being processed by the worker process.
                  example: 3
              example: 31070465
          example: {}
      example:
        id: 0
        pid: 32212
        connections:
          accepted: 1
          dropped: 0
          active: 1
          idle: 0
        http:
          requests:
            total: 15
            current: 1
    NginxWorkersMap:
      title: Worker processes
      description: nginx worker processes object.
      type: object
      additionalProperties:
        $ref: '#/components/schemas/NginxWorker'
      example:
      - id: 0
        pid: 32212
        connections:
          accepted: 1
          dropped: 0
          active: 1
          idle: 0
        http:
          requests:
            total: 19
            current: 1
      - id: 1
        pid: 32214
        connections:
          accepted: 1
          dropped: 0
          active: 1
          idle: 0
        http:
          requests:
            total: 15
            current: 0
    NginxError:
      title: Error
      description: 'nginx error object.

        '
      type: object
      properties:
        error:
          type: object
          properties:
            status:
              type: integer
              description: HTTP error code.
              example: 200
            text:
              type: string
              description: Error description.
              example: example-text
            code:
              type: string
              description: Internal nginx error code.
              example: 200
          example: {}
        request_id:
          type: string
          description: The ID of the request, equals the value of the <a href="https://nginx.org/en/docs/http/ngx_http_core_module.html#var_request_id">$request_id</a> variable.
          example: example-request_id
        href:
          type: string
          description: Link to reference documentation.
          example: example-href