Skip to main content
Version: 1.15.0

Workspace

A workspace is associated with one or more namespaces and a user.

info

Across our documentation, we refer to the workspace as the slice workspace. The two terms are used interchangeably.

Create a Workspace

Use this API to create a workspace.

Method and URL

POST /api/v1/slice-workspace

Parameters

ParameterParameter TypeDescriptionRequired
clustersList of stringsThe list of clusters registered with the controller.Mandatory
namespacesList of stringsThe list of namespaces name associated with the workspace.Mandatory
usernameStringThe user (team/job/project) name associated with the workspace.Mandatory
workspaceNameStringThe name of the workspace that can be user/team /job-workspace/project name.Mandatory
emailStringThe registered email address of the user.Mandatory

Example Request

POST /api/v1/slice-workspace
{
"workspaceName": "workspaceName",
"clusters": [
"cluster-name registered with EGS"
],
"namespaces": [
"namespace-name"
],
"username": "John Doe",
"email": "john.doe@avesha.io",
"overlayNetworkDeploymentMode": "single-network",
"sliceSubnet": "10.0.0.0/16",
"sliceGWType": "OpenVPN",
"standardQosProfileName": "default"
}

Example Responses

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"workspaceName": "workspace-name"
}
}

Example

curl --location --globoff '{{host}}/api/v1/slice-workspace' \
--data-raw '{
"workspaceName": "workspaceName",
"clusters": [
"worker-1"
],
"namespaces" : [
"namespace-1",
"namespace-2"
],
"username": "John Doe",
"email": "john.doe@avesha.io"
}'

Response: Already Exists

{
"statusCode": 409,
"status": "Error",
"message": "Already Exists",
"data": null,
"error": {
"errorKey": "",
"message": "Already Exists",
"data": "{\"error\":{\"Message\":\"Error registering Slice\",\"Status\":409,\"DetailedError\":{\"Errormessage\":\"sliceconfigs.controller.kubeslice.io \\\"evening\\\" already exists\",\"Reason\":\"AlreadyExists\",\"Details\":\"\"},\"StatusCode\":409,\"ReferenceDocumentation\":\"https://docs.avesha.io/documentation/enterprise-egs\"}}"
}
}

Response: Bad Request

{
"statusCode": 422,
"status": "Error",
"message": "Bad Request",
"data": null,
"error": {
"errorKey": "",
"message": "Bad Request",
"data": "{\"error\":{\"Message\":\"Error registering Slice\",\"Status\":422,\"DetailedError\":{\"Errormessage\":\"admission webhook \\\"vsliceconfig.kb.io\\\" denied the request: SliceConfig.controller.kubeslice.io \\\"evening\\\" is invalid: Spec.NamespaceIsolationProfile.ApplicationNamespaces.Clusters: Required value: clusters\",\"Reason\":\"Invalid\",\"Details\":[{\"reason\":\"FieldValueRequired\",\"message\":\"Required value: clusters\",\"field\":\"Spec.NamespaceIsolationProfile.ApplicationNamespaces.Clusters\"}]},\"StatusCode\":422,\"ReferenceDocumentation\":\"https://docs.avesha.io/documentation/enterprise-egs\"}}"
}
}

List Workspaces

List workspace API returns list of workspaces and workspaces details.

Method and URL

GET /api/v1/slice-workspace/list

Example Request

GET /api/v1/slice-workspace/list
curl --location --globoff '{{host}}/api/v1/slice-workspace/list'

Example Responses

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"workspaces": [
{
"name": "workspace1",
"overlayNetworkDeploymentMode": "no-network",
"maxClusters": 16,
"sliceDescription": "Created via slice workspace API",
"clusters": [
"worker-1"
],
"namespaces": [
{
"namespace": "namespace-3",
"clusters": [
"worker-1"
]
}
]
},
{
"name": "workspace2",
"overlayNetworkDeploymentMode": "no-network",
"maxClusters": 16,
"sliceDescription": "Created via slice workspace API",
"clusters": [
"worker-1"
],
"namespaces": [
{
"namespace": "namespace-1",
"clusters": [
"worker-1"
]
},
{
"namespace": "namespace-2",
"clusters": [
"worker-1"
]
}
]
}
]
}
}

