CARVIEW |
Select Language
HTTP/2 200
date: Tue, 22 Jul 2025 22:05:28 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-robots-tag: none
etag: W/"e567de1d17c34a4b943fb7bf77029e5e"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=%2FTGEWCTqXCI2xWTDZtwxaYOSuecEzq4s%2BdMo7ja%2BqN9TcqzWVTPGEH5H5hWirazi68emlnv0GP7zapRB%2BkxHgyqs3NEQwg7OK0Xh3vHatYGDoqBj2NgxPjnoIfIs8V8lfBZaR20qJjXoWhTfFxk1QgZANgLqnnAvhD0r%2FnCz7z6YHa%2B2XcPeqUTm8PJZd4EIHxokJWWrM8I8sKQYpZAAAMBS1Ri4Gg%2BzUDu9ebzJLbauv5Yfz%2FlbH8kQFf1PZd570CThNItrXZw85oPn6ZsWRg%3D%3D--lKwjs7PXXGrCYmBd--x%2FdOZPUnn3Pc7yE3l1gOQA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.1052095687.1753221928; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 22:05:28 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Wed, 22 Jul 2026 22:05:28 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D54A:3CF5A2:172F26:1F000C:68800B28
Server API · cncjs/cncjs Wiki · GitHub
Skip to content
Navigation Menu
{{ message }}
-
-
Notifications
You must be signed in to change notification settings - Fork 587
Server API
Thomas Friebel edited this page Oct 11, 2021
·
2 revisions
The cncjs server is an Express web server running on Node.js. The server defines an HTTP API.
POST endpoint for making authentication requests.
This is the only endpoint in the API that allows public access.
Method: POST
Arguments:
- token: JWT token
- name: name
- password: password
Response
-
HTTP 200,
{ enabled: true, token: <JWT>, name, <name> }
Sent if the request succeeds by either JWT or name-password authentication. If no JWT is present in the request the name and password are assessed for authentication.
-
HTTP 401,
{ msg: 'Authentication failed' }
Sent if authentication fails.
-
HTTP 500,
{ msg: 'Internal server error' }
Sent if an error occurs while processing the JWT.
Most of the categories follow a (F)CRUD pattern: fetch, create, read, update, delete.
Category | endpoint | HTTP method | operation | arguments |
---|---|---|---|---|
Version | api/version/latest | GET | get | none |
State | api/state | GET | get | key |
api/state | POST | set | key | |
api/state | delete | unset | key | |
G-code | api/gcode | GET | fetch | port |
api/gcode | POST | upload | port, name, gcode, context | |
api/gcode/download | GET/POST | download | port | |
Controllers | api/controllers | GET | get | none |
Commands | api/commands | GET | fetch | paging, page, pageLength |
api/commands | POST | create | enabled, title, commands | |
api/commands/:id | GET | read | none | |
api/commands/:id | PUT | update | enable, title, commands | |
api/commands/:id | DELETE | delete | none | |
api/commands/run/:id | POST | run | none | |
Events | api/events | GET | fetch | paging, page, pageLength |
api/events | POST | create | enabled, event, trigger, commands | |
api/events/:id | GET | read | none | |
api/events/:id | PUT | update | enabled, event, trigger, commands | |
api/events/:id | DELETE | delete | none | |
Machines | api/machines | GET | fetch | paging, page, pageLength |
api/machines | POST | create | {id, name, limits: {xmin, xmax, ymin, ymax, zmin, zmax}} | |
api/machines/:id | GET | read | none | |
api/machines/:id | PUT | update | {name, limits: {xmin, xmax, ymin, ymax, zmin, zmax}} | |
api/machines/:id | DELETE | delete | none | |
Macros | api/macros | GET | fetch | paging, page, pageLength |
api/macros | POST | create | name, content | |
api/macros/:id | GET | read | none | |
api/macros/:id | PUT | update | name, content | |
api/macros/:id | DELETE | delete | none | |
MDI | api/mdi | GET | fetch | paging, page, pageLength |
api/mdi | POST | create | name, command, grid | |
api/mdi | PUT | bulkUpdate | Array({name, command, grid}, ...) | |
api/mdi/:id | GET | read | none | |
api/mdi/:id | PUT | update | name, command, grid | |
api/mdi/:id | DELETE | delete | none | |
Users | api/users | GET | fetch | paging, page, pageLength |
api/users | POST | create | enabled, name, password | |
api/users/:id | GET | read | none | |
api/users/:id | PUT | update | enabled, name, oldPassword, newPassword | |
api/users/:id | DELETE | delete | none | |
Watch | api/watch/files | GET/POST | getFiles | path |
api/watch/file | GET/POST | readFile | file |
Join CNCjs Users Group on Facebook to share your experiences with other people.
Site: https://cnc.js.org
- Introduction
- Installation
- Using Pendants
-
Raspberry Pi Setup Guide
- System Setup & Preparation
- Install Node.js & CNCjs
- Install Node.js via Package Manager (Recommended)
- Install Node.js via Node Version Manager (NVM) (Alternative)
- Install Node.js Manually (Alternative)
- Use PM2 to auto-start CNCjs (Optional)
- Use Port 80 (Optional)
- Maintain
- Additional Setup Options:
- CNCjs UI on Pi - Adventures in PiLand
- Pi with Arduino Due
- Electron App
- User Guide
- Tool Change
- Tool Widget
- Troubleshooting
-
FAQ
- Forgot your password?
- How can I enable WebGL in my browser?
- Raspberry Pi: Error opening serial port "ttyAMA0"
- Webcam Streaming with Raspberry Pi
- Restream RTSP to M-JPEG
- Connect to an Arduino using WiFi
- Install Native Addons with Node.js v4
- Install Serialport on OS X El Capitan
- Kernel panic issue on macOS Sierra for devices using the CH340G, CH34G or CH34X chipset
- Testing without Arduino board
- Development
- API
- Wiki History
- Resources
- About
Clone this wiki locally
You can’t perform that action at this time.