openapi: 3.0.3 info: title: NGINX njs Scripting Connections General Info API version: '0.8' description: The NGINX njs module provides a JavaScript runtime embedded inside NGINX. It does not expose HTTP endpoints itself. Instead, it offers scripting objects (HTTP request, stream session, Fetch API, etc.) that are available within njs handler functions configured in the NGINX configuration file. This specification documents the key njs objects as OpenAPI schemas only; the paths object is intentionally empty because there are no REST endpoints to describe. x-generated-from: documentation contact: name: NGINX url: https://nginx.org/en/docs/njs/reference.html license: name: BSD-2-Clause url: https://nginx.org/LICENSE tags: - name: General Info paths: /: get: tags: - General Info summary: NGINX Return List of Root Endpoints description: Returns a list of root endpoints. operationId: getAPIEndpoints produces: - application/json responses: '200': description: Success schema: $ref: '#/definitions/ArrayOfStrings' examples: application/json: - nginx - processes - connections - slabs - http - stream - ssl x-microcks-refs: - name: getAPIEndpoints200Example x-microcks-default: true '404': description: Unknown version (*UnknownVersion*) schema: $ref: '#/definitions/NginxError' examples: application/json: error: {} request_id: example-request_id href: example-href x-microcks-refs: - name: getAPIEndpoints404Example x-microcks-default: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /nginx: get: tags: - General Info summary: NGINX Return Status of NGINX Running Instance description: Returns nginx version, build name, address, number of configuration reloads, IDs of master and worker processes. operationId: getNginx produces: - application/json parameters: - in: query name: fields type: string description: Limits which fields of nginx running instance will be output. x-example: '' responses: '200': description: Success schema: $ref: '#/definitions/NginxObject' examples: application/json: nginx: version: 1.21.6 build: nginx-plus-r27 address: 206.251.255.64 generation: 6 load_timestamp: 2022-06-28 11:15:44.467000+00:00 timestamp: 2022-06-28 09:26:07.305000+00:00 pid: 32212 ppid: 32210 x-microcks-refs: - name: getNginx200Example x-microcks-default: true '404': description: Unknown version (*UnknownVersion*) schema: $ref: '#/definitions/NginxError' examples: application/json: error: {} request_id: example-request_id href: example-href x-microcks-refs: - name: getNginx404Example x-microcks-default: true x-microcks-operation: delay: 0 dispatcher: FALLBACK definitions: NginxObject: title: nginx description: 'General information about nginx: ' type: object properties: version: type: string description: Version of nginx. example: 1.25.3 build: type: string description: Name of nginx build. example: nginx-plus-r32 address: type: string description: The address of the server that accepted status request. example: 10.0.0.1 generation: type: integer description: The total number of configuration reloads. example: 8 load_timestamp: type: string format: date-time description: Time of the last reload of configuration, in the ISO 8601 format with millisecond resolution. example: '2026-04-21T10:30:00.000Z' timestamp: type: string format: date-time description: Current time in the ISO 8601 format with millisecond resolution. example: '2026-04-21T10:30:00.000Z' pid: type: integer description: The ID of the worker process that handled status request. example: 4521 ppid: type: integer description: The ID of the master process that started the worker process. example: 4519 example: nginx: version: 1.21.6 build: nginx-plus-r27 address: 206.251.255.64 generation: 6 load_timestamp: 2022-06-28 11:15:44.467000+00:00 timestamp: 2022-06-28 09:26:07.305000+00:00 pid: 32212 ppid: 32210 ArrayOfStrings: title: Array description: 'An array of strings. ' type: array items: type: string 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 $request_id variable. example: example-request_id href: type: string description: Link to reference documentation. example: example-href externalDocs: description: NGINX njs Reference url: https://nginx.org/en/docs/njs/reference.html