Generate KubeConfig

Use this API to get the KubeConfig to access the namespaces onboarded onto a slice. You can use this KubeConfig to deploy the AI workloads in the namespaces.

Method and URL

GET /api/v1/slice-workspace/kube-config

Parameters

ParameterParameter TypeDescriptionRequired
workspaceNameStringThe name of the slice for which you want to generate KubeConfig.Mandatory
clusterNameStringThe name of the worker cluster.Mandatory

Example Request

curl -X GET --location --globoff '{{host}}/api/v1/slice-workspace/kube-config' \
--data '{
"workspaceName": "<workspaceName>"
"clusterName": "<cluster-name>"
}'

Example Response

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"kubeConfig": "apiVersion: v1\nkind: Config\nclusters:\n - name: worker-1\n cluster:\n server: https://x.x.x.x\n certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0ttCk1JSUVMVENDQXBXZ0F3SUJBZ0lSQUptUWNiTjdRUXZzYnExR3I0MFdFNsdUFKSDF2UE40agpic3VES3BKSThqNnUyWjFBS28yemRIdTBVTjRjclFhNWs0UmxaYm15djM3Vm83RytEdGZxUEpwVGNjQVFTYkFBCm4xTExwODNYUU5jUmFPem1RSlRCWHdwbWQyUXZ2ODVWb2dvWFNGNGhCQXZCVXB4T2NVTkRycnlyUlk1VU9NUTEKb1p5RGMrRnNVaTNsak4rV2M5NmNWM2s9Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K\nusers:\n - name: afternoon-workspace\n user:\n token: eyJhbGciOiJSUzI1NiIsImtpZCI6ImtsMUNpZDR5ZmlKb2dsVzVOTjFmdGN0emhKbjR2dEh5RWN2RmYtaTRNS28ifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9I6qvdkapR8_YTlugVdhdxIhrCppWhKsCeX0g3wT2tmjV90rcJXia1jejUmhfIwkxOj2R2-N57UfSB5dIb1DPZ_XX21yxJhcBua3GAe0v908wiMRTj_BlLVZyOj31d2d_0M4aQl2JCe0tUg4pL0BBEavk-cUXLHC8wOlT2BlmMqq6G1m3ZZPcrW4Eljt17OZVpGlMIjR4ZN1ag78fSFhr2trPkQNEYygIGJBI5oLDYH04SHURvJMA-LIqWodoLJq-s7uhgZFi4UfIp5m6bw2UATWt8AyffDnLww\ncontexts:\n - name: workspace1@worker-1\n context:\n cluster: worker-1\n user: workspace1\n namespace: namespace-3\ncurrent-context: afternoon-workspace@worker-1\n"
}
}

Response: Worker name is required as a query parameter

{
"statusCode": 400,
"status": "UPSTREAM_REQUEST_ERROR",
"message": "Worker name is required as a query parameter",
"data": null,
"error": {
"errorKey": "UPSTREAM_REQUEST_ERROR",
"message": "Worker name is required as a query parameter",
"data": ""
}
}

Get Workspace Details

Use this API to get the details of a workspace.

Method and URL

GET /api/v1/slice-workspace/{name}

Change {name} to the actual name of the workspace you want to retrieve. This is the unique name of the workspace (SliceConfig).

Parameters

Response Parameters

