Files
autoglue/sdk/go/docs/SshAPI.md
allanice001 334df457ce feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
2025-11-08 10:22:45 +00:00

9.7 KiB

\SshAPI

All URIs are relative to /api/v1

Method HTTP request Description
CreateSSHKey Post /ssh Create ssh keypair (org scoped)
DeleteSSHKey Delete /ssh/{id} Delete ssh keypair (org scoped)
DownloadSSHKey Get /ssh/{id}/download Download ssh key files by ID (org scoped)
GetSSHKey Get /ssh/{id} Get ssh key by ID (org scoped)
ListPublicSshKeys Get /ssh List ssh keys (org scoped)

CreateSSHKey

DtoSshResponse CreateSSHKey(ctx).Body(body).XOrgID(xOrgID).Execute()

Create ssh keypair (org scoped)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	body := *openapiclient.NewDtoCreateSSHRequest() // DtoCreateSSHRequest | Key generation options
	xOrgID := "xOrgID_example" // string | Organization UUID (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SshAPI.CreateSSHKey(context.Background()).Body(body).XOrgID(xOrgID).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SshAPI.CreateSSHKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateSSHKey`: DtoSshResponse
	fmt.Fprintf(os.Stdout, "Response from `SshAPI.CreateSSHKey`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateSSHKeyRequest struct via the builder pattern

Name Type Description Notes
body DtoCreateSSHRequest Key generation options
xOrgID string Organization UUID

Return type

DtoSshResponse

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]

DeleteSSHKey

string DeleteSSHKey(ctx, id).XOrgID(xOrgID).Execute()

Delete ssh keypair (org scoped)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	id := "id_example" // string | SSH Key ID (UUID)
	xOrgID := "xOrgID_example" // string | Organization UUID (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SshAPI.DeleteSSHKey(context.Background(), id).XOrgID(xOrgID).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SshAPI.DeleteSSHKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteSSHKey`: string
	fmt.Fprintf(os.Stdout, "Response from `SshAPI.DeleteSSHKey`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string SSH Key ID (UUID)

Other Parameters

Other parameters are passed through a pointer to a apiDeleteSSHKeyRequest 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]

DownloadSSHKey

string DownloadSSHKey(ctx, id).XOrgID(xOrgID).Part(part).Execute()

Download ssh key files by ID (org scoped)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	xOrgID := "xOrgID_example" // string | Organization UUID
	id := "id_example" // string | SSH Key ID (UUID)
	part := "part_example" // string | Which part to download

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SshAPI.DownloadSSHKey(context.Background(), id).XOrgID(xOrgID).Part(part).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SshAPI.DownloadSSHKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DownloadSSHKey`: string
	fmt.Fprintf(os.Stdout, "Response from `SshAPI.DownloadSSHKey`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string SSH Key ID (UUID)

Other Parameters

Other parameters are passed through a pointer to a apiDownloadSSHKeyRequest struct via the builder pattern

Name Type Description Notes
xOrgID string Organization UUID

part | string | Which part to download |

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]

GetSSHKey

DtoSshRevealResponse GetSSHKey(ctx, id).XOrgID(xOrgID).Reveal(reveal).Execute()

Get ssh key by ID (org scoped)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	id := "id_example" // string | SSH Key ID (UUID)
	xOrgID := "xOrgID_example" // string | Organization UUID (optional)
	reveal := true // bool | Reveal private key PEM (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SshAPI.GetSSHKey(context.Background(), id).XOrgID(xOrgID).Reveal(reveal).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SshAPI.GetSSHKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetSSHKey`: DtoSshRevealResponse
	fmt.Fprintf(os.Stdout, "Response from `SshAPI.GetSSHKey`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string SSH Key ID (UUID)

Other Parameters

Other parameters are passed through a pointer to a apiGetSSHKeyRequest struct via the builder pattern

Name Type Description Notes

xOrgID | string | Organization UUID | reveal | bool | Reveal private key PEM |

Return type

DtoSshRevealResponse

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]

ListPublicSshKeys

[]DtoSshResponse ListPublicSshKeys(ctx).XOrgID(xOrgID).Execute()

List ssh keys (org scoped)

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/glueops/autoglue-sdk-go"
)

func main() {
	xOrgID := "xOrgID_example" // string | Organization UUID (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.SshAPI.ListPublicSshKeys(context.Background()).XOrgID(xOrgID).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SshAPI.ListPublicSshKeys``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `ListPublicSshKeys`: []DtoSshResponse
	fmt.Fprintf(os.Stdout, "Response from `SshAPI.ListPublicSshKeys`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListPublicSshKeysRequest struct via the builder pattern

Name Type Description Notes
xOrgID string Organization UUID

Return type

[]DtoSshResponse

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]