Skip to content

Cloud API

insider 2026-08-25 JSON ↗

API server for the Niksphere Cloud platform

Server & Base URL

All REST API endpoints documented below are relative to the Cloud base URL:

http
http://localhost:8081/api/v1

Endpoints Overview

MethodEndpointSummary
GET/api/v1/auth/meGet current user info
GET/api/v1/environmentsList environments
POST/api/v1/environmentsCreate a new environment
GET/api/v1/environments/check-slugCheck environment slug availability
PUT/api/v1/environments/{id}Edit an environment
DELETE/api/v1/environments/{id}Delete an environment
GET/api/v1/operationsList operations
GET/api/v1/regionsList available regions
GET/api/v1/tenantsList all tenants
POST/api/v1/tenantsCreate a new tenant
GET/api/v1/tenants/check-slugCheck tenant slug availability
PUT/api/v1/tenants/{id}Edit a tenant
DELETE/api/v1/tenants/{id}Delete a tenant
GET/api/v1/usersList all users
POST/api/v1/usersCreate a new user

Auth

GET /api/v1/auth/me

Get current user info

Returns the authenticated user's subject, role, and tenant ID from the JWT context

Responses:

Status CodeDescriptionSchema / Content
200OKAuthMeResponse
401UnauthorizedErrorResponse

Environments

GET /api/v1/environments

List environments

Returns all environments visible to the authenticated user based on role and tenant

Responses:

Status CodeDescriptionSchema / Content
200OKArray<Environment>
500Internal Server ErrorErrorResponse

POST /api/v1/environments

Create a new environment

Creates a new environment for a tenant and queues a provisioning operation

Parameters:

NameLocated inTypeRequiredDescription
tenantIdquerystringnoTenant ID (required for SUPERUSER)
bodybodyCreateEnvironmentRequestyesEnvironment details

Responses:

Status CodeDescriptionSchema / Content
202AcceptedEnvironmentCreatedResponse
400Bad RequestErrorResponse
500Internal Server ErrorErrorResponse

GET /api/v1/environments/check-slug

Check environment slug availability

Validates an environment slug format and checks uniqueness within a tenant

Parameters:

NameLocated inTypeRequiredDescription
slugquerystringyesSlug to check
tenantIdquerystringnoTenant ID (used by SUPERUSER)
regionquerystringnoRegion ID for URL preview

Responses:

Status CodeDescriptionSchema / Content
200OKSlugCheckResponse

PUT /api/v1/environments/{id}

Edit an environment

Updates the name and/or slug of an existing environment

Parameters:

NameLocated inTypeRequiredDescription
idpathstringyesEnvironment ID
bodybodyEditEnvironmentRequestyesFields to update

Responses:

Status CodeDescriptionSchema / Content
200OKEnvironment
400Bad RequestErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

DELETE /api/v1/environments/{id}

Delete an environment

Queues an environment deletion operation and sets its status to DELETING

Parameters:

NameLocated inTypeRequiredDescription
idpathstringyesEnvironment ID

Responses:

Status CodeDescriptionSchema / Content
202AcceptedOperationQueuedResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

Operations

GET /api/v1/operations

List operations

Returns all operations visible to the authenticated user based on role and tenant

Responses:

Status CodeDescriptionSchema / Content
200OKArray<Operation>
500Internal Server ErrorErrorResponse

Regions

GET /api/v1/regions

List available regions

Returns the list of all available deployment regions

Responses:

Status CodeDescriptionSchema / Content
200OKArray<Region>

Tenants

GET /api/v1/tenants

List all tenants

Returns all tenants. Requires SUPERUSER role.

Responses:

Status CodeDescriptionSchema / Content
200OKArray<Tenant>
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/tenants

Create a new tenant

Creates a new tenant with the given name and slug. Requires SUPERUSER role.

Parameters:

NameLocated inTypeRequiredDescription
bodybodyCreateTenantRequestyesTenant details

Responses:

Status CodeDescriptionSchema / Content
201CreatedTenant
400Bad RequestErrorResponse
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

GET /api/v1/tenants/check-slug

Check tenant slug availability

Validates a tenant slug format and checks uniqueness. Requires SUPERUSER role.

Parameters:

