Registry / devops / nci-rest-api-server

nci-rest-api-server

JSON →
library2.0.1jsnpmunverified

REST API server plugin for nci, a Node.js CI system. Version 2.0.1 provides API endpoints for managing builds and projects, including CRUD operations. The server supports JSON responses and token-based protection for destructive actions. Key differentiators: simple integration as an nci plugin, automatic token generation, and filtering/limiting of build queries. Released with maintenance cadence; requires nci >=1.0.11 <1.1.0.

npm install nci-rest-api-server
INSTALL
IMPORT
SIG · NCI-REST-API-SERVE
N
nci-rest-api-server
devopsjavascriptv2.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

nci-rest-api-server
Add to plugins array in nci config (no JS import)
Plugin is not imported in code; it is enabled by adding the package name to the 'plugins' array in the nci server configuration JSON.

Enables the REST API server plugin for nci by adding it to the plugins array and configuring HTTP host/port.

// nci config file (e.g., nci.json) { "plugins": [ "nci-rest-api-server" ], "http": { "host": "127.0.0.1", "port": 3000, "url": "http://127.0.0.1:3000" }, "http.apiAccessToken": "your-token-here" // optional, protects destructive endpoints }
Debug
Known issues
gotchaDestructive API methods (project removing/renaming) require an access token. If not set in config, token is generated and printed to server log.
fix
Set 'http.apiAccessToken' in config or retrieve token from server logs.
affects: >=1.0.0
gotchaServer responds only in JSON format; no other formats are supported.
fix
Ensure client expects and handles JSON responses.
affects: >=1.0.0
gotchaToken must be sent in the request body as 'token' field, not as header or query parameter.
fix
Include 'token' key in POST/PATCH/DELETE request body.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'nci'
nci peer dependency not installed
fix
Ensure nci is installed: npm install nci@">=1.0.11 <1.1.0"
Forbidden: invalid or missing token
Missing or incorrect API access token for destructive operations
fix
Set 'http.apiAccessToken' in config and include token in request body
Upgrade
Version history
2.0.1latest on npm
Audit
Dependencies
ncirequiredPeer dependency; this plugin runs within the nci framework
Agent activity
11 hits · last 30 days
node
10
Amazon
1
Resources
nci-rest-api-server — npm install nci-rest-api-server · libregistry