All URIs are relative to /api
Method | HTTP request | Description |
---|---|---|
CheckOrgVisibility | Get /orgs/{slugOrId}/check-visibility | |
DelApiKey | Delete /orgs/{slugOrId}/api-keys/{name} | Delete an API key by name |
DeleteOrgMember | Delete /orgs/{slugOrId}/members/{usernameOrId} | |
GetApiKey | Get /orgs/{slugOrId}/api-keys/{name} | Get an API key by name |
GetApiKeys | Get /orgs/{slugOrId}/api-keys | Get an organization's API keys |
GetOrg | Get /orgs/{slugOrId} | |
GetOrgBilledUsage | Get /orgs/{orgSlugOrId}/billed-usage | Retrieve an org's billed usage for a specific month |
GetOrgBilledUsageHistory | Get /orgs/{orgSlugOrId}/billed-usage-history | Retrieve an org's billed usage items for the last 12 months |
GetOrgInstances | Get /orgs/{orgSlug}/instances | Get the list of instances belonging to the org |
GetOrgMember | Get /orgs/{slugOrId}/members/{usernameOrId} | |
GetOrgMembers | Get /orgs/{slugOrId}/members | |
PostApiKeys | Post /orgs/{slugOrId}/api-keys | Create an API key. |
PostOrgMember | Post /orgs/{slugOrId}/members/{usernameOrId} | |
PostOrgMembers | Post /orgs/{slugOrId}/members |
CheckOrgVisibility(ctx, slugOrId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OrgsAPI.CheckOrgVisibility(context.Background(), slugOrId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.CheckOrgVisibility``: %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. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiCheckOrgVisibilityRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DelApiKey(ctx, name, slugOrId).XRequestId(xRequestId).Unlock(unlock).Execute()
Delete an API key by name
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
name := "name_example" // string |
slugOrId := "slugOrId_example" // string |
xRequestId := "xRequestId_example" // string | (default to "openapi-x-request-id")
unlock := true // bool | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OrgsAPI.DelApiKey(context.Background(), name, slugOrId).XRequestId(xRequestId).Unlock(unlock).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.DelApiKey``: %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. | |
name | string | ||
slugOrId | string |
Other parameters are passed through a pointer to a apiDelApiKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | | [default to "openapi-x-request-id"] unlock | bool | |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteOrgMember(ctx, slugOrId, usernameOrId).XRequestId(xRequestId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
usernameOrId := "usernameOrId_example" // string |
xRequestId := "xRequestId_example" // string | (default to "openapi-x-request-id")
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.OrgsAPI.DeleteOrgMember(context.Background(), slugOrId, usernameOrId).XRequestId(xRequestId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.DeleteOrgMember``: %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. | |
slugOrId | string | ||
usernameOrId | string |
Other parameters are passed through a pointer to a apiDeleteOrgMemberRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | | [default to "openapi-x-request-id"]
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedApiApiKey GetApiKey(ctx, name, slugOrId).Execute()
Get an API key by name
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
name := "name_example" // string |
slugOrId := "slugOrId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetApiKey(context.Background(), name, slugOrId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetApiKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetApiKey`: FormattedApiApiKey
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetApiKey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
name | string | ||
slugOrId | string |
Other parameters are passed through a pointer to a apiGetApiKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedApiApiKeyListResponse GetApiKeys(ctx, slugOrId).ExcludeProvisioned(excludeProvisioned).Execute()
Get an organization's API keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
excludeProvisioned := true // bool | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetApiKeys(context.Background(), slugOrId).ExcludeProvisioned(excludeProvisioned).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetApiKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetApiKeys`: FormattedApiApiKeyListResponse
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetApiKeys`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiGetApiKeysRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
excludeProvisioned | bool | |
FormattedApiApiKeyListResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedApiOrgPublic GetOrg(ctx, slugOrId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrg(context.Background(), slugOrId).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`: FormattedApiOrgPublic
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrg`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiGetOrgRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ModifiedGetOrgBilledUsageResponse GetOrgBilledUsage(ctx, orgSlugOrId).Month(month).Year(year).Format(format).Execute()
Retrieve an org's billed usage for a specific month
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
orgSlugOrId := "orgSlugOrId_example" // string |
month := int32(56) // int32 |
year := int32(56) // int32 |
format := "format_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrgBilledUsage(context.Background(), orgSlugOrId).Month(month).Year(year).Format(format).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetOrgBilledUsage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrgBilledUsage`: ModifiedGetOrgBilledUsageResponse
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrgBilledUsage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgSlugOrId | string |
Other parameters are passed through a pointer to a apiGetOrgBilledUsageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
month | int32 | | year | int32 | | format | string | |
ModifiedGetOrgBilledUsageResponse
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrgBilledUsageHistory GetOrgBilledUsageHistory(ctx, orgSlugOrId).Execute()
Retrieve an org's billed usage items for the last 12 months
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
orgSlugOrId := "orgSlugOrId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrgBilledUsageHistory(context.Background(), orgSlugOrId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetOrgBilledUsageHistory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrgBilledUsageHistory`: OrgBilledUsageHistory
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrgBilledUsageHistory`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgSlugOrId | string |
Other parameters are passed through a pointer to a apiGetOrgBilledUsageHistoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetInstances200Response GetOrgInstances(ctx, orgSlug).Cluster(cluster).Direction(direction).Id(id).IdIn(idIn).Name(name).NameIn(nameIn).OrderBy(orderBy).Plan(plan).PlanIn(planIn).PlanNot(planNot).Slug(slug).SlugIn(slugIn).Url(url).UrlIn(urlIn).Execute()
Get the list of instances belonging to the org
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
orgSlug := "orgSlug_example" // string |
cluster := "cluster_example" // string | (optional)
direction := "direction_example" // string | (optional)
id := "id_example" // string | (optional)
idIn := "idIn_example" // string | (optional)
name := "name_example" // string | (optional)
nameIn := "nameIn_example" // string | (optional)
orderBy := "orderBy_example" // string | (optional)
plan := "plan_example" // string | (optional)
planIn := "planIn_example" // string | (optional)
planNot := "planNot_example" // string | (optional)
slug := "slug_example" // string | (optional)
slugIn := "slugIn_example" // string | (optional)
url := "url_example" // string | (optional)
urlIn := "urlIn_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrgInstances(context.Background(), orgSlug).Cluster(cluster).Direction(direction).Id(id).IdIn(idIn).Name(name).NameIn(nameIn).OrderBy(orderBy).Plan(plan).PlanIn(planIn).PlanNot(planNot).Slug(slug).SlugIn(slugIn).Url(url).UrlIn(urlIn).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetOrgInstances``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrgInstances`: GetInstances200Response
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrgInstances`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orgSlug | string |
Other parameters are passed through a pointer to a apiGetOrgInstancesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
cluster | string | | direction | string | | id | string | | idIn | string | | name | string | | nameIn | string | | orderBy | string | | plan | string | | planIn | string | | planNot | string | | slug | string | | slugIn | string | | url | string | | urlIn | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedOrgMembership GetOrgMember(ctx, slugOrId, usernameOrId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
usernameOrId := "usernameOrId_example" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrgMember(context.Background(), slugOrId, usernameOrId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetOrgMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrgMember`: FormattedOrgMembership
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrgMember`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string | ||
usernameOrId | string |
Other parameters are passed through a pointer to a apiGetOrgMemberRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrgMemberListResponse GetOrgMembers(ctx, slugOrId).Billing(billing).Direction(direction).OrderBy(orderBy).Privacy(privacy).PrivacyIn(privacyIn).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
billing := "billing_example" // string | (optional)
direction := "direction_example" // string | (optional)
orderBy := "orderBy_example" // string | (optional)
privacy := "privacy_example" // string | (optional)
privacyIn := "privacyIn_example" // string | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.GetOrgMembers(context.Background(), slugOrId).Billing(billing).Direction(direction).OrderBy(orderBy).Privacy(privacy).PrivacyIn(privacyIn).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.GetOrgMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOrgMembers`: OrgMemberListResponse
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.GetOrgMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiGetOrgMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
billing | string | | direction | string | | orderBy | string | | privacy | string | | privacyIn | string | |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedApiApiKey PostApiKeys(ctx, slugOrId).XRequestId(xRequestId).PostApiKeysRequest(postApiKeysRequest).Execute()
Create an API key.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
xRequestId := "xRequestId_example" // string | (default to "openapi-x-request-id")
postApiKeysRequest := *openapiclient.NewPostApiKeysRequest("Name_example", "Role_example") // PostApiKeysRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.PostApiKeys(context.Background(), slugOrId).XRequestId(xRequestId).PostApiKeysRequest(postApiKeysRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.PostApiKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostApiKeys`: FormattedApiApiKey
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.PostApiKeys`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiPostApiKeysRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | | [default to "openapi-x-request-id"] postApiKeysRequest | PostApiKeysRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedOrgMembership PostOrgMember(ctx, slugOrId, usernameOrId).XRequestId(xRequestId).PostOrgMemberRequest(postOrgMemberRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
usernameOrId := "usernameOrId_example" // string |
xRequestId := "xRequestId_example" // string | (default to "openapi-x-request-id")
postOrgMemberRequest := *openapiclient.NewPostOrgMemberRequest() // PostOrgMemberRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.PostOrgMember(context.Background(), slugOrId, usernameOrId).XRequestId(xRequestId).PostOrgMemberRequest(postOrgMemberRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.PostOrgMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostOrgMember`: FormattedOrgMembership
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.PostOrgMember`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string | ||
usernameOrId | string |
Other parameters are passed through a pointer to a apiPostOrgMemberRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | | [default to "openapi-x-request-id"] postOrgMemberRequest | PostOrgMemberRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FormattedOrgMembership PostOrgMembers(ctx, slugOrId).XRequestId(xRequestId).PostOrgMembersRequest(postOrgMembersRequest).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/grafana/grafana-com-public-clients/go/gcom"
)
func main() {
slugOrId := "slugOrId_example" // string |
xRequestId := "xRequestId_example" // string | (default to "openapi-x-request-id")
postOrgMembersRequest := *openapiclient.NewPostOrgMembersRequest("Username_example") // PostOrgMembersRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OrgsAPI.PostOrgMembers(context.Background(), slugOrId).XRequestId(xRequestId).PostOrgMembersRequest(postOrgMembersRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgsAPI.PostOrgMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostOrgMembers`: FormattedOrgMembership
fmt.Fprintf(os.Stdout, "Response from `OrgsAPI.PostOrgMembers`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
slugOrId | string |
Other parameters are passed through a pointer to a apiPostOrgMembersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
xRequestId | string | | [default to "openapi-x-request-id"] postOrgMembersRequest | PostOrgMembersRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]