Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 1.93 KB

rest-api.adoc

File metadata and controls

41 lines (28 loc) · 1.93 KB
sidebar permalink keywords summary
sidebar
trident-reference/rest-api.html
rest api, get, post, json, object, backends
You can use the REST endpoint directly if you prefer to interact with Astra Trident's REST API.

Astra Trident REST API

While tridentctl commands and options are the easiest way to interact with the Astra Trident REST API, you can use the REST endpoint directly if you prefer.

When to use the REST API

REST API is useful for advanced installations that use Astra Trident as a standalone binary in non-Kubernetes deployments.

For better security, the Astra Trident REST API is restricted to localhost by default when running inside a pod. To change this behavior, you need to set Astra Trident’s -address argument in its pod configuration.

Using REST API

The API works as follows:

GET

  • GET <trident-address>/trident/v1/<object-type>: Lists all objects of that type.

  • GET <trident-address>/trident/v1/<object-type>/<object-name>: Gets the details of the named object.

POST

POST <trident-address>/trident/v1/<object-type>: Creates an object of the specified type.

  • Requires a JSON configuration for the object to be created. For the specification of each object type, see tridentctl commands and options.

  • If the object already exists, behavior varies: backends update the existing object, while all other object types will fail the operation.

DELETE

DELETE <trident-address>/trident/v1/<object-type>/<object-name>: Deletes the named resource.

Note
Volumes associated with backends or storage classes will continue to exist; these must be deleted separately. For more information, see tridentctl commands and options.

For examples of how these APIs are called, pass the debug (-d) flag. For more information, see tridentctl commands and options.