This reference provides a brief summary of the endpoints and HTTP methods in the Tanzu Service Mesh REST API that you can use to perform operations on product features. For a detailed API reference, use the API Explorer in the Tanzu Service Mesh Console user interface.
For information about how to access the API Explorer in the Tanzu Service Mesh Console user interface, see the "API Reference" section in Overview of the Tanzu Service Mesh REST API.
This reference is organized by feature type.
Autoscaling
HTTP Method |
Endpoint |
Description |
---|---|---|
GET |
https://{server_name}/v1alpha2/projects/default/autoscaling/configs |
Retrieve a list of existing autoscaling definitions (ASDs) for services. Optionally pass the following parameters:
If you don't include a parameter, all possibilities for that parameter are retrieved. For example, if you don't include the Name parameter, the API returns the ASDs for all the services. |
Clusters
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha2/clusters |
Create a client cluster.
Note:
This endpoint is currently not used. |
POST |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/apps |
Install an application on a cluster.
Note:
This endpoint is deprecated. |
GET |
https://{server_name}/tsm/v1alpha2/clusters |
Retrieve a list of the clusters onboarded to Tanzu Service Mesh. |
GET |
https://{server_name}/tsm/v1alpha2/clusters/onboard-url |
Retrieve the URL of a registration YAML file. You use this YAML file to register a cluster with Tanzu Service Mesh during onboarding. |
GET |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID} |
Retrieve details of a cluster, including the display name of the cluster in the Tanzu Service Mesh user interface, the version of Kubernetes on the cluster, and its operational status. The response also contains a list of the namespace exclusions defined for the cluster, if any. For more information about namespace exclusions, see Onboard a Cluster to Tanzu Service Mesh. To determine the result of installing Tanzu Service Mesh on the cluster, use the value of the |
GET |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/apps |
Retrieve the version of Tanzu Service Mesh installed on a cluster, the state of the Tanzu Service Mesh installation, and a list of the versions of Tanzu Service Mesh that are available to upgrade the cluster to. For more information, see Perform Upgrades and Rollbacks. |
GET |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/logs/{type}?namespace={namespace} |
Schedule the fetching of logs of a specified type from a cluster. Set the type parameter to the type of log to fetch. Set the optional namespace parameter to the name of a namespace on the cluster. If you include it, the API will return the logs only for the namespace. You can download the logs by sending a GET request to the https://{server_name}/tsm/v1alpha2/projects/default/jobs/{id}/download endpoint. |
PUT |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}?createOnly=true|false? |
Register a new cluster with Tanzu Service Mesh (set createOnly to |
PUT |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/apps/{appId} |
Install Tanzu Service Mesh or upgrade the version of Tanzu Service Mesh on a cluster. Replace appId with To install the latest available version of Tanzu Service Mesh on the cluster, set version to |
PUT |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/tmc |
Create or update a cluster for your organization, using VMware Tanzu™ Mission Control™. If a specified cluster does not exist, it will be created. It it exists, it will be updated. |
PUT |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/token |
Generate a security token for a cluster. This token is used to establish a secure connection between Tanzu Service Mesh and the cluster while the cluster is onboarded. To establish a secure connection to Tanzu Service Mesh, apply the generated token as a Kubernetes secret by running the following command. kubectl -n vmware-system-tsm create secret generic cluster-token --from-literal=token={token} |
DELETE |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID} |
Remove a cluster from Tanzu Service Mesh. This endpoint returns the ID of the job created for the removal of the cluster. For more information about removing a cluster, see Remove a Cluster from Tanzu Service Mesh. |
DELETE |
https://{server_name}/tsm/v1alpha2/clusters/{clusterID}/apps/{appId} |
Uninstall Tanzu Service Mesh from a cluster. Replace appId with |
Global Namespaces
A global namespace connects the resources and workloads that make up the application into one virtual unit to provide consistent traffic routing, connectivity, resiliency, and security for applications across multiple clusters and clouds.
You can use the following endpoints and methods to interact with global namespaces.
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces |
Create a global namespace. For more information, see Create a Global Namespace. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces |
Retrieve a list of the IDs of defined global namespaces. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id} |
Retrieve the configuration of a global namespace. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id}/capabilities |
Retrieve a list of capabilities enabled for a global namespace and their statuses. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id}/capabilities/{capability} |
Retrieve the status of a specified capability enabled for a global namespace. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id}/members |
Retrieve a list of the member services in a global namespace. |
PUT |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id} |
Update the configuration of a global namespace, including the service mapping rules that is used to select services for the global namespace. For information about the request body parameters, see Step 1 in Create a Global Namespace. |
DELETE |
https://{server_name}/tsm/v1alpha2/projects/default/global-namespaces/{id} |
Delete a global namespace. |
Resource Groups
Resource group is a collection of cluster resources of a specific type that share specific characteristics. Resource groups help enforce policies and monitor the performance of resources in a single global namespace or across your entire organization.
You can use the following endpoints and methods to interact with resource groups.
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type} |
Create a resource group of a specified type (for example, a service group). |
POST |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/match |
Retrieve a list of possible members for a resource group according to the membership conditions defined for the group. For example, retrieve a list of the services that match the conditions defined for a service group. |
POST |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/membership |
Retrieve a list of the resource groups (for example, service groups) that a specified resource (for example, a service) belongs to. Provide the information about the resource, including its ID, by passing parameter values in the request body. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type} |
Retrieve a list of the IDs of existing resource groups of a specified type (for example, service groups). |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/detailed-list |
Retrieve a list of resource groups of a specified type, with configuration details for each group. This endpoint supports cursor-based pagination of results. You can break down the result list into subsets, or pages, define a limit on the number of items to return per page, and retrieve specific resource groups from the list. Use the following parameters:
For example, to retrieve the details for a resource group called "Order Services" at the beginning of the response and to see no more than 10 resource groups per page, enter Order Services into from and 10 into limit. The The |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/id/{id} |
Retrieve the configuration of a resource group, including the conditions for membership in the group. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/id/{id}/members |
Retrieve a list of the members of a resource group, for example, the member services in a service group. |
PUT |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/id/{id} |
Create or update a resource group. |
DELETE |
https://{server_name}/tsm/v1alpha2/projects/default/resource-groups/{type}/id/{id} |
Delete a resource group. |
Jobs
Jobs represents asynchronous cluster operations. You can use the following endpoints and methods to retrieve the status of cluster operations.
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha2/projects/default/jobs |
Create a job. This endpoint is reserved for future use. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/jobs |
Retrieve a list of jobs. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/jobs/{id} |
Retrieve the details of a job, including the status of a job. For example, to determine whether Tanzu Service Mesh was successfully installed on a cluster, you pass the ID of the installation job to this endpoint and receive the status of the job in the response. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/jobs/{id}/download |
Download the output of a job. For example, to retrieve the URL of the YAML registration file for a cluster when removing that cluster from Tanzu Service Mesh, you can pass the ID of the job created for the removal to this endpoint. |
DELETE |
https://{server_name}/tsm/v1alpha2/projects/default/jobs/{id} |
Delete a job. |
GraphQL
You can use the following endpoint to make GraphQL queries to the Tanzu Service Mesh GraphQL API. GraphQL is a query language for APIs.
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha1/graphql |
Make a GraphQL query to the Tanzu Service Mesh GraphQL API. |
Service Level Objectives
A service level objective (SLO) describes the high-level objective for acceptable operation and health of a service or application over a length of time (for example, a week or a month).
HTTP Method |
Endpoint |
Description |
---|---|---|
POST |
https://{server_name}/tsm/v1alpha2/projects/default/service-level-objective |
Create a service level objective by specifying the metric against which to measure the performance of the service (for example, 99th percentile latency) and by defining one or multiple service level indicators (SLIs) within the SLO. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/service-level-objectives |
Retrieve a list of existing SLOs, including the configuration of each SLO. |
GET |
https://{server_name}/tsm/v1alpha2/projects/default/service-level-objective/{id} |
Retrieve the configuration of a specified SLO. Replace id with the identifier of the SLO. |
PUT |
https://{server_name}/tsm/v1alpha2/projects/default/service-level-objective/{id} |
Edit the configuration of a specified SLO, including its SLIs. Replace id with the identifier of the SLO that you want to edit. |
DELETE |
https://{server_name}/tsm/v1alpha2/projects/default/service-level-objective/{id} |
Delete an SLO. Replace Replace id with the identifier of the SLO that you want to delete. |