# Corium API Tests
# Health check
GET http://localhost:9090/health
HTTP 200
# Up check
GET http://localhost:9090/up
HTTP 200
# List endpoints (should be empty or have defaults)
GET http://localhost:9090/api/endpoints
HTTP 200
# Create a new endpoint
POST http://localhost:9090/api/endpoints
Content-Type: application/x-www-form-urlencoded
path=/api/test&lang=kotlin&code=fun main() { println("Hello from test"); }
HTTP 201
# Create another endpoint
POST http://localhost:9090/api/endpoints
Content-Type: application/x-www-form-urlencoded
path=/api/greet&lang=kotlin&code=fun main() { respond(200, "{\"greeting\": \"hi\"}"); }
HTTP 201
# Try creating duplicate endpoint (should fail)
POST http://localhost:9090/api/endpoints
Content-Type: application/x-www-form-urlencoded
path=/api/test&lang=kotlin&code=fun main() {}
HTTP 409
# Try creating endpoint without leading slash (should fail)
POST http://localhost:9090/api/endpoints
Content-Type: application/x-www-form-urlencoded
path=api/bad&lang=kotlin&code=fun main() {}
HTTP 400
# List endpoints (should now have entries)
GET http://localhost:9090/api/endpoints
HTTP 200
# Get WASM binary for endpoint
GET http://localhost:9090/wasm/api/test
HTTP 200
Content-Type: application/wasm
# Run endpoint
GET http://localhost:9090/run/api/test
HTTP 200
[Asserts]
jsonpath("$.status") == 200
jsonpath("$.output") isString
# Run with query params
GET http://localhost:9090/run/api/test?name=Corium
HTTP 200
[Asserts]
jsonpath("$.status") == 200
# Delete endpoint
DELETE http://localhost:9090/api/endpoints/api/test
HTTP 200
# Delete second endpoint
DELETE http://localhost:9090/api/endpoints/api/greet
HTTP 200
# Try deleting non-existent endpoint
DELETE http://localhost:9090/api/endpoints/api/nonexistent
HTTP 404