Skip to main content

Kublade API Documentation (v1.34.1)

Download OpenAPI specification:Download

E-mail: hi@kublade.org License: Apache-2.0

Kublade Swagger API documentation

Authentication

Endpoints for user authentication

Register a new user

Register a new user.

Request Body schema: application/json
name
string
email
string
password
string

Responses

Request samples

Content type
application/json
{
  • "name": "John Doe",
  • "email": "john@example.com",
  • "password": "password123"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User registered successfully",
  • "data": {
    }
}

Login a user

Login a user.

Request Body schema: application/json
email
string
password
string

Responses

Request samples

Content type
application/json
{
  • "email": "john@example.com",
  • "password": "password123"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Login successful",
  • "data": {
    }
}

Get the authenticated user

Get the authenticated user.

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User authenticated",
  • "data": {
    }
}

Logout a user

Logout a user.

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Successfully logged out"
}

Refresh a token

Refresh a token.

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Token refreshed",
  • "data": {
    }
}

Clusters

Endpoints for cluster management

List clusters

List clusters.

path Parameters
project_id
required
string

The ID of the project

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Clusters retrieved successfully",
  • "data": {
    }
}

Add a new cluster

Add a new cluster.

path Parameters
project_id
required
string

The ID of the project

Request Body schema: application/json
required
name
string
object
object
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "git": {
    },
  • "k8s": {
    },
  • "namespace": {
    }
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Cluster created successfully",
  • "data": {
    }
}

Get a cluster

Get a cluster.

path Parameters
project_id
required
string

The ID of the project

cluster_id
required
string

The ID of the cluster

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Cluster retrieved successfully",
  • "data": {
    }
}

Delete a cluster

Delete the cluster.

path Parameters
project_id
required
string

The ID of the project

cluster_id
required
string

The ID of the cluster

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Cluster deleted successfully",
  • "data": {
    }
}

Update a cluster

Update the cluster.

path Parameters
project_id
required
string

The ID of the project

cluster_id
required
string

The ID of the cluster

Request Body schema: application/json
required
name
string
object
object
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "git": {
    },
  • "k8s": {
    },
  • "namespace": {
    }
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Cluster updated successfully",
  • "data": {
    }
}

Deployments

Endpoints for deployment management

List deployments for a project

List the deployments.

path Parameters
project_id
required
string

The ID of the project

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Deployments retrieved successfully",
  • "data": {
    }
}

Add a new deployment

Add the deployment.

path Parameters
project_id
required
string

The ID of the project

Request Body schema: application/json
required
template_id
string
cluster_id
string
name
string
data
object

Responses

Request samples

Content type
application/json
{
  • "template_id": "string",
  • "cluster_id": "string",
  • "name": "string",
  • "data": { }
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Deployment created",
  • "data": {
    }
}

Get a deployment by ID

Get the deployment.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Deployment details",
  • "data": {
    }
}

Delete a deployment

Delete the deployment.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Deployment deleted",
  • "data": {
    }
}

Update a deployment

Update the deployment.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

Request Body schema: application/json
required
name
string
data
object

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "data": { }
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Deployment updated",
  • "data": {
    }
}

Create a network policy

Create the network policy.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

network_policy_id
required
string

The ID of the network policy

Request Body schema: application/json
required
source_deployment_id
string
target_deployment_id
string

Responses

Request samples

Content type
application/json
{
  • "source_deployment_id": "string",
  • "target_deployment_id": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Network policy put",
  • "data": {
    }
}

Delete a network policy

Delete the network policy.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

network_policy_id
required
string

The ID of the network policy

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Network policy deleted",
  • "data": {
    }
}

Revert a commit

Revert the commit.

path Parameters
project_id
required
string

The ID of the project

deployment_id
required
string

The ID of the deployment

commit_id
required
string

The ID of the commit

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Commit reverted",
  • "data": {
    }
}

Projects

Endpoints for project management

List projects

List the projects.

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Projects retrieved successfully",
  • "data": {
    }
}

Add a new project

Add a new project.

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Project added successfully",
  • "data": {
    }
}

Get a project

Get the project.

path Parameters
project_id
required
string

The ID of the project

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Project retrieved successfully",
  • "data": {
    }
}

Delete a project

Delete the project.

path Parameters
project_id
required
string

The ID of the project

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Project deleted successfully",
  • "data": {
    }
}

Update a project

Update the project.

path Parameters
project_id
required
string

The ID of the project

Request Body schema: application/json
required
name
string

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Project updated successfully",
  • "data": {
    }
}

