Workspace
A workspace is associated with one or more namespaces and a user.
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
| Parameter | Parameter Type | Description | Required |
|---|---|---|---|
| clusters | List of strings | The list of clusters registered with the controller. | Mandatory |
| namespaces | List of strings | The list of namespaces name associated with the workspace. | Mandatory |
| username | String | The user (team/job/project) name associated with the workspace. | Mandatory |
| workspaceName | String | The name of the workspace that can be user/team /job-workspace/project name. | Mandatory |
| String | The 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
| Parameter | Parameter Type | Description | Required |
|---|---|---|---|
| workspaceName | String | The name of the slice for which you want to generate KubeConfig. | Mandatory |
| clusterName | String | The 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/detail/{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
| Parameter | Parameter Type | Description |
|---|---|---|
| overlayNetworkDeploymentMode | String | It defines the overlay network mode. The values are single-network, multi-network, no-network. |
| sliceSubnet | String | The subnet CIDR range allocated for the slice (For example, 10.244.0.0/16). |
| sliceType | String | This is type of workspace (slice). |
| sliceGatewayProvider.sliceGatewayType | String | The gateway type used in the workspace. (For example, OpenVPN, Wireguard). |
| sliceGatewayProvider.sliceCaType | String | The certificate authority type used by the workspace (slice) (for example, Local). |
| sliceGatewayProvider.sliceGatewayServiceType | Array | The list of gateway service configurations. |
| sliceGatewayProvider.sliceGatewayServiceType[].cluster | String | The cluster name where the gateway is deployed. |
| sliceGatewayProvider.sliceGatewayServiceType[].type | String | The service type (For example, NodePort, LoadBalancer). |
| sliceGatewayProvider.sliceGatewayServiceType[].protocol | String | The protocol used. (TCP or UDP). |
| sliceIpamType | String | The type of IP address management used. (for example, Local). |
| clusters | Array | The list of cluster names associated with this workspace. |
| standardQosProfileName | String | The name of the standard Quality of Service profile applied. |
| qosProfileDetails.queueType | String | The queue discipline type (for example, HTB). |
| qosProfileDetails.priority | Integer | The priority assigned to the QoS profile. |
| qosProfileDetails.tcType | String | The traffic control type (for example. BANDWIDTH_CONTROL). |
| qosProfileDetails.bandwidthCeilingKbps | Integer | The maximum allowed bandwidth in Kbps. |
| qosProfileDetails.bandwidthGuaranteedKbps | Integer | The minimum guaranteed bandwidth in Kbps. |
| qosProfileDetails.dscpClass | String | DSCP class applied for QoS marking (for example, AF21). |
| namespaceIsolationProfile.isolationEnabled | Boolean | This is the parameter to enable namespace isolation. |
| namespaceIsolationProfile.applicationNamespaces | Array | The list of application namespaces under this workspace. |
| namespaceIsolationProfile.applicationNamespaces[].namespace | String | The namespace name. |
| namespaceIsolationProfile.applicationNamespaces[].clusters | Array | Clusters where the namespace is deployed. |
| namespaceIsolationProfile.allowedNamespaces | Array | Namespaces allowed to communicate across clusters. |
| namespaceIsolationProfile.allowedNamespaces[].namespace | String | The allowed namespace name. |
| namespaceIsolationProfile.allowedNamespaces[].clusters | Array | Clusters where the namespace is allowed. |
| externalGatewayConfig | Array | The configuration for external ingress/egress gateways. |
| externalGatewayConfig[].ingress.enabled | Boolean | This is the parameter to enable ingress gateway. |
| externalGatewayConfig[].egress.enabled | Boolean | This is the parameter to enable egress gateway. |
| externalGatewayConfig[].nsIngress.enabled | Boolean | This is the parameter to enable namespace ingress gateway. |
| externalGatewayConfig[].gatewayType | String | This is type of gateway (envoy, istio, or none). |
| externalGatewayConfig[].clusters | Array | Clusters where the gateway configuration applies. |
| externalGatewayConfig[].vpcServiceAccess.ingress.enabled | Boolean | This is the parameter to enable VPC ingress access. |
| externalGatewayConfig[].vpcServiceAccess.egress.enabled | Boolean | This is the parameter to enable VPC egress access. |
| maxClusters | Integer | The maximum number of clusters allowed for the workspace. |
| rotationInterval | Integer | The credential or certificate rotation interval (in days). |
| renewBefore | String | ISO timestamp before which renewal should happen. |
| vpnConfig.cipher | String | The VPN encryption cipher used (for example, "AES-256-CBC"). |
| status.sliceHealthStatus | String | The overall health status of the workspace (slice). The values are Normal and Warning. |
| status.componentStatuses | Array | The health status of individual workspace ( slice) components. |
| status.componentStatuses[].component | String | The component name (for example, gateway and service-discovery). |
| status.componentStatuses[].componentHealthStatus | String | The health status of the component. The values are Normal, Warning, and Error. |
| status.lastUpdated | String | The timestamp of when the health status was last updated. |
Example Request
GET /api/v1/slice-workspace/detail/sample-slice
Example Responses
Example Response: Success
{
"statusCode":200,
"status":"OK",
"message":"Success",
"data":{
"name":"pink",
"overlayNetworkDeploymentMode":
"single-network",
"sliceSubnet":"192.168.0.0/16",
"sliceType":"Application",
"sliceGatewayProvider":{
"sliceGatewayType":"Wireguard",
"sliceCaType":"Local",
"sliceGatewayServiceType":[{
"cluster":"worker-1","type":"NodePort","protocol":"UDP"},
{"cluster":"worker-2","type":"LoadBalancer","protocol":"TCP"}]},
"sliceIpamType":"Local",
"clusters":["worker-1","worker-2"],
"standardQosProfileName":"default",
"qosProfileDetails":{"queueType":"","tcType":"","bandwidthCeilingKbps":0,"bandwidthGuaranteedKbps":0,"dscpClass":""},
"namespaceIsolationProfile":{
"isolationEnabled":false,
"applicationNamespaces":[{"namespace":"nnn","clusters":["*"]}]},
"externalGatewayConfig":[{
"ingress":{"enabled":true},
"egress":{"enabled":false},
"nsIngress":{"enabled":false},
"gatewayType":"istio",
"clusters":["worker-1"],
"vpcServiceAccess":{"ingress":{"enabled":false},"egress":{"enabled":false}}},
{
"ingress":{"enabled":false},
"egress":{"enabled":true},
"nsIngress":{"enabled":false},
"gatewayType":"istio",
"clusters":["worker-2"],
"vpcServiceAccess":{
"ingress":{"enabled":false},
"egress":{"enabled":false}}}],
"maxClusters":16,
"rotationInterval":30,
"vpnConfig":{},
"status":{
"sliceHealthStatus":"Warning",
"lastUpdated":"2025-11-11T14:11:34Z",
"clusterStatuses":[{
"cluster":"worker-1","sliceHealthStatus":"Warning","componentStatuses":[{
"component":"dns",
"componentHealthStatus":"Normal"},
{
"component":"slice-gateway",
"componentHealthStatus":"Normal"},
{
"component":"slice-router",
"componentHealthStatus":"Normal"
},
{
"component":"ingress",
"componentHealthStatus":"Error"
},
{
"component":"gateway-tunnel",
"componentHealthStatus":"Normal"
}],
"lastUpdated":"2025-11-11T14:11:34Z"
},
{
"cluster":"worker-2",
"sliceHealthStatus":"Warning",
"componentStatuses":[{
"component":"dns",
"componentHealthStatus":"Normal"
},
{
"component":"slice-gateway",
"componentHealthStatus":"Normal"
},
{
"component":"slice-router",
"componentHealthStatus":"Normal"
},
{
"component":"egress",
"componentHealthStatus":"Error"
},
{
"component":"gateway-tunnel",
"componentHealthStatus":"Normal"
}],
"lastUpdated":"2025-11-11T14:11:34Z"
}]}}}
Example Response: Error
{
"statusCode":404,
"status":"UPSTREAM_REQUEST_ERROR",
"message":"Error in slice details",
"data":null,
"error":{
"errorKey":"UPSTREAM_REQUEST_ERROR",
"message":"Error in slice details",
"data":"Error: sliceconfigs.controller.kubeslice.io \"pinks\" not found; Reason: NotFound; Refer Documentation: https://docs.avesha.io/documentation/enterprise-egs"}
}
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
| Parameter | Parameter Type | Description | Required |
|---|---|---|---|
| name | String | The name of the workspace to be updated. | Mandatory |
| clusters | List of strings | The list of clusters registered with the controller. | Mandatory |
| namespaces | List of strings | The list of namespaces associated with the workspace. | Mandatory |
| username | String | The user (team/job/project) name associated with the workspace. | Mandatory |
| String | The registered email address of the user. | Mandatory | |
| overlayNetworkDeploymentMode | String | The overlay network deployment mode for the workspace. The default value is no-network. | Optional |
| sliceSubnet | String | The subnet CIDR for the workspace. This is not required if the parameter overlayNetworkDeploymentMode is set to no-network. | Conditional |
| sliceGWType | String | The slice gateway type (for example, OpenVPN). This is not required if the parameter is overlayNetworkDeploymentMode is set to no-network. | Conditional |
| standardQosProfileName | String | The 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/slice-workspace/overlaynetworkmetrics/{workspace-name}
Change {workspace-name} to the actual name of the workspace you want to retrieve the overlay network metrics for.
Parameters
| Parameter | Parameter Type | Description |
|---|---|---|
| workspaceName | String | The name of the workspace for which the network metrics are fetched. |
| clusters | Array | The list of clusters associated with the workspace, along with their metadata. |
| clusters[].clusterName | String | The name of the cluster. |
| clusters[].location | String | The geographical or logical location of the cluster. |
| clusters[].provider | String | The cloud or infrastructure provider where the cluster is hosted (for example, AWS, GCP, Azure). |
| networkMetrics | Array | The list of latency and throughput metrics between pairs of clusters. |
| networkMetrics[].sourceCluster | String | The name of the source cluster from which data is transmitted. |
| networkMetrics[].targetCluster | String | The name of the target cluster to which data is transmitted. |
| networkMetrics[].latency | Integer | Average latency between the source and target clusters. |
| networkMetrics[].throughput.txRate | Integer | The current transmit (Tx) data rate from the source to target cluster. |
| networkMetrics[].throughput.rxRate | Integer | The 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":{
"clusters":[
{"clusterName":"worker-1","location":"us-mia","provider":"linode"},
{"clusterName":"worker-2","location":"us-mia","provider":"linode"}
],
"networkMetrics":[{
"activePods":2,
"avgRxRate":8,
"avgTxRate":8,
"lastUpdated":"2025-11-10T13:35:38Z",
"maxLatency":1,
"sourceCluster":"worker-1",
"targetCluster":"worker-2"},
{
"activePods":2,
"avgRxRate":12,
"avgTxRate":8,
"lastUpdated":"2025-11-10T13:44:46Z",
"maxLatency":1,
"sourceCluster":"worker-2",
"targetCluster":"worker-1"
}],
"workspaceName":"single-network"}}
Example Response: Error
{
"statusCode":404,
"status":"UPSTREAM_REQUEST_ERROR",
"message":" Error occurred while fetching the overlay network metrics",
"data":null,
"error":
{
"errorKey":"UPSTREAM_REQUEST_ERROR",
"message":" Error occurred while fetching the overlay network metrics",
"data":"Error: sliceconfigs.controller.kubeslice.io \"single-networks\" not found; Reason: NotFound; Refer Documentation: https://docs.avesha.io/documentation/open-source/0.4.0/reference/configuration-parameters#slice-configuration-parameters"}}
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": {}
}