@unkey/api 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -6
- package/RUNTIMES.md +6 -6
- package/bin/mcp-server.js +47 -52
- package/bin/mcp-server.js.map +44 -44
- package/dist/commonjs/funcs/apisCreateApi.js +1 -1
- package/dist/commonjs/funcs/apisCreateApi.js.map +1 -1
- package/dist/commonjs/funcs/apisDeleteApi.js +1 -1
- package/dist/commonjs/funcs/apisDeleteApi.js.map +1 -1
- package/dist/commonjs/funcs/apisGetApi.js +1 -1
- package/dist/commonjs/funcs/apisGetApi.js.map +1 -1
- package/dist/commonjs/funcs/apisListKeys.js +1 -1
- package/dist/commonjs/funcs/apisListKeys.js.map +1 -1
- package/dist/commonjs/funcs/identitiesCreateIdentity.js +1 -1
- package/dist/commonjs/funcs/identitiesCreateIdentity.js.map +1 -1
- package/dist/commonjs/funcs/identitiesDeleteIdentity.js +1 -1
- package/dist/commonjs/funcs/identitiesDeleteIdentity.js.map +1 -1
- package/dist/commonjs/funcs/identitiesGetIdentity.js +1 -1
- package/dist/commonjs/funcs/identitiesGetIdentity.js.map +1 -1
- package/dist/commonjs/funcs/identitiesListIdentities.js +1 -1
- package/dist/commonjs/funcs/identitiesListIdentities.js.map +1 -1
- package/dist/commonjs/funcs/identitiesUpdateIdentity.js +1 -1
- package/dist/commonjs/funcs/identitiesUpdateIdentity.js.map +1 -1
- package/dist/commonjs/funcs/keysAddPermissions.js +1 -1
- package/dist/commonjs/funcs/keysAddPermissions.js.map +1 -1
- package/dist/commonjs/funcs/keysAddRoles.js +1 -1
- package/dist/commonjs/funcs/keysAddRoles.js.map +1 -1
- package/dist/commonjs/funcs/keysCreateKey.js +1 -1
- package/dist/commonjs/funcs/keysCreateKey.js.map +1 -1
- package/dist/commonjs/funcs/keysDeleteKey.js +1 -1
- package/dist/commonjs/funcs/keysDeleteKey.js.map +1 -1
- package/dist/commonjs/funcs/keysGetKey.js +1 -1
- package/dist/commonjs/funcs/keysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/keysRemovePermissions.js +1 -1
- package/dist/commonjs/funcs/keysRemovePermissions.js.map +1 -1
- package/dist/commonjs/funcs/keysRemoveRoles.js +1 -1
- package/dist/commonjs/funcs/keysRemoveRoles.js.map +1 -1
- package/dist/commonjs/funcs/keysRerollKey.js +1 -1
- package/dist/commonjs/funcs/keysRerollKey.js.map +1 -1
- package/dist/commonjs/funcs/keysSetPermissions.js +1 -1
- package/dist/commonjs/funcs/keysSetPermissions.js.map +1 -1
- package/dist/commonjs/funcs/keysSetRoles.js +1 -1
- package/dist/commonjs/funcs/keysSetRoles.js.map +1 -1
- package/dist/commonjs/funcs/keysUpdateCredits.js +1 -1
- package/dist/commonjs/funcs/keysUpdateCredits.js.map +1 -1
- package/dist/commonjs/funcs/keysUpdateKey.js +1 -1
- package/dist/commonjs/funcs/keysUpdateKey.js.map +1 -1
- package/dist/commonjs/funcs/keysVerifyKey.js +1 -1
- package/dist/commonjs/funcs/keysVerifyKey.js.map +1 -1
- package/dist/commonjs/funcs/keysWhoami.js +1 -1
- package/dist/commonjs/funcs/keysWhoami.js.map +1 -1
- package/dist/commonjs/funcs/permissionsCreatePermission.js +1 -1
- package/dist/commonjs/funcs/permissionsCreatePermission.js.map +1 -1
- package/dist/commonjs/funcs/permissionsCreateRole.js +1 -1
- package/dist/commonjs/funcs/permissionsCreateRole.js.map +1 -1
- package/dist/commonjs/funcs/permissionsDeletePermission.js +1 -1
- package/dist/commonjs/funcs/permissionsDeletePermission.js.map +1 -1
- package/dist/commonjs/funcs/permissionsDeleteRole.js +1 -1
- package/dist/commonjs/funcs/permissionsDeleteRole.js.map +1 -1
- package/dist/commonjs/funcs/permissionsGetPermission.js +1 -1
- package/dist/commonjs/funcs/permissionsGetPermission.js.map +1 -1
- package/dist/commonjs/funcs/permissionsGetRole.js +1 -1
- package/dist/commonjs/funcs/permissionsGetRole.js.map +1 -1
- package/dist/commonjs/funcs/permissionsListPermissions.js +1 -1
- package/dist/commonjs/funcs/permissionsListPermissions.js.map +1 -1
- package/dist/commonjs/funcs/permissionsListRoles.js +1 -1
- package/dist/commonjs/funcs/permissionsListRoles.js.map +1 -1
- package/dist/commonjs/funcs/ratelimitDeleteOverride.js +1 -1
- package/dist/commonjs/funcs/ratelimitDeleteOverride.js.map +1 -1
- package/dist/commonjs/funcs/ratelimitGetOverride.js +1 -1
- package/dist/commonjs/funcs/ratelimitGetOverride.js.map +1 -1
- package/dist/commonjs/funcs/ratelimitLimit.js +1 -1
- package/dist/commonjs/funcs/ratelimitLimit.js.map +1 -1
- package/dist/commonjs/funcs/ratelimitListOverrides.js +1 -1
- package/dist/commonjs/funcs/ratelimitListOverrides.js.map +1 -1
- package/dist/commonjs/funcs/ratelimitSetOverride.js +1 -1
- package/dist/commonjs/funcs/ratelimitSetOverride.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/url.js +1 -1
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/models/components/identity.d.ts +6 -26
- package/dist/commonjs/models/components/identity.d.ts.map +1 -1
- package/dist/commonjs/models/components/identity.js +3 -26
- package/dist/commonjs/models/components/identity.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/esm/funcs/apisCreateApi.js +1 -1
- package/dist/esm/funcs/apisCreateApi.js.map +1 -1
- package/dist/esm/funcs/apisDeleteApi.js +1 -1
- package/dist/esm/funcs/apisDeleteApi.js.map +1 -1
- package/dist/esm/funcs/apisGetApi.js +1 -1
- package/dist/esm/funcs/apisGetApi.js.map +1 -1
- package/dist/esm/funcs/apisListKeys.js +1 -1
- package/dist/esm/funcs/apisListKeys.js.map +1 -1
- package/dist/esm/funcs/identitiesCreateIdentity.js +1 -1
- package/dist/esm/funcs/identitiesCreateIdentity.js.map +1 -1
- package/dist/esm/funcs/identitiesDeleteIdentity.js +1 -1
- package/dist/esm/funcs/identitiesDeleteIdentity.js.map +1 -1
- package/dist/esm/funcs/identitiesGetIdentity.js +1 -1
- package/dist/esm/funcs/identitiesGetIdentity.js.map +1 -1
- package/dist/esm/funcs/identitiesListIdentities.js +1 -1
- package/dist/esm/funcs/identitiesListIdentities.js.map +1 -1
- package/dist/esm/funcs/identitiesUpdateIdentity.js +1 -1
- package/dist/esm/funcs/identitiesUpdateIdentity.js.map +1 -1
- package/dist/esm/funcs/keysAddPermissions.js +1 -1
- package/dist/esm/funcs/keysAddPermissions.js.map +1 -1
- package/dist/esm/funcs/keysAddRoles.js +1 -1
- package/dist/esm/funcs/keysAddRoles.js.map +1 -1
- package/dist/esm/funcs/keysCreateKey.js +1 -1
- package/dist/esm/funcs/keysCreateKey.js.map +1 -1
- package/dist/esm/funcs/keysDeleteKey.js +1 -1
- package/dist/esm/funcs/keysDeleteKey.js.map +1 -1
- package/dist/esm/funcs/keysGetKey.js +1 -1
- package/dist/esm/funcs/keysGetKey.js.map +1 -1
- package/dist/esm/funcs/keysRemovePermissions.js +1 -1
- package/dist/esm/funcs/keysRemovePermissions.js.map +1 -1
- package/dist/esm/funcs/keysRemoveRoles.js +1 -1
- package/dist/esm/funcs/keysRemoveRoles.js.map +1 -1
- package/dist/esm/funcs/keysRerollKey.js +1 -1
- package/dist/esm/funcs/keysRerollKey.js.map +1 -1
- package/dist/esm/funcs/keysSetPermissions.js +1 -1
- package/dist/esm/funcs/keysSetPermissions.js.map +1 -1
- package/dist/esm/funcs/keysSetRoles.js +1 -1
- package/dist/esm/funcs/keysSetRoles.js.map +1 -1
- package/dist/esm/funcs/keysUpdateCredits.js +1 -1
- package/dist/esm/funcs/keysUpdateCredits.js.map +1 -1
- package/dist/esm/funcs/keysUpdateKey.js +1 -1
- package/dist/esm/funcs/keysUpdateKey.js.map +1 -1
- package/dist/esm/funcs/keysVerifyKey.js +1 -1
- package/dist/esm/funcs/keysVerifyKey.js.map +1 -1
- package/dist/esm/funcs/keysWhoami.js +1 -1
- package/dist/esm/funcs/keysWhoami.js.map +1 -1
- package/dist/esm/funcs/permissionsCreatePermission.js +1 -1
- package/dist/esm/funcs/permissionsCreatePermission.js.map +1 -1
- package/dist/esm/funcs/permissionsCreateRole.js +1 -1
- package/dist/esm/funcs/permissionsCreateRole.js.map +1 -1
- package/dist/esm/funcs/permissionsDeletePermission.js +1 -1
- package/dist/esm/funcs/permissionsDeletePermission.js.map +1 -1
- package/dist/esm/funcs/permissionsDeleteRole.js +1 -1
- package/dist/esm/funcs/permissionsDeleteRole.js.map +1 -1
- package/dist/esm/funcs/permissionsGetPermission.js +1 -1
- package/dist/esm/funcs/permissionsGetPermission.js.map +1 -1
- package/dist/esm/funcs/permissionsGetRole.js +1 -1
- package/dist/esm/funcs/permissionsGetRole.js.map +1 -1
- package/dist/esm/funcs/permissionsListPermissions.js +1 -1
- package/dist/esm/funcs/permissionsListPermissions.js.map +1 -1
- package/dist/esm/funcs/permissionsListRoles.js +1 -1
- package/dist/esm/funcs/permissionsListRoles.js.map +1 -1
- package/dist/esm/funcs/ratelimitDeleteOverride.js +1 -1
- package/dist/esm/funcs/ratelimitDeleteOverride.js.map +1 -1
- package/dist/esm/funcs/ratelimitGetOverride.js +1 -1
- package/dist/esm/funcs/ratelimitGetOverride.js.map +1 -1
- package/dist/esm/funcs/ratelimitLimit.js +1 -1
- package/dist/esm/funcs/ratelimitLimit.js.map +1 -1
- package/dist/esm/funcs/ratelimitListOverrides.js +1 -1
- package/dist/esm/funcs/ratelimitListOverrides.js.map +1 -1
- package/dist/esm/funcs/ratelimitSetOverride.js +1 -1
- package/dist/esm/funcs/ratelimitSetOverride.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/url.js +1 -1
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/models/components/identity.d.ts +6 -26
- package/dist/esm/models/components/identity.d.ts.map +1 -1
- package/dist/esm/models/components/identity.js +2 -23
- package/dist/esm/models/components/identity.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/apisCreateApi.ts +1 -1
- package/src/funcs/apisDeleteApi.ts +1 -1
- package/src/funcs/apisGetApi.ts +1 -1
- package/src/funcs/apisListKeys.ts +1 -1
- package/src/funcs/identitiesCreateIdentity.ts +1 -1
- package/src/funcs/identitiesDeleteIdentity.ts +1 -1
- package/src/funcs/identitiesGetIdentity.ts +1 -1
- package/src/funcs/identitiesListIdentities.ts +1 -1
- package/src/funcs/identitiesUpdateIdentity.ts +1 -1
- package/src/funcs/keysAddPermissions.ts +1 -1
- package/src/funcs/keysAddRoles.ts +1 -1
- package/src/funcs/keysCreateKey.ts +1 -1
- package/src/funcs/keysDeleteKey.ts +1 -1
- package/src/funcs/keysGetKey.ts +1 -1
- package/src/funcs/keysRemovePermissions.ts +1 -1
- package/src/funcs/keysRemoveRoles.ts +1 -1
- package/src/funcs/keysRerollKey.ts +1 -1
- package/src/funcs/keysSetPermissions.ts +1 -1
- package/src/funcs/keysSetRoles.ts +1 -1
- package/src/funcs/keysUpdateCredits.ts +1 -1
- package/src/funcs/keysUpdateKey.ts +1 -1
- package/src/funcs/keysVerifyKey.ts +1 -1
- package/src/funcs/keysWhoami.ts +1 -1
- package/src/funcs/permissionsCreatePermission.ts +1 -1
- package/src/funcs/permissionsCreateRole.ts +1 -1
- package/src/funcs/permissionsDeletePermission.ts +1 -1
- package/src/funcs/permissionsDeleteRole.ts +1 -1
- package/src/funcs/permissionsGetPermission.ts +1 -1
- package/src/funcs/permissionsGetRole.ts +1 -1
- package/src/funcs/permissionsListPermissions.ts +1 -1
- package/src/funcs/permissionsListRoles.ts +1 -1
- package/src/funcs/ratelimitDeleteOverride.ts +1 -1
- package/src/funcs/ratelimitGetOverride.ts +1 -1
- package/src/funcs/ratelimitLimit.ts +1 -1
- package/src/funcs/ratelimitListOverrides.ts +1 -1
- package/src/funcs/ratelimitSetOverride.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/url.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/identity.ts +4 -53
- package/src/models/errors/index.ts +1 -0
- package/docs/sdks/unkey/README.md +0 -82
package/src/funcs/keysWhoami.ts
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -58,7 +58,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
58
58
|
export const SDK_METADATA = {
|
|
59
59
|
language: "typescript",
|
|
60
60
|
openapiDocVersion: "2.0.0",
|
|
61
|
-
sdkVersion: "2.0.
|
|
62
|
-
genVersion: "2.
|
|
63
|
-
userAgent: "speakeasy-sdk/typescript 2.0.
|
|
61
|
+
sdkVersion: "2.0.6",
|
|
62
|
+
genVersion: "2.723.11",
|
|
63
|
+
userAgent: "speakeasy-sdk/typescript 2.0.6 2.723.11 2.0.0 @unkey/api",
|
|
64
64
|
} as const;
|
package/src/lib/url.ts
CHANGED
|
@@ -10,7 +10,7 @@ export function pathToFunc(
|
|
|
10
10
|
pathPattern: string,
|
|
11
11
|
options?: { charEncoding?: "percent" | "none" },
|
|
12
12
|
): (params?: Params) => string {
|
|
13
|
-
const paramRE = /\{([a-zA-Z0-9_]
|
|
13
|
+
const paramRE = /\{([a-zA-Z0-9_][a-zA-Z0-9_-]*?)\}/g;
|
|
14
14
|
|
|
15
15
|
return function buildURLPath(params: Record<string, unknown> = {}): string {
|
|
16
16
|
return pathPattern.replace(paramRE, function (_, placeholder) {
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -13,11 +13,6 @@ import {
|
|
|
13
13
|
RatelimitResponse$outboundSchema,
|
|
14
14
|
} from "./ratelimitresponse.js";
|
|
15
15
|
|
|
16
|
-
/**
|
|
17
|
-
* Identity metadata
|
|
18
|
-
*/
|
|
19
|
-
export type IdentityMeta = {};
|
|
20
|
-
|
|
21
16
|
export type Identity = {
|
|
22
17
|
/**
|
|
23
18
|
* Identity ID
|
|
@@ -30,57 +25,13 @@ export type Identity = {
|
|
|
30
25
|
/**
|
|
31
26
|
* Identity metadata
|
|
32
27
|
*/
|
|
33
|
-
meta?:
|
|
28
|
+
meta?: { [k: string]: any } | undefined;
|
|
34
29
|
/**
|
|
35
30
|
* Identity ratelimits
|
|
36
31
|
*/
|
|
37
32
|
ratelimits?: Array<RatelimitResponse> | undefined;
|
|
38
33
|
};
|
|
39
34
|
|
|
40
|
-
/** @internal */
|
|
41
|
-
export const IdentityMeta$inboundSchema: z.ZodType<
|
|
42
|
-
IdentityMeta,
|
|
43
|
-
z.ZodTypeDef,
|
|
44
|
-
unknown
|
|
45
|
-
> = z.object({});
|
|
46
|
-
|
|
47
|
-
/** @internal */
|
|
48
|
-
export type IdentityMeta$Outbound = {};
|
|
49
|
-
|
|
50
|
-
/** @internal */
|
|
51
|
-
export const IdentityMeta$outboundSchema: z.ZodType<
|
|
52
|
-
IdentityMeta$Outbound,
|
|
53
|
-
z.ZodTypeDef,
|
|
54
|
-
IdentityMeta
|
|
55
|
-
> = z.object({});
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @internal
|
|
59
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
60
|
-
*/
|
|
61
|
-
export namespace IdentityMeta$ {
|
|
62
|
-
/** @deprecated use `IdentityMeta$inboundSchema` instead. */
|
|
63
|
-
export const inboundSchema = IdentityMeta$inboundSchema;
|
|
64
|
-
/** @deprecated use `IdentityMeta$outboundSchema` instead. */
|
|
65
|
-
export const outboundSchema = IdentityMeta$outboundSchema;
|
|
66
|
-
/** @deprecated use `IdentityMeta$Outbound` instead. */
|
|
67
|
-
export type Outbound = IdentityMeta$Outbound;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export function identityMetaToJSON(identityMeta: IdentityMeta): string {
|
|
71
|
-
return JSON.stringify(IdentityMeta$outboundSchema.parse(identityMeta));
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export function identityMetaFromJSON(
|
|
75
|
-
jsonString: string,
|
|
76
|
-
): SafeParseResult<IdentityMeta, SDKValidationError> {
|
|
77
|
-
return safeParse(
|
|
78
|
-
jsonString,
|
|
79
|
-
(x) => IdentityMeta$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
-
`Failed to parse 'IdentityMeta' from JSON`,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
35
|
/** @internal */
|
|
85
36
|
export const Identity$inboundSchema: z.ZodType<
|
|
86
37
|
Identity,
|
|
@@ -89,7 +40,7 @@ export const Identity$inboundSchema: z.ZodType<
|
|
|
89
40
|
> = z.object({
|
|
90
41
|
id: z.string(),
|
|
91
42
|
externalId: z.string(),
|
|
92
|
-
meta: z.
|
|
43
|
+
meta: z.record(z.any()).optional(),
|
|
93
44
|
ratelimits: z.array(RatelimitResponse$inboundSchema).optional(),
|
|
94
45
|
});
|
|
95
46
|
|
|
@@ -97,7 +48,7 @@ export const Identity$inboundSchema: z.ZodType<
|
|
|
97
48
|
export type Identity$Outbound = {
|
|
98
49
|
id: string;
|
|
99
50
|
externalId: string;
|
|
100
|
-
meta?:
|
|
51
|
+
meta?: { [k: string]: any } | undefined;
|
|
101
52
|
ratelimits?: Array<RatelimitResponse$Outbound> | undefined;
|
|
102
53
|
};
|
|
103
54
|
|
|
@@ -109,7 +60,7 @@ export const Identity$outboundSchema: z.ZodType<
|
|
|
109
60
|
> = z.object({
|
|
110
61
|
id: z.string(),
|
|
111
62
|
externalId: z.string(),
|
|
112
|
-
meta: z.
|
|
63
|
+
meta: z.record(z.any()).optional(),
|
|
113
64
|
ratelimits: z.array(RatelimitResponse$outboundSchema).optional(),
|
|
114
65
|
});
|
|
115
66
|
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Unkey SDK
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Unkey API: Unkey's API provides programmatic access for all resources within our platform.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Authentication
|
|
9
|
-
#
|
|
10
|
-
This API uses HTTP Bearer authentication with root keys. Most endpoints require specific permissions associated with your root key. When making requests, include your root key in the `Authorization` header:
|
|
11
|
-
```
|
|
12
|
-
Authorization: Bearer unkey_xxxxxxxxxxx
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
All responses follow a consistent envelope structure that separates operational metadata from actual data. This design provides several benefits:
|
|
16
|
-
- Debugging: Every response includes a unique requestId for tracing issues
|
|
17
|
-
- Consistency: Predictable response format across all endpoints
|
|
18
|
-
- Extensibility: Easy to add new metadata without breaking existing integrations
|
|
19
|
-
- Error Handling: Unified error format with actionable information
|
|
20
|
-
|
|
21
|
-
### Success Response Format:
|
|
22
|
-
```json
|
|
23
|
-
{
|
|
24
|
-
"meta": {
|
|
25
|
-
"requestId": "req_123456"
|
|
26
|
-
},
|
|
27
|
-
"data": {
|
|
28
|
-
// Actual response data here
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The meta object contains operational information:
|
|
34
|
-
- `requestId`: Unique identifier for this request (essential for support)
|
|
35
|
-
|
|
36
|
-
The data object contains the actual response data specific to each endpoint.
|
|
37
|
-
|
|
38
|
-
### Paginated Response Format:
|
|
39
|
-
```json
|
|
40
|
-
{
|
|
41
|
-
"meta": {
|
|
42
|
-
"requestId": "req_123456"
|
|
43
|
-
},
|
|
44
|
-
"data": [
|
|
45
|
-
// Array of results
|
|
46
|
-
],
|
|
47
|
-
"pagination": {
|
|
48
|
-
"cursor": "next_page_token",
|
|
49
|
-
"hasMore": true
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
The pagination object appears on list endpoints and contains:
|
|
55
|
-
- `cursor`: Token for requesting the next page
|
|
56
|
-
- `hasMore`: Whether more results are available
|
|
57
|
-
|
|
58
|
-
### Error Response Format:
|
|
59
|
-
```json
|
|
60
|
-
{
|
|
61
|
-
"meta": {
|
|
62
|
-
"requestId": "req_2c9a0jf23l4k567"
|
|
63
|
-
},
|
|
64
|
-
"error": {
|
|
65
|
-
"detail": "The resource you are attempting to modify is protected and cannot be changed",
|
|
66
|
-
"status": 403,
|
|
67
|
-
"title": "Forbidden",
|
|
68
|
-
"type": "https://unkey.com/docs/errors/unkey/application/protected_resource"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Error responses include comprehensive diagnostic information:
|
|
74
|
-
- `title`: Human-readable error summary
|
|
75
|
-
- `detail`: Specific description of what went wrong
|
|
76
|
-
- `status`: HTTP status code
|
|
77
|
-
- `type`: Link to error documentation
|
|
78
|
-
- `errors`: Array of validation errors (for 400 responses)
|
|
79
|
-
|
|
80
|
-
This structure ensures you always have the context needed to debug issues and take corrective action.
|
|
81
|
-
|
|
82
|
-
### Available Operations
|