All URIs are relative to http://localhost/api/v1
Method | HTTP request | Description |
---|---|---|
DeleteVariable | Delete /variables/{variable_key} | Delete a variable |
GetVariable | Get /variables/{variable_key} | Get a variable |
GetVariables | Get /variables | List variables |
PatchVariable | Patch /variables/{variable_key} | Update a variable |
PostVariables | Post /variables | Create a variable |
DeleteVariable(ctx, variableKey).Execute()
Delete a variable
package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { variableKey := "variableKey_example" // string | The variable Key. configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) resp, r, err := api_client.VariableApi.DeleteVariable(context.Background(), variableKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VariableApi.DeleteVariable``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } }
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
variableKey | string | The variable Key. |
Other parameters are passed through a pointer to a apiDeleteVariableRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Variable GetVariable(ctx, variableKey).Execute()
Get a variable
package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { variableKey := "variableKey_example" // string | The variable Key. configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) resp, r, err := api_client.VariableApi.GetVariable(context.Background(), variableKey).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VariableApi.GetVariable``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetVariable`: Variable fmt.Fprintf(os.Stdout, "Response from `VariableApi.GetVariable`: %v\n", resp) }
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
variableKey | string | The variable Key. |
Other parameters are passed through a pointer to a apiGetVariableRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
[Back to top] [Back to API list] [Back to Model list] [Back to README]
VariableCollection GetVariables(ctx).Limit(limit).Offset(offset).OrderBy(orderBy).Execute()
List variables
package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { limit := int32(56) // int32 | The numbers of items to return. (optional) (default to 100) offset := int32(56) // int32 | The number of items to skip before starting to collect the result set. (optional) orderBy := "orderBy_example" // string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. *New in version 2.1.0* (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) resp, r, err := api_client.VariableApi.GetVariables(context.Background()).Limit(limit).Offset(offset).OrderBy(orderBy).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VariableApi.GetVariables``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `GetVariables`: VariableCollection fmt.Fprintf(os.Stdout, "Response from `VariableApi.GetVariables`: %v\n", resp) }
Other parameters are passed through a pointer to a apiGetVariablesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | The numbers of items to return. | [default to 100] |
offset | int32 | The number of items to skip before starting to collect the result set. | |
orderBy | string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. New in version 2.1.0 |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Variable PatchVariable(ctx, variableKey).Variable(variable).UpdateMask(updateMask).Execute()
Update a variable
package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { variableKey := "variableKey_example" // string | The variable Key. variable := *openapiclient.NewVariable() // Variable | updateMask := []string{"Inner_example"} // []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. (optional) configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) resp, r, err := api_client.VariableApi.PatchVariable(context.Background(), variableKey).Variable(variable).UpdateMask(updateMask).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VariableApi.PatchVariable``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PatchVariable`: Variable fmt.Fprintf(os.Stdout, "Response from `VariableApi.PatchVariable`: %v\n", resp) }
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
variableKey | string | The variable Key. |
Other parameters are passed through a pointer to a apiPatchVariableRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
variable | Variable | | updateMask | []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Variable PostVariables(ctx).Variable(variable).Execute()
Create a variable
package main import ( "context" "fmt" "os" openapiclient "./openapi" ) func main() { variable := *openapiclient.NewVariable() // Variable | configuration := openapiclient.NewConfiguration() api_client := openapiclient.NewAPIClient(configuration) resp, r, err := api_client.VariableApi.PostVariables(context.Background()).Variable(variable).Execute() if err != nil { fmt.Fprintf(os.Stderr, "Error when calling `VariableApi.PostVariables``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } // response from `PostVariables`: Variable fmt.Fprintf(os.Stdout, "Response from `VariableApi.PostVariables`: %v\n", resp) }
Other parameters are passed through a pointer to a apiPostVariablesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
variable | Variable |
[Back to top] [Back to API list] [Back to Model list] [Back to README]