Skip to content

Commit 567f8fb

Browse files
authored
Merge pull request linode#1 from yoshizzle/managed-credentials
Added object and endpoints for managed credentials
2 parents cc68e98 + 65acf31 commit 567f8fb

File tree

2 files changed

+137
-0
lines changed

2 files changed

+137
-0
lines changed

docs/src/data/endpoints/managed.yaml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,3 +175,105 @@ endpoints:
175175
curl: |
176176
curl -H "Authorization: Bearer $TOKEN" \
177177
https://$api_root/$version/managed/services/$service_id
178+
/managed/credentials:
179+
group: Credentials
180+
type: resource
181+
description: >
182+
Manage your managed service credentials list.
183+
methods:
184+
GET:
185+
response: ManagedCredential
186+
description: >
187+
Returns your credentials list.
188+
examples:
189+
curl: |
190+
curl https://$api_root/$version/managed/credentials
191+
POST:
192+
description: >
193+
Registers a new credential.
194+
params:
195+
label:
196+
type: String
197+
limit: 2-75 characters
198+
description: >
199+
A unique label describing the credential being added.
200+
username:
201+
type: String
202+
optional: true
203+
description: >
204+
An optional login username.
205+
password:
206+
type: String
207+
description: >
208+
A password or passphrase that provides access.
209+
examples:
210+
curl: |
211+
curl -H "Content-Type: application/json" \
212+
-H "Authorization: Bearer $TOKEN" \
213+
-X POST -d '{
214+
"label": "MyCredential",
215+
"username": "myusername",
216+
"pasword": "mypassword",
217+
}' \
218+
https://$api_root/$version/managed/credentials
219+
/managed/credentials/$id:
220+
group: Credentials
221+
type: resource
222+
authenticated: true
223+
description: >
224+
Manage a particular Managed service credential your account may access.
225+
methods:
226+
GET:
227+
response: ManagedCredential
228+
description: >
229+
Returns information about this credential.
230+
examples:
231+
curl: |
232+
curl -H "Authorization: Bearer $TOKEN" \
233+
https://$api_root/$version/managed/credential/$credential_id
234+
PUT:
235+
description: >
236+
Edits this credential.
237+
examples:
238+
curl: |
239+
curl -H "Content-Type: application/json" \
240+
-H "Authorization: Bearer $TOKEN" \
241+
-X PUT -d '{
242+
"label": "MyNewCredential",
243+
"username": "myusername2",
244+
}' \
245+
https://$api_root/$version/managed/credentials/$credential_id
246+
/managed/credentials/$id/password:
247+
group: Credentials
248+
type: resource
249+
authenticated: true
250+
description: >
251+
Change the password for a credential.
252+
methods:
253+
POST:
254+
response: ManagedCredential
255+
description: >
256+
Changes the password for a credential.
257+
examples:
258+
curl: |
259+
curl -H "Content-Type: application/json" \
260+
-H "Authorization: Bearer $TOKEN" \
261+
-X POST -d '{
262+
"pasword": "mypassword",
263+
}' \
264+
https://$api_root/$version/managed/credentials/$credential_id/password
265+
/managed/credentials/$id/revoke:
266+
group: Credentials
267+
type: resource
268+
authenticated: true
269+
description: >
270+
Revokes a credential.
271+
methods:
272+
POST:
273+
description: >
274+
Revokes a credential.
275+
examples:
276+
curl: |
277+
curl -H "Content-Type: application/json" \
278+
-H "Authorization: Bearer $TOKEN" \
279+
https://$api_root/$version/managed/credentials/$credential_id/revoke
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# vim: set et ts=2 sw=2 tw=80 :
2+
name: ManagedCredential
3+
prefix: managed/credentials
4+
description: >
5+
Managed Service credential objects describe monitoring service credentials associated with a service.
6+
schema:
7+
id:
8+
type: Integer
9+
value: 123
10+
description: >
11+
This credential's ID.
12+
label:
13+
type: String
14+
value: CredentialLabel
15+
description: >
16+
A unique Label describing the credential.
17+
username:
18+
type: String
19+
value: myusername
20+
description: >
21+
An optional login username.
22+
last_decryption:
23+
type: Object
24+
description: >
25+
The username and datetime of the last login using this credential.
26+
who:
27+
type: String
28+
value: myusername
29+
description: >
30+
The username of the last successful login.
31+
when:
32+
type: Datetime
33+
value: 2017-10-31T11:12:21
34+
description: >
35+
The datetime of the last successful login.

0 commit comments

Comments
 (0)