Roles

Endpoints for role management

List roles

List the roles.

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Roles retrieved successfully",
  • "data": {
    }
}

Add a new role

Add a new role.

Request Body schema: application/json
required
name
string
permissions
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Role created successfully",
  • "data": {
    }
}

Get a role

Get the role.

path Parameters
role_id
required
string

The ID of the role

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Role retrieved successfully",
  • "data": {
    }
}

Delete a role

Delete the role.

path Parameters
role_id
required
string

The ID of the role

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Role deleted successfully",
  • "data": {
    }
}

Update a role

Update the role.

path Parameters
role_id
required
string

The ID of the role

Request Body schema: application/json
required
name
string
permissions
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Role updated successfully",
  • "data": {
    }
}

Templates

Endpoints for template management

List templates

List the templates.

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Templates retrieved successfully",
  • "data": {
    }
}

Add a new template

Add a new template.

Request Body schema: application/json
required
name
string
netpol
boolean or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "netpol": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Template added successfully",
  • "data": {
    }
}

Get template

Get the template.

path Parameters
template_id
required
string

The ID of the template

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Template retrieved successfully",
  • "data": {
    }
}

Delete the template

Delete the template.

path Parameters
template_id
required
string

The ID of the template

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Template deleted successfully",
  • "data": {
    }
}

Update the template

Update the template.

path Parameters
template_id
required
string

The ID of the template

Request Body schema: application/json
required
name
string
netpol
boolean or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "netpol": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Template updated successfully",
  • "data": {
    }
}

Import a new template

Import a new template.

Request Body schema: application/json
required
name
string
netpol
boolean or null
url
string
chart
string
repo
string or null
namespace
string or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "netpol": true,
  • "url": "string",
  • "chart": "string",
  • "repo": "string",
  • "namespace": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Template imported successfully",
  • "data": {
    }
}

List the folders

List the folders.

path Parameters
template_id
required
string

The ID of the template

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Folders retrieved successfully",
  • "data": {
    }
}

Add a new folder

Add a new folder.

path Parameters
template_id
required
string

The ID of the template

Request Body schema: application/json
required
name
string
parent_id
string or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "parent_id": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Folder added successfully",
  • "data": {
    }
}

Get the folder

Get the folder.

path Parameters
template_id
required
string

The ID of the template

folder_id
required
string

The ID of the folder

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Folder retrieved successfully",
  • "data": {
    }
}

Delete the folder

Delete the folder.

path Parameters
template_id
required
string

The ID of the template

folder_id
required
string

The ID of the folder

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Folder deleted successfully",
  • "data": {
    }
}

Update the folder

Update the folder.

path Parameters
template_id
required
string

The ID of the template

folder_id
required
string

The ID of the folder

Request Body schema: application/json
required
name
string
parent_id
string or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "parent_id": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Folder updated successfully",
  • "data": {
    }
}

List the files

List the files.

path Parameters
template_id
required
string

The ID of the template

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Files retrieved successfully",
  • "data": {
    }
}

Add a new file

Add a new file.

path Parameters
template_id
required
string

The ID of the template

Request Body schema: application/json
required
name
string
template_directory_id
string or null
mime_type
string

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "template_directory_id": "string",
  • "mime_type": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "File added successfully",
  • "data": {
    }
}

Get the file

Get the file.

path Parameters
template_id
required
string

The ID of the template

file_id
required
string

The ID of the file

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "File retrieved successfully",
  • "data": {
    }
}

Delete the file

Delete the file.

path Parameters
template_id
required
string

The ID of the template

file_id
required
string

The ID of the file

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "File deleted successfully",
  • "data": {
    }
}

Update the file

Update the file.

path Parameters
template_id
required
string

The ID of the template

file_id
required
string

The ID of the file

Request Body schema: application/json
required
name
string
template_directory_id
string or null
mime_type
string
content
string or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "template_directory_id": "string",
  • "mime_type": "string",
  • "content": "string"
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "File updated successfully",
  • "data": {
    }
}

List the fields

List the fields.

path Parameters
template_id
required
string

The ID of the template

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Fields retrieved successfully",
  • "data": {
    }
}

Add a new field

Add a new field.

path Parameters
template_id
required
string

The ID of the template

Request Body schema: application/json
required
type
string
label
string
key
string
value
string or null
required
boolean or null
secret
boolean or null
set_on_create
boolean or null
set_on_update
boolean or null
min
number or null
max
number or null
step
number or null

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "label": "string",
  • "key": "string",
  • "value": "string",
  • "required": true,
  • "secret": true,
  • "set_on_create": true,
  • "set_on_update": true,
  • "min": 0,
  • "max": 0,
  • "step": 0
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Field added successfully",
  • "data": {
    }
}

