Files
autoglue/sdk/go/docs/OrgsAPI.md
2025-11-02 13:19:30 +00:00

19 KiB

\OrgsAPI

All URIs are relative to http://localhost:8080/api/v1

Method HTTP request Description
AddOrUpdateMember Post /orgs/{id}/members Add or update a member (owner/admin)
CreateOrg Post /orgs Create organization
CreateOrgKey Post /orgs/{id}/api-keys Create org key/secret pair (owner/admin)
DeleteOrg Delete /orgs/{id} Delete organization (owner)
DeleteOrgKey Delete /orgs/{id}/api-keys/{key_id} Delete org key (owner/admin)
GetOrg Get /orgs/{id} Get organization
ListMembers Get /orgs/{id}/members List members in org
ListMyOrgs Get /orgs List organizations I belong to
ListOrgKeys Get /orgs/{id}/api-keys List org-scoped API keys (no secrets)
RemoveMember Delete /orgs/{id}/members/{user_id} Remove a member (owner/admin)
UpdateOrg Patch /orgs/{id} Update organization (owner/admin)

AddOrUpdateMember

HandlersMemberOut AddOrUpdateMember(ctx, id).Body(body).Execute()

Add or update a member (owner/admin)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)
	body := *openapiclient.NewHandlersMemberUpsertReq() // HandlersMemberUpsertReq | User & role

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

body | HandlersMemberUpsertReq | User & role |

Return type

HandlersMemberOut

Authorization

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]

CreateOrg

ModelsOrganization CreateOrg(ctx).Body(body).Execute()

Create organization

Example

package main

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

func main() {
	body := *openapiclient.NewHandlersOrgCreateReq() // HandlersOrgCreateReq | Org payload

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

Path Parameters

Other Parameters

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

Name Type Description Notes
body HandlersOrgCreateReq Org payload

Return type

ModelsOrganization

Authorization

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]

CreateOrgKey

HandlersOrgKeyCreateResp CreateOrgKey(ctx, id).Body(body).Execute()

Create org key/secret pair (owner/admin)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)
	body := *openapiclient.NewHandlersOrgKeyCreateReq() // HandlersOrgKeyCreateReq | Key name + optional expiry

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

body | HandlersOrgKeyCreateReq | Key name + optional expiry |

Return type

HandlersOrgKeyCreateResp

Authorization

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]

DeleteOrg

DeleteOrg(ctx, id).Execute()

Delete organization (owner)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OrgsAPI.DeleteOrg(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.DeleteOrg``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

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]

DeleteOrgKey

DeleteOrgKey(ctx, id, keyId).Execute()

Delete org key (owner/admin)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)
	keyId := "keyId_example" // string | Key ID (UUID)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OrgsAPI.DeleteOrgKey(context.Background(), id, keyId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.DeleteOrgKey``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

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]

GetOrg

ModelsOrganization GetOrg(ctx, id).Execute()

Get organization

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

ModelsOrganization

Authorization

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]

ListMembers

[]HandlersMemberOut ListMembers(ctx, id).Execute()

List members in org

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]HandlersMemberOut

Authorization

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]

ListMyOrgs

[]ModelsOrganization ListMyOrgs(ctx).Execute()

List organizations I belong to

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]ModelsOrganization

Authorization

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]

ListOrgKeys

[]ModelsAPIKey ListOrgKeys(ctx, id).Execute()

List org-scoped API keys (no secrets)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

[]ModelsAPIKey

Authorization

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]

RemoveMember

RemoveMember(ctx, id, userId).Execute()

Remove a member (owner/admin)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)
	userId := "userId_example" // string | User ID (UUID)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.OrgsAPI.RemoveMember(context.Background(), id, userId).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.RemoveMember``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

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

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

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]

UpdateOrg

ModelsOrganization UpdateOrg(ctx, id).Body(body).Execute()

Update organization (owner/admin)

Example

package main

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

func main() {
	id := "id_example" // string | Org ID (UUID)
	body := *openapiclient.NewHandlersOrgUpdateReq() // HandlersOrgUpdateReq | Update payload

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

Path Parameters

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

Other Parameters

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

Name Type Description Notes

body | HandlersOrgUpdateReq | Update payload |

Return type

ModelsOrganization

Authorization

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]