ParameterParameter TypeDescription
overlayNetworkDeploymentModeStringIt defines the overlay network mode. The values are single-network, multi-network, no-network.
sliceSubnetStringThe subnet CIDR range allocated for the slice (For example, 10.244.0.0/16).
sliceTypeStringThis is type of workspace (slice).
sliceGatewayProvider.sliceGatewayTypeStringThe gateway type used in the workspace. (For example, OpenVPN, Wireguard).
sliceGatewayProvider.sliceCaTypeStringThe certificate authority type used by the workspace (slice) (for example, Local).
sliceGatewayProvider.sliceGatewayServiceTypeArrayThe list of gateway service configurations.
sliceGatewayProvider.sliceGatewayServiceType[].clusterStringThe cluster name where the gateway is deployed.
sliceGatewayProvider.sliceGatewayServiceType[].typeStringThe service type (For example, NodePort, LoadBalancer).
sliceGatewayProvider.sliceGatewayServiceType[].protocolStringThe protocol used. (TCP or UDP).
sliceIpamTypeStringThe type of IP address management used. (for example, Local).
clustersArrayThe list of cluster names associated with this workspace.
standardQosProfileNameStringThe name of the standard Quality of Service profile applied.
qosProfileDetails.queueTypeStringThe queue discipline type (for example, HTB).
qosProfileDetails.priorityIntegerThe priority assigned to the QoS profile.
qosProfileDetails.tcTypeStringThe traffic control type (for example. BANDWIDTH_CONTROL).
qosProfileDetails.bandwidthCeilingKbpsIntegerThe maximum allowed bandwidth in Kbps.
qosProfileDetails.bandwidthGuaranteedKbpsIntegerThe minimum guaranteed bandwidth in Kbps.
qosProfileDetails.dscpClassStringDSCP class applied for QoS marking (for example, AF21).
namespaceIsolationProfile.isolationEnabledBooleanThis is the parameter to enable namespace isolation.
namespaceIsolationProfile.applicationNamespacesArrayThe list of application namespaces under this workspace.
namespaceIsolationProfile.applicationNamespaces[].namespaceStringThe namespace name.
namespaceIsolationProfile.applicationNamespaces[].clustersArrayClusters where the namespace is deployed.
namespaceIsolationProfile.allowedNamespacesArrayNamespaces allowed to communicate across clusters.
namespaceIsolationProfile.allowedNamespaces[].namespaceStringThe allowed namespace name.
namespaceIsolationProfile.allowedNamespaces[].clustersArrayClusters where the namespace is allowed.
externalGatewayConfigArrayThe configuration for external ingress/egress gateways.
externalGatewayConfig[].ingress.enabledBooleanThis is the parameter to enable ingress gateway.
externalGatewayConfig[].egress.enabledBooleanThis is the parameter to enable egress gateway.
externalGatewayConfig[].nsIngress.enabledBooleanThis is the parameter to enable namespace ingress gateway.
externalGatewayConfig[].gatewayTypeStringThis is type of gateway (envoy, istio, or none).
externalGatewayConfig[].clustersArrayClusters where the gateway configuration applies.
externalGatewayConfig[].vpcServiceAccess.ingress.enabledBooleanThis is the parameter to enable VPC ingress access.
externalGatewayConfig[].vpcServiceAccess.egress.enabledBooleanThis is the parameter to enable VPC egress access.
maxClustersIntegerThe maximum number of clusters allowed for the workspace.
rotationIntervalIntegerThe credential or certificate rotation interval (in days).
renewBeforeStringISO timestamp before which renewal should happen.
vpnConfig.cipherStringThe VPN encryption cipher used (for example, "AES-256-CBC").
status.sliceHealthStatusStringThe overall health status of the workspace (slice). The values are Normal and Warning.
status.componentStatusesArrayThe health status of individual workspace ( slice) components.
status.componentStatuses[].componentStringThe component name (for example, gateway and service-discovery).
status.componentStatuses[].componentHealthStatusStringThe health status of the component. The values are Normal, Warning, and Error.
status.lastUpdatedStringThe timestamp of when the health status was last updated.

Example Request

GET /api/v1/slice-workspace/sample-slice

Example Responses