Get the field

Get the field.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Field retrieved successfully",
  • "data": {
    }
}

Delete the field

Delete the field.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Field deleted successfully",
  • "data": {
    }
}

Update the field

Update the field.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

Request Body schema: application/json
required
type
string
label
string
key
string
value
string or null
required
boolean or null
secret
boolean or null
set_on_create
boolean or null
set_on_update
boolean or null
min
number or null
max
number or null
step
number or null

Responses

Request samples

Content type
application/json
{
  • "type": "string",
  • "label": "string",
  • "key": "string",
  • "value": "string",
  • "required": true,
  • "secret": true,
  • "set_on_create": true,
  • "set_on_update": true,
  • "min": 0,
  • "max": 0,
  • "step": 0
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Field updated successfully",
  • "data": {
    }
}

List the options

List the options.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Options retrieved successfully",
  • "data": {
    }
}

Add a new option

Add a new option.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

Request Body schema: application/json
required
label
string
value
string
default
boolean or null

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "value": "string",
  • "default": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Option added successfully",
  • "data": {
    }
}

Get the option

Get the option.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

option_id
required
string

The ID of the option

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Option retrieved successfully",
  • "data": {
    }
}

Delete the option

Delete the option.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

option_id
required
string

The ID of the option

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Option deleted successfully",
  • "data": {
    }
}

Update the option

Update the option.

path Parameters
template_id
required
string

The ID of the template

field_id
required
string

The ID of the field

option_id
required
string

The ID of the option

Request Body schema: application/json
required
label
string
value
string
default
boolean or null

Responses

Request samples

Content type
application/json
{
  • "label": "string",
  • "value": "string",
  • "default": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Option updated successfully",
  • "data": {
    }
}

List the ports

List the ports.

path Parameters
template_id
required
string

The ID of the template

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Ports retrieved successfully",
  • "data": {
    }
}

Add a new port

Add a new port.

path Parameters
template_id
required
string

The ID of the template

Request Body schema: application/json
required
group
string
claim
string or null
preferred_port
number or null
random
boolean or null

Responses

Request samples

Content type
application/json
{
  • "group": "string",
  • "claim": "string",
  • "preferred_port": 0,
  • "random": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Port added successfully",
  • "data": {
    }
}

Get the port

Get the port.

path Parameters
template_id
required
string

The ID of the template

port_id
required
string

The ID of the port

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Port retrieved successfully",
  • "data": {
    }
}

Delete the port

Delete the port.

path Parameters
template_id
required
string

The ID of the template

port_id
required
string

The ID of the port

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Port deleted successfully",
  • "data": {
    }
}

Update the port

Update the port.

path Parameters
template_id
required
string

The ID of the template

port_id
required
string

The ID of the port

Request Body schema: application/json
required
group
string
claim
string or null
preferred_port
number or null
random
boolean or null

Responses

Request samples

Content type
application/json
{
  • "group": "string",
  • "claim": "string",
  • "preferred_port": 0,
  • "random": true
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Port updated successfully",
  • "data": {
    }
}

Users

Endpoints for user management

List users

List the users.

query Parameters
cursor
string

Cursor for pagination

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "Users retrieved successfully",
  • "data": {
    }
}

Add a new user

Add a new user.

Request Body schema: application/json
required
name
string
email
string
password
string or null
password_confirmation
string or null
roles
Array of strings or null
permissions
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "password": "string",
  • "password_confirmation": "string",
  • "roles": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User created successfully",
  • "data": {
    }
}

Get a user

Get the user.

path Parameters
user_id
required
string

The ID of the user

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User retrieved successfully",
  • "data": {
    }
}

Delete a user

Delete the user.

path Parameters
user_id
required
string

The ID of the user

Responses

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User deleted successfully",
  • "data": {
    }
}

Update a user

Update the user.

path Parameters
user_id
required
string

The ID of the user

Request Body schema: application/json
required
name
string
email
string
password
string or null
password_confirmation
string or null
roles
Array of strings or null
permissions
Array of strings or null

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "email": "string",
  • "password": "string",
  • "password_confirmation": "string",
  • "roles": [
    ],
  • "permissions": [
    ]
}

Response samples

Content type
application/json
{
  • "status": "success",
  • "message": "User updated successfully",
  • "data": {
    }
}