All URIs are relative to https://api.aptible.com
Method | HTTP request | Description |
---|---|---|
CreateAccount | Post /accounts | create account |
DeleteAccount | Delete /accounts/{id} | delete account |
GetAccount | Get /accounts/{id} | show account |
ListAccounts | Get /accounts | list accounts |
ListAccountsForStack | Get /stacks/{stack_id}/accounts | list accounts |
PatchAccount | Patch /accounts/{id} | update account |
UpdateAccount | Put /accounts/{id} | update account |
Account CreateAccount(ctx).CreateAccountRequest(createAccountRequest).Execute()
create account
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
createAccountRequest := *openapiclient.NewCreateAccountRequest("Type_example", "Handle_example", "OrganizationId_example") // CreateAccountRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountsAPI.CreateAccount(context.Background()).CreateAccountRequest(createAccountRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.CreateAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAccount`: Account
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.CreateAccount`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createAccountRequest | CreateAccountRequest |
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAccount(ctx, id).Execute()
delete account
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AccountsAPI.DeleteAccount(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.DeleteAccount``: %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. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiDeleteAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Account GetAccount(ctx, id).Execute()
show account
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountsAPI.GetAccount(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.GetAccount``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAccount`: Account
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.GetAccount`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiGetAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAccountsForStack200Response ListAccounts(ctx).Page(page).Execute()
list accounts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountsAPI.ListAccounts(context.Background()).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.ListAccounts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAccounts`: ListAccountsForStack200Response
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.ListAccounts`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListAccountsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
page | int32 | current page of results for pagination |
ListAccountsForStack200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAccountsForStack200Response ListAccountsForStack(ctx, stackId).Page(page).Execute()
list accounts
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
stackId := int32(56) // int32 | stack_id
page := int32(56) // int32 | current page of results for pagination (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountsAPI.ListAccountsForStack(context.Background(), stackId).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.ListAccountsForStack``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAccountsForStack`: ListAccountsForStack200Response
fmt.Fprintf(os.Stdout, "Response from `AccountsAPI.ListAccountsForStack`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
stackId | int32 | stack_id |
Other parameters are passed through a pointer to a apiListAccountsForStackRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
page | int32 | current page of results for pagination |
ListAccountsForStack200Response
- Content-Type: Not defined
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PatchAccount(ctx, id).PatchAccountRequest(patchAccountRequest).Execute()
update account
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
patchAccountRequest := *openapiclient.NewPatchAccountRequest() // PatchAccountRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AccountsAPI.PatchAccount(context.Background(), id).PatchAccountRequest(patchAccountRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.PatchAccount``: %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. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiPatchAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchAccountRequest | PatchAccountRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateAccount(ctx, id).UpdateAccountRequest(updateAccountRequest).Execute()
update account
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/aptible/aptible-api-go/aptibleapi"
)
func main() {
id := int32(56) // int32 | id
updateAccountRequest := *openapiclient.NewUpdateAccountRequest() // UpdateAccountRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AccountsAPI.UpdateAccount(context.Background(), id).UpdateAccountRequest(updateAccountRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountsAPI.UpdateAccount``: %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. | |
id | int32 | id |
Other parameters are passed through a pointer to a apiUpdateAccountRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateAccountRequest | UpdateAccountRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/hal+json
[Back to top] [Back to API list] [Back to Model list] [Back to README]