Example Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"name": "sample-slice",
"overlayNetworkDeploymentMode": "single-network",
"sliceSubnet": "10.244.0.0/16",
"sliceType": "Application",
"sliceGatewayProvider": {
"sliceGatewayType": "OpenVPN",
"sliceCaType": "Local",
"sliceGatewayServiceType": [
{
"cluster": "cluster-a",
"type": "NodePort",
"protocol": "UDP"
},
{
"cluster": "cluster-b",
"type": "LoadBalancer",
"protocol": "TCP"
}
]
},
"sliceIpamType": "Local",
"clusters": ["cluster-a", "cluster-b"],
"standardQosProfileName": "standard-qos-profile",
"qosProfileDetails": {
"queueType": "HTB",
"priority": 1,
"tcType": "BANDWIDTH_CONTROL",
"bandwidthCeilingKbps": 100000,
"bandwidthGuaranteedKbps": 50000,
"dscpClass": "AF21"
},
"namespaceIsolationProfile": {
"isolationEnabled": true,
"applicationNamespaces": [
{
"namespace": "app-namespace-a",
"clusters": ["cluster-a"]
},
{
"namespace": "app-namespace-b",
"clusters": ["cluster-b"]
}
],
"allowedNamespaces": [
{
"namespace": "shared-namespace",
"clusters": ["cluster-a", "cluster-b"]
}
]
},
"externalGatewayConfig": [
{
"ingress": { "enabled": true },
"egress": { "enabled": true },
"nsIngress": { "enabled": false },
"gatewayType": "envoy",
"clusters": ["cluster-a"],
"vpcServiceAccess": {
"ingress": { "enabled": false },
"egress": { "enabled": true }
}
},
{
"ingress": { "enabled": false },
"egress": { "enabled": true },
"nsIngress": { "enabled": false },
"gatewayType": "istio",
"clusters": ["cluster-b"]
}
],
"maxClusters": 16,
"rotationInterval": 30,
"renewBefore": "2025-11-01T00:00:00Z",
"vpnConfig": {
"cipher": "AES-256-CBC"
},
"status": {
"sliceHealthStatus": "Normal",
"componentStatuses": [
{
"component": "gateway",
"componentHealthStatus": "Normal"
},
{
"component": "service-discovery",
"componentHealthStatus": "Warning"
}
],
"lastUpdated": "2025-10-31T10:00:00Z"
}
}
}

Example Response: Error

{
"statusCode": 500,
"status": "Error",
"message": "Internal Server Error",
"data": null,
"error": {
"errorKey": "",
"message": "Failed to fetch workspace",
"data": "{\"error\":{\"Message\":\"Error retrieving SliceConfig\",\"Status\":500,\"DetailedError\":{\"Errormessage\":\"Kubernetes API timeout\",\"Reason\":\"InternalError\",\"Details\":\"\"},\"StatusCode\":500}}"
}
}

Update a Workspace

Use this API to update a workspace.

Method and URL

PUT /api/v1/slice-workspace/{name}

Change {name} to the actual name of the workspace you want to update.

Parameters

ParameterParameter TypeDescriptionRequired
nameStringThe name of the workspace to be updated.Mandatory
clustersList of stringsThe list of clusters registered with the controller.Mandatory
namespacesList of stringsThe list of namespaces associated with the workspace.Mandatory
usernameStringThe user (team/job/project) name associated with the workspace.Mandatory
emailStringThe registered email address of the user.Mandatory
overlayNetworkDeploymentModeStringThe overlay network deployment mode for the workspace. The default value is no-network.Optional
sliceSubnetStringThe subnet CIDR for the workspace. This is not required if the parameter overlayNetworkDeploymentMode is set to no-network.Conditional
sliceGWTypeStringThe slice gateway type (for example, OpenVPN). This is not required if the parameter is overlayNetworkDeploymentMode is set to no-network.Conditional
standardQosProfileNameStringThe QoS profile name to be used. This is not required if the parameter overlayNetworkDeploymentMode is set to no-network.Conditional

Example Request

PUT /api/v1/slice-workspace/workspaceName
{
"clusters": [
"cluster-name registered with EGS"
],
"namespaces": [
"namespace-name"
],
"username": "John Doe",
"email": "john.doe@avesha.io",
"overlayNetworkDeploymentMode": "single-network",
"sliceSubnet": "10.0.0.0/16",
"sliceGWType": "OpenVPN",
"standardQosProfileName": "default"
}

Example Responses

