All URIs are relative to /v1
Method | HTTP request | Description |
---|---|---|
GetEnvironmentById | Get /environments/{environmentId} | Returns an environment by ID. |
GetEnvironments | Get /environments | List all environments. |
Environment GetEnvironmentById(ctx, environmentId).Execute()
Returns an environment by ID.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
environmentId := "environmentId_example" // string | The ID of the environment.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentsApi.GetEnvironmentById(context.Background(), environmentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentsApi.GetEnvironmentById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEnvironmentById`: Environment
fmt.Fprintf(os.Stdout, "Response from `EnvironmentsApi.GetEnvironmentById`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | The ID of the environment. |
Other parameters are passed through a pointer to a apiGetEnvironmentByIdRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListEnvironmentsResponse GetEnvironments(ctx).Execute()
List all environments.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EnvironmentsApi.GetEnvironments(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentsApi.GetEnvironments``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetEnvironments`: ListEnvironmentsResponse
fmt.Fprintf(os.Stdout, "Response from `EnvironmentsApi.GetEnvironments`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetEnvironmentsRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]