NameLocated inTypeRequiredDescription
slugquerystringyesSlug to check

Responses:

Status CodeDescriptionSchema / Content
200OKSlugCheckResponse
403ForbiddenErrorResponse

PUT /api/v1/tenants/{id}

Edit a tenant

Updates the name and/or slug of an existing tenant. Requires SUPERUSER role.

Parameters:

NameLocated inTypeRequiredDescription
idpathstringyesTenant ID
bodybodyEditTenantRequestyesFields to update

Responses:

Status CodeDescriptionSchema / Content
200OKTenant
400Bad RequestErrorResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

DELETE /api/v1/tenants/{id}

Delete a tenant

Queues a tenant deletion operation and sets its status to DELETING. Requires SUPERUSER role.

Parameters:

NameLocated inTypeRequiredDescription
idpathstringyesTenant ID

Responses:

Status CodeDescriptionSchema / Content
202AcceptedOperationQueuedResponse
403ForbiddenErrorResponse
404Not FoundErrorResponse
500Internal Server ErrorErrorResponse

Users

GET /api/v1/users

List all users

Returns all user accounts. Requires SUPERUSER role.

Responses:

Status CodeDescriptionSchema / Content
200OKArray<niksphere-cloud_internal_models.User>
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

POST /api/v1/users

Create a new user

Creates a new user identity, credential, and cloud user profile. Requires SUPERUSER role.

Parameters:

NameLocated inTypeRequiredDescription
bodybodyCreateUserRequestyesUser details

Responses:

Status CodeDescriptionSchema / Content
201Createdniksphere-cloud_internal_models.User
400Bad RequestErrorResponse
403ForbiddenErrorResponse
500Internal Server ErrorErrorResponse

Data Models & Schemas

AuthMeResponse

PropertyTypeDescription
rolestring
substring
tenantIdstring

CreateEnvironmentRequest

PropertyTypeDescription
namestring
regionstring
slugstring

CreateTenantRequest

PropertyTypeDescription
namestring
slugstring

CreateUserRequest

PropertyTypeDescription
passwordstring
tenantIdstring
typestring
usernamestring

EditEnvironmentRequest

PropertyTypeDescription
namestring
slugstring

EditTenantRequest

PropertyTypeDescription
namestring
slugstring

EnvironmentCreatedResponse

PropertyTypeDescription
environmentEnvironment
messagestring
operation_idstring

ErrorResponse

PropertyTypeDescription
errorstring

OperationQueuedResponse

PropertyTypeDescription
messagestring
operation_idstring

SlugCheckResponse

PropertyTypeDescription
errorstring
urlstring
validboolean

ActionType

Engine

PropertyTypeDescription
createdAtstring
environmentIdstring
externalIdstringe.g. Railway Container Service ID
idstring
namestring
statusstring
urlstring

Environment

PropertyTypeDescription
createdAtstring
engineEngine
externalIdstringe.g. Railway Environment ID
idstring
namestringe.g. "Acme Workshop"
regionstringselected region ID
regionInfoanyEnriched dynamically on API read (ignored by GORM)
slugstringe.g. "acme-workshop"
statusstringPENDING, READY, DELETING
tenantanyAssociations
tenantIdstring

EnvironmentProvider

Operation

PropertyTypeDescription
actionDetailsstring
actionTypeActionType
createdAtstring
createdBystring
endsOnstring
idstring
logsstring
resultOperationResult
scheduledOnstring
startedOnstring
statusOperationStatus
tenantIdstring

OperationResult

OperationStatus

Region

PropertyTypeDescription
idRegionID
namestring
providerEnvironmentProvider
subdomainstring

RegionID

Tenant

PropertyTypeDescription
createdAtstring
idstring
namestring
slugstring
statusstringREADY, DELETING

niksphere-cloud_internal_models.User

PropertyTypeDescription
created_atstring
idstring
identitiesArray<niksphere-cloud_internal_models.UserIdentity>Associations
namestring
tenantIdstring
typeniksphere-cloud_internal_models.UserRole
updated_atstring

niksphere-cloud_internal_models.UserIdentity

PropertyTypeDescription
created_atstring
idstring
identityIdstring
userIdstring

niksphere-cloud_internal_models.UserRole

Release v1.0.0-build.33-channel.insider