-
Notifications
You must be signed in to change notification settings - Fork 3
/
apiary.apib
137 lines (91 loc) · 3.59 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
FORMAT: 1A
TITLE: FIWARE-PaaS API v1 Specification
DATE: 15 January 2016
VERSION: v1.0
APIARY_PROJECT: fiware-aiakos
# FIWARE-Aiakos
<!--
Copyright 2015 Telefónica I+D
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
-->
Server with public API to manage ssh/gpg public keys for the support user of each FIWARE Lab node.
## Editors
+ Jesús Pérez González, Telefónica I+D
## Copyright
Copyright (c) 2016 Telefónica Investigación y Desarrollo.
This specification is licensed under the
[FIWARE Open Specification License (implicit patents license)](http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_Open_Specification_Legal_Notice_(implicit_patents_license)).
## Status
Final version aligned with FIWARE Release 5.3.5.
# Group aiakos v1
## Regions [/v1/support?regionName={regionName}]
### Get list [GET]
Get the region list with keys. You should use regionName parameter in order to filter the list.
Response in JSON:
* Succesful operation uses 200 Ok
* Body: a list of JSON with region name and date of last update of the availables keys.
+ Parameters
+ regionName (optional, String, `spain`) ... filter by region name
+ Request (application/json)
+ Headers
Accept: application/json
+ Response 200 (application/json)
[
{
"gpgkey": "2016-02-01T13:09:24.000Z",
"regionName": "trento"
},
{
"gpgkey": "2016-02-01T13:09:24.000Z",
"sshkey": "2016-02-01T13:09:24.000Z",
"regionName": "spain"
}
]
## Query key [/v1/support/{regionName}/{key}]
Get the key for region
+ Parameters
+ regionName (required, string, `region1`) ... region name.
+ key (sshkey | gpgkey)
### Get key [GET]
+ Request (application/json)
+ Headers
Accept: text/plain
+ Response 200 (text/plain)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFWnVCYBCADPeDMbTOkCM4MPbUMvtbAtGbUDnH3AHyZCEZZuyjeExATfT0Au
-----END PGP PUBLIC KEY BLOCK-----
+ Response 200 (text/plain)
ssh-rsa fBIqA5CALsR/gF6ITbjnSSc5pYTDZ/T0JwIb5Z [email protected]
## Add key [/v1/support]
Upload the keys with ssh and gpg format.
* The operation need to have a valid token to process it. To obtain
the token, you need to have an admin account in FIWARE Lab
(account.lab.fi-ware.org). Once that you have these credentias
(user name, password and tenant name), you can obtain the token identifier
(access.token.id path) in the response message in json format to
the Keystone service.
### Post key [POST]
+ Request (text/plain)
+ Headers
X-Auth-Token: token-id
Accept: text/plain
+ Request (text/plain)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFWnVCYBCADPeDMbTOkCM4MPbUMvtbAtGbUDnH3AHyZCEZZuyjeExATfT0Au
-----END PGP PUBLIC KEY BLOCK-----
+ Response 201 (text/plain)
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFWnVCYBCADPeDMbTOkCM4MPbUMvtbAtGbUDnH3AHyZCEZZuyjeExATfT0Au
-----END PGP PUBLIC KEY BLOCK-----