mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 04:40:05 +01:00
5.5 KiB
5.5 KiB
MeAPIKeysApi
All URIs are relative to https://autoglue.glueopshosted.com/api/v1
| Method | HTTP request | Description |
|---|---|---|
| createUserAPIKey | POST /me/api-keys | Create a new user API key |
| deleteUserAPIKey | DELETE /me/api-keys/{id} | Delete a user API key |
| listUserAPIKeys | GET /me/api-keys | List my API keys |
createUserAPIKey
HandlersUserAPIKeyOut createUserAPIKey(handlersCreateUserKeyRequest)
Create a new user API key
Returns the plaintext key once. Store it securely on the client side.
Example
import {
Configuration,
MeAPIKeysApi,
} from '@glueops/autoglue-sdk-go';
import type { CreateUserAPIKeyRequest } from '@glueops/autoglue-sdk-go';
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
const body = {
// HandlersCreateUserKeyRequest | Key options
handlersCreateUserKeyRequest: ...,
} satisfies CreateUserAPIKeyRequest;
try {
const data = await api.createUserAPIKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| handlersCreateUserKeyRequest | HandlersCreateUserKeyRequest | Key options |
Return type
Authorization
HTTP request headers
- Content-Type:
application/json - Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 201 | Created | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteUserAPIKey
deleteUserAPIKey(id)
Delete a user API key
Example
import { Configuration, MeAPIKeysApi } from "@glueops/autoglue-sdk-go";
import type { DeleteUserAPIKeyRequest } from "@glueops/autoglue-sdk-go";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
const config = new Configuration({
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
const body = {
// string | Key ID (UUID)
id: id_example,
} satisfies DeleteUserAPIKeyRequest;
try {
const data = await api.deleteUserAPIKey(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | string |
Key ID (UUID) | [Defaults to undefined] |
Return type
void (Empty response body)
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: Not defined
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 204 | No Content | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
listUserAPIKeys
Array<HandlersUserAPIKeyOut> listUserAPIKeys()
List my API keys
Example
import { Configuration, MeAPIKeysApi } from "@glueops/autoglue-sdk-go";
import type { ListUserAPIKeysRequest } from "@glueops/autoglue-sdk-go";
async function example() {
console.log("🚀 Testing @glueops/autoglue-sdk-go SDK...");
const config = new Configuration({
// To configure API key authorization: ApiKeyAuth
apiKey: "YOUR API KEY",
// To configure API key authorization: BearerAuth
apiKey: "YOUR API KEY",
});
const api = new MeAPIKeysApi(config);
try {
const data = await api.listUserAPIKeys();
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept:
application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]