@@ -5,214 +5,5 @@ title: Keys
5
5
6
6
## Get list of all keys
7
7
8
- Returns a list of all keys in the organization.
9
-
10
- | Method | Path |
11
- | :----- | :--- |
12
- | GET | ` /v1/organizations/{organizationId}/keys ` |
13
-
14
- ### Request
15
-
16
- #### Path Params
17
-
18
- | Name | Type | Description |
19
- | :--- | :--- | :---------- |
20
- | organizationId | uuid | ID of the requested organization. |
21
-
22
-
23
- ### Response
24
-
25
- #### Response Schema
26
-
27
- | Name | Type | Description |
28
- | :--- | :--- | :---------- |
29
- | id | uuid | Unique API key ID. |
30
- | name | string | Name of the key |
31
- | state | string | State of the key: 'enabled', 'disabled'. |
32
- | roles | array | List of roles assigned to the key. Contains at least 1 element. |
33
- | keySuffix | string | Last 4 letters of the key. |
34
- | createdAt | date-time | Timestamp the key was created. ISO-8601. |
35
- | expireAt | date-time | Timestamp the key expires. If not present or is empty the key never expires. ISO-8601. |
36
- | usedAt | date-time | Timestamp the key was used last time. If not present the key was never used. ISO-8601. |
37
-
38
- #### Sample response
39
-
40
- ```
41
- {
42
- "id": "uuid",
43
- "name": "string",
44
- "state": "string",
45
- "roles": "Array",
46
- "keySuffix": "string",
47
- "createdAt": "date-time",
48
- "expireAt": "date-time",
49
- "usedAt": "date-time"
50
- }
51
- ```
52
-
53
- ## Create key
54
-
55
- Creates new API key.
56
-
57
- | Method | Path |
58
- | :----- | :--- |
59
- | POST | ` /v1/organizations/{organizationId}/keys ` |
60
-
61
- ### Request
62
-
63
- #### Path Params
64
-
65
- | Name | Type | Description |
66
- | :--- | :--- | :---------- |
67
- | organizationId | uuid | ID of the organization that will own the key. |
68
-
69
- ### Body Params
70
-
71
- | Name | Type | Description |
72
- | :--- | :--- | :---------- |
73
- | name | string | Name of the key. |
74
- | expireAt | string | Timestamp the key expires. If not present or is empty the key never expires. ISO-8601. |
75
- | state | string | Initial state of the key: 'enabled', 'disabled'. If not provided the new key will be 'enabled'. |
76
- | hashData | | |
77
- | roles | array | List of roles assigned to the key. Contains at least 1 element. |
78
-
79
- ### Response
80
-
81
- #### Response Schema
82
-
83
- | Name | Type | Description |
84
- | :--- | :--- | :---------- |
85
- | key | | |
86
- | keyId | string | Generated key ID. Provided only if there was no 'hashData' in the request. |
87
- | keySecret | string | Generated key secret. Provided only if there was no 'hashData' in the request. |
88
-
89
- #### Sample response
90
-
91
- ```
92
- {
93
- "keyId": "string",
94
- "keySecret": "string"
95
- }
96
- ```
97
-
98
- ## Get key details
99
-
100
- Returns a single key details.
101
-
102
- | Method | Path |
103
- | :----- | :--- |
104
- | GET | ` /v1/organizations/{organizationId}/keys/{keyId} ` |
105
-
106
- ### Request
107
-
108
- #### Path Params
109
-
110
- | Name | Type | Description |
111
- | :--- | :--- | :---------- |
112
- | organizationId | uuid | ID of the requested organization. |
113
- | keyId | uuid | ID of the requested key. |
114
-
115
-
116
- ### Response
117
-
118
- #### Response Schema
119
-
120
- | Name | Type | Description |
121
- | :--- | :--- | :---------- |
122
- | id | uuid | Unique API key ID. |
123
- | name | string | Name of the key |
124
- | state | string | State of the key: 'enabled', 'disabled'. |
125
- | roles | array | List of roles assigned to the key. Contains at least 1 element. |
126
- | keySuffix | string | Last 4 letters of the key. |
127
- | createdAt | date-time | Timestamp the key was created. ISO-8601. |
128
- | expireAt | date-time | Timestamp the key expires. If not present or is empty the key never expires. ISO-8601. |
129
- | usedAt | date-time | Timestamp the key was used last time. If not present the key was never used. ISO-8601. |
130
-
131
- #### Sample response
132
-
133
- ```
134
- {
135
- "id": "uuid",
136
- "name": "string",
137
- "state": "string",
138
- "roles": "Array",
139
- "keySuffix": "string",
140
- "createdAt": "date-time",
141
- "expireAt": "date-time",
142
- "usedAt": "date-time"
143
- }
144
- ```
145
-
146
- ## Update key
147
-
148
- Updates API key properties.
149
-
150
- | Method | Path |
151
- | :----- | :--- |
152
- | PATCH | ` /v1/organizations/{organizationId}/keys/{keyId} ` |
153
-
154
- ### Request
155
-
156
- #### Path Params
157
-
158
- | Name | Type | Description |
159
- | :--- | :--- | :---------- |
160
- | organizationId | uuid | ID of the organization that owns the key. |
161
- | keyId | uuid | ID of the key to update. |
162
-
163
- ### Body Params
164
-
165
- | Name | Type | Description |
166
- | :--- | :--- | :---------- |
167
- | name | string | Name of the key |
168
- | roles | array | List of roles assigned to the key. Contains at least 1 element. |
169
- | expireAt | string | Timestamp the key expires. If not present or is empty the key never expires. ISO-8601. |
170
- | state | string | State of the key: 'enabled', 'disabled'. |
171
-
172
- ### Response
173
-
174
- #### Response Schema
175
-
176
- | Name | Type | Description |
177
- | :--- | :--- | :---------- |
178
- | id | uuid | Unique API key ID. |
179
- | name | string | Name of the key |
180
- | state | string | State of the key: 'enabled', 'disabled'. |
181
- | roles | array | List of roles assigned to the key. Contains at least 1 element. |
182
- | keySuffix | string | Last 4 letters of the key. |
183
- | createdAt | date-time | Timestamp the key was created. ISO-8601. |
184
- | expireAt | date-time | Timestamp the key expires. If not present or is empty the key never expires. ISO-8601. |
185
- | usedAt | date-time | Timestamp the key was used last time. If not present the key was never used. ISO-8601. |
186
-
187
- #### Sample response
188
-
189
- ```
190
- {
191
- "id": "uuid",
192
- "name": "string",
193
- "state": "string",
194
- "roles": "Array",
195
- "keySuffix": "string",
196
- "createdAt": "date-time",
197
- "expireAt": "date-time",
198
- "usedAt": "date-time"
199
- }
200
- ```
201
-
202
- ## Delete key
203
-
204
- Deletes API key. Only a key not used to authenticate the active request can be deleted.
205
-
206
- | Method | Path |
207
- | :----- | :--- |
208
- | DELETE | ` /v1/organizations/{organizationId}/keys/{keyId} ` |
209
-
210
- ### Request
211
-
212
- #### Path Params
213
-
214
- | Name | Type | Description |
215
- | :--- | :--- | :---------- |
216
- | organizationId | uuid | ID of the organization that owns the key. |
217
- | keyId | uuid | ID of the key to delete. |
218
-
8
+ This file is generated by ` clickhouseapi.js ` during the build process. If the
9
+ content needs changing please edit ` clickhouseapi.js ` .
0 commit comments