Skip to content

rux-lang/WebApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web API

Build Deploy

This repository contains source code for Web API https://api.rux-lang.dev.

Main purpose of this API is to provide access to:

  • Rux package registry
  • Rux compiler CI/CD status

API

Base URL: https://api.rux-lang.dev

All requests and responses use JSON. Timestamps are UTC (ISO 8601).

Packages

The package registry. Packages are sourced from public GitHub repositories; their metadata (name, description, license) is read from the repository.

Method Route Description
GET /packages?page={page}&pageSize={pageSize} List packages, newest first. page defaults to 1, pageSize defaults to 10 (max 50).
GET /packages/{id} Get a single package by its GUID.
POST /packages Register a new package from a GitHub repository.
PUT /packages/{id} Refresh an existing package from its repository.
DELETE /packages/{id} Remove a package.

POST and PUT require human verification via a Cloudflare Turnstile token and take the following body:

{
  "repository": "https://github.com/owner/repo",
  "turnstileToken": "<turnstile-response-token>"
}

A package is returned as:

{
  "id": "0192f0c4-...",
  "name": "example",
  "description": "An example Rux package",
  "repository": "https://github.com/owner/repo",
  "license": "MIT",
  "created": "2026-06-16T12:00:00Z"
}

List responses are paged:

{
  "items": [
    /* Package[] */
  ],
  "total": 42,
  "page": 1,
  "pageSize": 10
}

Playground

Method Route Description
POST /playground/run Compile and run a Rux snippet, returning its output.

Request body (code is limited to 4096 characters):

{
  "code": "print(\"Hello, Rux\")"
}

Response:

{
  "stdout": "Hello, Rux\n",
  "stderr": "",
  "exitCode": 0,
  "timedOut": false,
  "durationMs": 37
}

Workflows

Method Route Description
GET /workflows CI/CD status (build, test, deploy) for each compiler workflow.

Each item reports the latest conclusion and completion time per stage:

[
  {
    "name": "Compiler",
    "buildConclusion": "success",
    "buildCompleted": "2026-06-16T11:30:00Z",
    "testConclusion": "success",
    "testCompleted": "2026-06-16T11:32:00Z",
    "deployConclusion": "success",
    "deployCompleted": "2026-06-16T11:35:00Z"
  }
]

Status

Method Route Description
GET /status Service health, version, uptime and database connectivity. Returns 200 when healthy, 503 otherwise.
{
  "name": "Rux WebAPI",
  "status": "Healthy",
  "time": "2026-06-16T12:00:00Z",
  "uptime": "1.02:03:04",
  "version": "1.0.0",
  "environment": "Production",
  "database": { "connected": true, "latencyMs": 3, "error": null }
}

Webhooks

Method Route Description
POST /webhooks/github Receives completed GitHub workflow_job events from the main branch to update workflow status. Requires a valid X-Hub-Signature-256 and is not intended for public use.

License

MIT

About

Web API for Rux programming language

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages