mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -05:00
Docs for GET /token
This commit is contained in:
parent
5ce08b907f
commit
3f83f52f90
1 changed files with 32 additions and 15 deletions
27
API.md
27
API.md
|
|
@ -6,20 +6,19 @@ vmpooler provides a REST API for VM management. The following examples use `cur
|
|||
|
||||
Token-based authentication can be used when requesting or modifying VMs. The `/token` route can be used to create, query, or delete tokens. See the provided YAML configuration example, [vmpooler.yaml.example](vmpooler.yaml.example), for information on configuring an authentication store to use when performing token operations.
|
||||
|
||||
##### GET /token/<token>
|
||||
##### GET /token
|
||||
|
||||
Get information about an existing token.
|
||||
Get a list of issued tokens.
|
||||
|
||||
```
|
||||
$ curl -u jdoe --url vmpooler.company.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y
|
||||
$ curl -u jdoe --url vmpooler.company.com/token
|
||||
Enter host password for user 'jdoe':
|
||||
```
|
||||
```json
|
||||
{
|
||||
"ok": true,
|
||||
"utpg2i2xswor6h8ttjhu3d47z53yy47y": {
|
||||
"user": "jdoe",
|
||||
"timestamp": "2015-04-28 19:17:47 -0700"
|
||||
"created": "2015-04-28 19:17:47 -0700"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
|
@ -39,6 +38,24 @@ Enter host password for user 'jdoe':
|
|||
}
|
||||
```
|
||||
|
||||
##### GET /token/<token>
|
||||
|
||||
Get information about an existing token.
|
||||
|
||||
```
|
||||
$ curl -u jdoe --url vmpooler.company.com/token/utpg2i2xswor6h8ttjhu3d47z53yy47y
|
||||
Enter host password for user 'jdoe':
|
||||
```
|
||||
```json
|
||||
{
|
||||
"ok": true,
|
||||
"utpg2i2xswor6h8ttjhu3d47z53yy47y": {
|
||||
"user": "jdoe",
|
||||
"timestamp": "2015-04-28 19:17:47 -0700"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
##### DELETE /token/<token>
|
||||
|
||||
Delete an authentication token.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue