Skip to content

Commit a9d1d75

Browse files
authored
Merge pull request #221 from clerk/tom/user-4983-track-down-python-api-key-issue
fix(api_keys): Handle `POST /api_key` `201` response
2 parents 3153d5a + 98e5812 commit a9d1d75

File tree

1 file changed

+100
-0
lines changed

1 file changed

+100
-0
lines changed

fixes.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,103 @@ actions:
77
- target: $["components"]["schemas"]["OrganizationMembership"]["properties"]["permissions"]
88
update:
99
nullable: true
10+
- target: $["paths"]["/api_keys"]["post"]["responses"]
11+
update:
12+
'201':
13+
description: 201 Created
14+
content:
15+
application/json:
16+
schema:
17+
type: object
18+
properties:
19+
object:
20+
type: string
21+
enum:
22+
- api_key
23+
id:
24+
type: string
25+
pattern: ^ak_[0-9A-Fa-f]{32}$
26+
example: ak_3beecc9c60adb5f9b850e91a8ee1e992
27+
type:
28+
type: string
29+
minLength: 3
30+
example: api_key
31+
subject:
32+
type: string
33+
pattern: ^(user|org|mch)_\w{27}$
34+
example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
35+
name:
36+
type: string
37+
example: MY_SERVICE_API_KEY
38+
description:
39+
type: string
40+
nullable: true
41+
maxLength: 255
42+
example: This is my API Key
43+
claims:
44+
nullable: true
45+
example:
46+
foo: bar
47+
scopes:
48+
type: array
49+
items:
50+
type: string
51+
example:
52+
- read
53+
- write
54+
secret:
55+
type: string
56+
example: ak_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
57+
revoked:
58+
type: boolean
59+
example: false
60+
revocation_reason:
61+
type: string
62+
nullable: true
63+
example: Revoked by user
64+
expired:
65+
type: boolean
66+
example: false
67+
expiration:
68+
type: number
69+
nullable: true
70+
description: The timestamp for when the API key will expire, in milliseconds
71+
example: 1716883200
72+
created_by:
73+
type: string
74+
nullable: true
75+
pattern: ^user_\w{27}$
76+
example: user_2xhFjEI5X2qWRvtV13BzSj8H6Dk
77+
last_used_at:
78+
type: number
79+
nullable: true
80+
description: The timestamp for when the API key was last used, in milliseconds
81+
example: 1716883200
82+
created_at:
83+
type: number
84+
description: The timestamp for when the API key was created, in milliseconds
85+
example: 1716883200
86+
updated_at:
87+
type: number
88+
description: The timestamp for when the API key was last updated, in milliseconds
89+
example: 1716883200
90+
required:
91+
- object
92+
- id
93+
- type
94+
- subject
95+
- name
96+
- claims
97+
- scopes
98+
- secret
99+
- revoked
100+
- revocation_reason
101+
- expired
102+
- expiration
103+
- created_by
104+
- last_used_at
105+
- created_at
106+
- updated_at
107+
additionalProperties: false
108+
- target: $["paths"]["/api_keys"]["post"]["responses"]["200"]
109+
remove: true

0 commit comments

Comments
 (0)