All URIs are relative to http://localhost:3000
Method | HTTP request | Description |
---|---|---|
GenerateApiKey | Post /apikey/{apiKeyName} | Generate an API key |
ListClientApiKeys | Get /apikey | List API keys |
RevokeApiKey | Delete /apikey/{apiKeyName} | Revoke API key |
string GenerateApiKey(ctx, apiKeyName).Execute()
Generate an API key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
apiKeyName := "apiKeyName_example" // string | API key name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiKeyAPI.GenerateApiKey(context.Background(), apiKeyName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiKeyAPI.GenerateApiKey``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GenerateApiKey`: string
fmt.Fprintf(os.Stdout, "Response from `ApiKeyAPI.GenerateApiKey`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
apiKeyName | string | API key name |
Other parameters are passed through a pointer to a apiGenerateApiKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
string
- Content-Type: Not defined
- Accept: text/plain
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]ApiKey ListClientApiKeys(ctx).Execute()
List API keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ApiKeyAPI.ListClientApiKeys(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiKeyAPI.ListClientApiKeys``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListClientApiKeys`: []ApiKey
fmt.Fprintf(os.Stdout, "Response from `ApiKeyAPI.ListClientApiKeys`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListClientApiKeysRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RevokeApiKey(ctx, apiKeyName).Execute()
Revoke API key
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID/serverapiclient"
)
func main() {
apiKeyName := "apiKeyName_example" // string | API key name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.ApiKeyAPI.RevokeApiKey(context.Background(), apiKeyName).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ApiKeyAPI.RevokeApiKey``: %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. | |
apiKeyName | string | API key name |
Other parameters are passed through a pointer to a apiRevokeApiKeyRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]