-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathapiary.apib
More file actions
230 lines (167 loc) · 10.3 KB
/
apiary.apib
File metadata and controls
230 lines (167 loc) · 10.3 KB
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
FORMAT: 1A
# CRCE API
Web Service API specification for **C**omponent **R**epository supporting **C**ompabitility **E**valuation.
Project URL: https://www.assembla.com/spaces/crce
Source Code: http://github.com/ReliSA/crce/
# Group Resources
Resources of the CRCE API represent the actual component binaries. These endpoints allow browsing of
basic resource identification meta-data and the actual binary search and download.
## Resource [/resources/{id}]
Concrete resource record identified by internal CRCE ID.
+ Parameters
+ id (required, string, `550e8400-e29b-41d4-a716-446655440000`) ... Internal CRCE identificator of the particular component.;
### Download binary [GET]
Serves the client the binary associated with the id. Use /metadata/{id} to get resource's meta-data.
+ Response 200 (application/octet-stream)
+ Headers
Content-Disposition: attachement; filename="org-obcc-parking-gate-1.0.4.jar"
+ Body
***component binary***
## Resources Collection [/resources]
+ Model (application/xml)
+ Body
<resources>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.gate" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.0.0" />
<attribute name="crce.categories" value="initial-version,versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.gate" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.1.0" />
<attribute name="crce.categories" value="versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.statistics" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.0.0" />
<attribute name="crce.categories" value="initial-version,versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
</resources>
### List all Bundles [GET]
Returns list of all components in the repository with links to their binaries. Same view as /metadata collection, just from different
perspective.
+ Response 200
[Resources Collection][]
### Upload a Resource [POST]
+ Request (multipart/form-data)
*Component binary file*
+ Response 202
## Filtered Resources Collection [/resources/catalogue/{externalId}/{version}]
+ Parameters
+ externalId (required, string, `org.obcc.parking.gate`) ... Fully qualified name of the partiuclar component. E.g. OSGi "symbolic-name";
+ version (optional, Version, `1.0.0-SNAPSHOT`) ... Version identificator having the major.minor.micro-qualifier schema;
### List all Bundles [GET]
Returns list of all components fitting the given externalId and version, which can be found in the repository with links to their binaries.
Same view as /metadata collection, just from different perspective.
+ Response 200
[Resources Collection][]
# Group Meta-Data
Meta-Data describing bundles stored within the repository. Their capabilities, requirements and other vital pieces of information.
## Meta-Data [/metadata/{id}]
A particular component revision.
+ Model (application/xml)
Model for meta-data of a single resource.
+ Body
<resource>
<!-- Resource meta-data as defined at https://www.assembla.com/spaces/crce/wiki/Metadata_example_-_core -->
</resource>
+ Parameters
+ id (required, string, `550e8400-e29b-41d4-a716-446655440000`) ... Internal CRCE identificator of the particular component.;
### Get Meta-Data for Bundle [GET]
+ Response 200
[Meta-Data][]
## Meta-Data Collection [/metadata]
+ Model (application/xml)
Meta-Data Collection sample model.
+ Body
<resources>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.gate" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.0.0" />
<attribute name="crce.categories" value="initial-version,versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.gate" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.1.0" />
<attribute name="crce.categories" value="versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
<resource>
<capability namespace='crce.identity' uuid='550e8400-e29b-41d4-a716-446655440000'>
<attribute name="external-id" value="org.obcc.parking.statistics" />
<attribute name="crce.type" value="osgi,jar" type="list" />
<attribute name="provider" value="cz.zcu.kiv" />
<attribute name="version.original" type="Version" value="1.0.0" />
<attribute name="crce.categories" value="initial-version,versioned,osgi" type="list" />
<attribute name="crce.status" value="stored" />
</capability>
</resource>
</resources>
### List All Meta-Data [GET]
Returns list of all components in the repository with links to their meta-data. Same view as /resources collection, just from different
perspective.
+ Response 200
[Meta-Data Collection][]
## Filtered Meta-Data Collection [/metadata/catalogue/{externalId}/{version}]
+ Parameters
+ externalId (required, string, `org.obcc.parking.gate`) ... External ID of the particular component. E.g. OSGi "symbolic-name";
+ version (optional, Version, `1.0.0-SNAPSHOT`) ... Version identificator having the major.minor.micro-qualifier schema;
### List Meta-Data [GET]
Returns list of all components fitting the externalId and version, which can be found in the repository with links to their meta-data.
Same view as /resources collection, just from different perspective.
+ Response 200
[Meta-Data Collection][]
## Meta-Data describing differences between Bundles - not implemented [/meta-data/catalogue/{externalId}/{version}/diffs{?otherExternalId}{?otherVersion}]
Meta-Data with information about API differences between bundles.
TODO: (externalId, version) might result in multiple resources. Need to extend the identification so that it is not ambiguous.
+ Parameters
+ externalId (required, string, `org.obcc.parking.gate`) ... Fully qualified name of the partiuclar component. E.g. OSGi "symbolic-name";
+ version (required, Version, `1.0.4`) ... Version identifier;
+ otherExternalId (optional, string, `com.kknd.park.gate`) ... Name of the other compared component;
+ otherVersion (optional, Version, `1.0.0`) ... Version identifier of the second component;
### Get Diffs for Bundle [GET]
+ Response 200 (application/xml)
<diffs>
<!-- Diff meta-data as defined at https://www.assembla.com/spaces/crce/wiki/Metadata_example_-_compatibility -->
</diffs>
## Meta-Data for a compatible Bundle - not implemented [/meta-data/catalogue/{externalId}/{version}/compatible{?operation}]
Returns meta-data for a bundle compatible with the one specified using `name` and `version` parameters. While
there might be many compatible bundles in the repository, at most one is returned. Rule, by which the bundle
is chosen is determined by the `operation` parameter, which can have the following values:
- any any compatible bundle is returned, no specification of the relationship between the original and returned version
- lowest lowest compatible version is returned
- downgrade nearest compatible version lower than the original is returned
- upgrade (default) nearest compatible version higher than the original is returned
- highest highest compatible version is returned
TODO: (externalId, version) might result in multiple resources. Need to extend the identification so that it is not ambiguous.
+ Parameters
+ externalId (required, string, `org.obcc.parking.gate`) ... Fully qualified name of the partiuclar component. E.g. OSGi "symbolic-name";
+ version (required, Version, `1.0.4`) ... Version identifier;
+ operation (optional, string) ... Specification of the operation you want the compatible bundle for;
### Get Compatible Bundle Meta-Data [GET]
+ Response 200
[Meta-Data][]