Skip to content

eaxsim-cloud HTTP API routes

PlatformReferenceCloudView as Markdown

The routes of eaxsim-cloud, the control plane of the virtual-commissioning simulations (the binary was called eaxcloud; it is not the eaxCloud portal). It takes two kinds of key, each in the header Authorization: Bearer <key>, and neither opens the other’s routes:

  • Admin key: tenant management, the /admin/v1/tenants routes (create, change, disable, enable, rotate a tenant’s key). It is read from the file named by admin_key_file in the configuration; without that setting the admin API is off and answers 404. The eaxCloud portal holds this key.
  • Tenant API key: simulations and usage, the /v1/ routes, limited to that tenant’s own simulations. The simulation UI also accepts the cookie set by a view link.

The Role column below names the key a route needs.

A simulation attaches to an eaxScada broker only when an administrator has configured that tenant’s commissioning_target and acknowledged it; otherwise it runs with no broker at all.

  • Methods: the methods the handler implements. “any” means the handler does not look at the method; “other: default” means every other method reaches the handler’s default branch.
  • Role: who may call the route. “GET, HEAD” and “other methods” give separate rules for reads and for every other method; a list of methods gives the rule for those methods.
  • Source: where the route is registered. The method and role annotations sit on the line above each registration (// route:).
Methods Path Role Source
GET /admin/v1/tenants admin key eaxPLC/pkg/cloud/admin.go
POST /admin/v1/tenants admin key eaxPLC/pkg/cloud/admin.go
GET /admin/v1/tenants/{id} admin key eaxPLC/pkg/cloud/admin.go
PUT /admin/v1/tenants/{id} admin key eaxPLC/pkg/cloud/admin.go
POST /admin/v1/tenants/{id}/disable admin key eaxPLC/pkg/cloud/admin.go
POST /admin/v1/tenants/{id}/enable admin key eaxPLC/pkg/cloud/admin.go
PATCH /admin/v1/tenants/{id}/quota admin key eaxPLC/pkg/cloud/admin.go
POST /admin/v1/tenants/{id}/rotate-key admin key eaxPLC/pkg/cloud/admin.go
Methods Path Role Source
POST /v1/sims tenant API key eaxPLC/pkg/cloud/platform.go
GET /v1/sims tenant API key eaxPLC/pkg/cloud/platform.go
GET /v1/sims/{id} tenant API key eaxPLC/pkg/cloud/platform.go
DELETE /v1/sims/{id} tenant API key eaxPLC/pkg/cloud/platform.go
GET /v1/sims/{id}/report tenant API key eaxPLC/pkg/cloud/platform.go
POST /v1/sims/{id}/start tenant API key eaxPLC/pkg/cloud/platform.go
POST /v1/sims/{id}/stop tenant API key eaxPLC/pkg/cloud/platform.go
any /v1/sims/{id}/ui/ tenant API key eaxPLC/pkg/cloud/platform.go
POST /v1/sims/{id}/view tenant API key eaxPLC/pkg/cloud/platform.go
Methods Path Role Source
GET /v1/usage tenant API key eaxPLC/pkg/cloud/platform.go

Routes: 18.