Example Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"workspaceName": "workspace-name"
}
}

Example Response: Error

{
"statusCode": 404,
"status": "Error",
"message": "Not Found",
"data": null,
"error": {
"errorKey": "",
"message": "Already Exists",
"data": "{\"error\":{\"Message\":\"Error updating Slice\",\"Status\":404,\"DetailedError\":{\"Errormessage\":\"sliceconfigs.controller.kubeslice.io \\\"workspace-name\\\" not found\",\"Reason\":\"NotFound\",\"Details\":\"\"},\"StatusCode\":404\"}}"
}
}

Get Workspace Overlay Network Metrics

Use this API to get the overlay network metrics of a workspace.

Method and URL

GET api/v1/workspace/overlaynetworkmetrics/{workspace}

Change {workspace} to the actual name of the workspace you want to retrieve the overlay network metrics for.

Parameters

ParameterParameter TypeDescription
workspaceNameStringThe name of the workspace for which the network metrics are fetched.
clustersArrayThe list of clusters associated with the workspace, along with their metadata.
clusters[].clusterNameStringThe name of the cluster.
clusters[].locationStringThe geographical or logical location of the cluster.
clusters[].providerStringThe cloud or infrastructure provider where the cluster is hosted (for example, AWS, GCP, Azure).
networkMetricsArrayThe list of latency and throughput metrics between pairs of clusters.
networkMetrics[].sourceClusterStringThe name of the source cluster from which data is transmitted.
networkMetrics[].targetClusterStringThe name of the target cluster to which data is transmitted.
networkMetrics[].latencyIntegerAverage latency between the source and target clusters.
networkMetrics[].throughput.txRateIntegerThe current transmit (Tx) data rate from the source to target cluster.
networkMetrics[].throughput.rxRateIntegerThe current receive (Rx) data rate at the target cluster from the source cluster.

Example Request

GET api/v1/workspace/overlaynetworkmetrics/demo-workspace

Example Responses

Example Responses: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {
"workspaceName": "demo-workspace",
"clusters": [
{
"clusterName": "cluster-1",
"location": "us-east",
"provider": "aws"
},
{
"clusterName": "cluster-2",
"location": "us-west",
"provider": "gcp"
},
{
"clusterName": "cluster-3",
"location": "eu-central",
"provider": "azure"
}
],
"networkMetrics": [
{
"sourceCluster": "cluster-1",
"targetCluster": "cluster-2",
"latency": 12,
"throughput": {
"txRate": 125,
"rxRate": 118
}
},
{
"sourceCluster": "cluster-2",
"targetCluster": "cluster-1",
"latency": 11,
"throughput": {
"txRate": 122,
"rxRate": 115"
}
},
{
"sourceCluster": "cluster-1",
"targetCluster": "cluster-3",
"latency": 25,
"throughput": {
"txRate": 110,
"rxRate": 108
}
},
{
"sourceCluster": "cluster-3",
"targetCluster": "cluster-1",
"latency": 24,
"throughput": {
"txRate": 107,
"rxRate": 106
}
},
{
"sourceCluster": "cluster-2",
"targetCluster": "cluster-3",
"latency": 17,
"throughput": {
"txRate": 118,
"rxRate": 112
}
},
{
"sourceCluster": "cluster-3",
"targetCluster": "cluster-2",
"latency": 18,
"throughput": {
"txRate": 116,
"rxRate": 110
}
}
]
}
}

Example Response: Error

{
"statusCode": 404,
"status": "Error",
"message": "Workspace not found",
"data": null,
"error": {
"errorKey": "",
"message": "No metrics found for workspace",
"data": null
}
}

Delete a Workspace

This API can be used to delete a workspace. The request is queued and processed by the EGS backend. Use LIST workspaces API to see the workspaces and workspace details.

Method and URL

DELETE /api/v1/slice-workspace

Example Request

DELETE /api/v1/slice-workspace
{
"workspaceName": "workspace-name"
}

Example Responses

Response: Success

{
"statusCode": 200,
"status": "OK",
"message": "Success",
"data": {}
}