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.

Clusters

A cluster is a collection of physical or virtual machines, called nodes, for running containerized applications. You can use the following endpoints and methods to interact with clusters that are onboarded to Tanzu Service Mesh.

HTTP Method

Endpoint

Description

POST

v1alpha1/clusters/{clusterID}/apps

Install an application on a cluster.

GET

v1alpha1/clusters

Retrieve a list of the clusters onboarded to Tanzu Service Mesh.

GET

v1alpha1/clusters/onboard-url

Retrieve an onboard URL.

GET

v1alpha1/clusters/{clusterID}

Fetch details of a cluster, such as the version of Kubernetes on the cluster and its operational status.

GET

v1alpha1/clusters/{clusterID}/apps

Retrieve a list of the applications deployed on a cluster.

GET

v1alpha1/clusters/{clusterID}/logs/{type}

Schedule the fetching of logs of a specified type from a cluster. You can download the logs by sending a GET request to the v1alpha1/jobs/{id}/download endpoint.

PUT

v1alpha1/clusters/{clusterID}/apps/{appId}

Update an application on a cluster.

PUT

v1alpha1/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

v1alpha1/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 allspark create secret generic cluster-token --from-literal=token=$TOKEN

DELETE

v1alpha1/clusters/{clusterID}

Remove a cluster from Tanzu Service Mesh. This endpoint returns the ID of the job created for the removal of the cluster. To complete the removal of the cluster, perform the following steps.

To retrieve the status of the job created for the removal of the cluster, submit the following request.

GET /v1alpha1​/jobs​/{id}

Where {id} is the ID of the job returned by v1alpha1/clusters/{clusterID}.

When the job is completed (the state field in the response to GET /v1alpha1​/jobs​/{id}is Completed), submit the following request.

GET /v1alpha1​/jobs​/{id}​/download

This returns a URL in the url field.

Next, in a terminal window, run this Kubernetes command.

kubectl delete -f <url>

DELETE

v1alpha1/clusters/{clusterID}/apps/{appId}

Uninstall an application from a cluster.

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

v1alpha1/global-namespaces

Create a global namespace.

GET

v1alpha1/global-namespaces

Retrieve a list of the IDs of defined global namespaces.

GET

v1alpha1/global-namespaces/{id}

Retrieve the configuration of a global namespace.

GET

v1alpha1/global-namespaces/{id}/capabilities

Retrieve a list of capabilities enabled for a global namespace and their statuses.

GET

v1alpha1/global-namespaces/{id}/capabilities/{capability}

Retrieve the status of a specified capability enabled for a global namespace.

GET

v1alpha1/global-namespaces/{id}/members

Retrieve a list of the member services in a global namespace.

PUT

v1alpha1/global-namespaces/{id}

Update a global namespace.

DELETE

v1alpha1/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

v1alpha1/resource-groups/{type}

Create a resource group of a specified type (for example, a service group).

POST

v1alpha1/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.

GET

v1alpha1/resource-groups/{type}

Retrieve a list of the IDs of existing resource groups of a specified type (for example, service groups).

GET

v1alpha1/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:

  • from. A cursor for use in pagination. Enter the name of the starting resource group to return on the response. If you leave this parameter blank, the response will begin with the details for the first resource group in the result list.

  • limit. Define the the maximum number of resource groups to return per page. If you leave this parameter blank, the default limit of 100 will be applied.

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 next key in the pagination object at the end of the response contains the name of the first resource group from the next page. You can advance to the next page by providing the name in next as the value of the from parameter.

The total key in the pagination object at the end of the response contains the total number of matching resource groups in the result list.

GET

v1alpha1/resource-groups/{type}/id/{id}

Retrieve the configuration of a resource group.

GET

v1alpha1/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

v1alpha1/resource-groups/{type}/id/{id}

Create or update a resource group.

DELETE

v1alpha1/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

v1alpha1/jobs

Create a job.

GET

v1alpha1/jobs

Retrieve a list of jobs.

GET

v1alpha1/jobs/{id}

Retrieve details of a job.

GET

v1alpha1/jobs/{id}/download

Download the output of a job.

DELETE

v1alpha1/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

v1alpha1/graphql

Make a GraphQL query to the Tanzu Service Mesh GraphQL API.