10 KiB
\ServersAPI
All URIs are relative to http://localhost:8080/api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateServer | Post /servers | Create server (org scoped) |
| DeleteServer | Delete /servers/{id} | Delete server (org scoped) |
| GetServer | Get /servers/{id} | Get server by ID (org scoped) |
| ListServers | Get /servers | List servers (org scoped) |
| UpdateServer | Patch /servers/{id} | Update server (org scoped) |
CreateServer
DtoServerResponse CreateServer(ctx).Body(body).XOrgID(xOrgID).Execute()
Create server (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk"
)
func main() {
body := *openapiclient.NewDtoCreateServerRequest() // DtoCreateServerRequest | Server payload
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServersAPI.CreateServer(context.Background()).Body(body).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.CreateServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateServer`: DtoServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.CreateServer`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateServerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | DtoCreateServerRequest | Server payload | |
| xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteServer
string DeleteServer(ctx, id).XOrgID(xOrgID).Execute()
Delete server (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk"
)
func main() {
id := "id_example" // string | Server ID (UUID)
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServersAPI.DeleteServer(context.Background(), id).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.DeleteServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteServer`: string
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.DeleteServer`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Server ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteServerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xOrgID | string | Organization UUID |
Return type
string
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetServer
DtoServerResponse GetServer(ctx, id).XOrgID(xOrgID).Execute()
Get server by ID (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk"
)
func main() {
id := "id_example" // string | Server ID (UUID)
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServersAPI.GetServer(context.Background(), id).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.GetServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetServer`: DtoServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.GetServer`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Server ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiGetServerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListServers
[]DtoServerResponse ListServers(ctx).XOrgID(xOrgID).Status(status).Role(role).Execute()
List servers (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk"
)
func main() {
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
status := "status_example" // string | Filter by status (pending|provisioning|ready|failed) (optional)
role := "role_example" // string | Filter by role (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServersAPI.ListServers(context.Background()).XOrgID(xOrgID).Status(status).Role(role).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.ListServers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListServers`: []DtoServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.ListServers`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListServersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xOrgID | string | Organization UUID | |
| status | string | Filter by status (pending | provisioning |
| role | string | Filter by role |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateServer
DtoServerResponse UpdateServer(ctx, id).Body(body).XOrgID(xOrgID).Execute()
Update server (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk"
)
func main() {
id := "id_example" // string | Server ID (UUID)
body := *openapiclient.NewDtoUpdateServerRequest() // DtoUpdateServerRequest | Fields to update
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ServersAPI.UpdateServer(context.Background(), id).Body(body).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ServersAPI.UpdateServer``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateServer`: DtoServerResponse
fmt.Fprintf(os.Stdout, "Response from `ServersAPI.UpdateServer`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Server ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiUpdateServerRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
body | DtoUpdateServerRequest | Fields to update | xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]