forked from buildingSMART/BCF-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiary.apib
231 lines (185 loc) · 8.3 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
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
231
FORMAT: 1A
# BCF-API
BCF-API is a service to exchange BCF-Topics
### Group Version
Version related resources of the **BCF-API**
### Schemas [/V0.99/schemas]
List all schemas
#### Link Schema [GET]
+ Response 200 (application/json)
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Link schema BCF REST API",
"links": [
{"rel": "teams","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/team.json"},
{"rel": "teams/projects","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/project.json"},
{"rel": "teams/projects/disciplines","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/discipline.json"},
{"rel": "teams/projects/disciplines/revisions","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/revision.json"},
{"rel": "teams/projects/topic", "href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/topic.json"},
{"rel": "teams/projects/topics/revisions", "href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/revision.json"},
{"rel": "teams/projects/topics/document_references","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/document_reference.json"},
{"rel": "teams/projects/topics/related_topics","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/related_topic.json"},
{"rel": "teams/projects/topics/comments","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/comment.json"},
{"rel": "teams/projects/topics/viewpoints","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/viewpoint.json"},
{"rel": "teams/projects/topics/viewpoints/components","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/component.json"}
]
}
### Schema [/V0.99/schemas/{rel}]
A single schema
+ Parameters
+ rel (required, string, `topic`) ... `relation` of the schema.
#### Retrieve schema [GET]
+ Response 200 (application/json)
+ Body
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Topic",
"description": "Schema for Topic, BCF REST API",
"type": "object",
"definitions": {
"guid":{
"type": "string",
"pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
}
},
"properties": {
"guid": {"$ref": "#/definitions/guid" },
"topic_type": {"$ref": "extensions.json#/definitions/topic_type" },
"topic_status": {"$ref": "extensions.json#/definitions/topic_status" },
"reference_link": { "type": "string" },
"title": { "type": "string" },
"index": { "type": "integer", "minimum": 0},
"label": { "$ref": "extensions.json#/definitions/topic_label" },
"creation_date": { "type": "string", "format": "date-time" },
"modified_date": { "type": "string", "format": "date-time" },
"assigned_to": { "$ref": "extensions.json#/definitions/user_id_type" },
"bim_snippet": {
"type": "object",
"properties": {
"snippet_type": {"$ref": "extensions.json#/definitions/snippet_type" },
"is_external": {"type": "boolean"},
"reference": { "type": "string" },
"reference_schema": { "type": "string" }
}
}
},
"required" : ["title", "guid"],
"links":[
{"rel": "revisions","href": "{guid}/revisions"},
{"rel": "document_references","href": "{guid}/document_references"},
{"rel": "related_topics","href": "{guid}/related_topics"},
{"rel": "comments","href": "{guid}/comments"},
{"rel": "viewpoints","href": "{guid}/viewpoints"}
]
}
### Group Authentication
Authentication related resources of the **BCF-API**
### Group User
User Rights and Roles related resources of the **BCF-API**
### Group Team
Team related resources of the **BCF-API**
### Group Project
Project related resources of the **BCF-API**
### Group Discipline
Descipline related resources of the **BCF-API**
### Group Revision
Revision related resources of the **BCF-API**
### Group Object
Object related resources of the **BCF-API**
### Group Topics
Topics related resources of the **BCF-API**
### Topics [/V0.99/teams/{guid}/projects/{guid}/topics]
### Topics [/V0.99/projects/{guid}/topics]
+ Parameters
+ guid (required, string, `0d2ce2cc-3588-45d6-a59a-f6b89ebed34e`) ... `guid` of the Project.
#### List all Topics [GET]
+ Response 200 (application/json)
[
{
"guid": "bbe8a313-d576-4c8e-b88d-065988bc855a",
"title": "Wrong Window",
"label": "Specfications"
},
{
"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d",
"title": "PfV Architecture/Heating"
"label": "Architecture"
}
]
### Topic [/V0.99/teams/{guid}/projects/{guid}/topics/{guid}]
### Topic [/V0.99/topics/{guid}]
A single Topic object with all its details
+ Parameters
+ guid (required, string, `ab770b4f-b590-4056-83a6-683c5e226a7d`) ... `guid` of the Topic.
#### Retrieve a Topic [GET]
+ Response 200 (application/json)
+ Body
{
"reference_link": "http://www.buildingmart....",
"title": "PfV Architecture/Heating",
"index": 1,
"label": "Architecture",
"creation_date": "2012-04-23T18:25:43.511Z",
"modified_date": "2012-04-23T18:25:43.511Z",
"assigned_to": "[email protected]",
"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d",
"topic_type": "Request",
"topic_status": "Open"
}
### Comments [/V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments]
### Comments [/V0.99/topics/{guid}/comments]
All Comments related to a topic
+ Parameters
+ guid (required, string, `ab770b4f-b590-4056-83a6-683c5e226a7d`) ... `guid` of the Topic.
#### Retrieve all Comments related to a Topic [GET]
+ Response 200 (application/json)
+ Body
[
{
"guid": "ca440b4f-b110-4056-83d6-338c5e226a4a",
"verbalstatus": "Open",
"status": "unknown",
"date": "2012-04-23T18:25:44.511Z",
"author": "[email protected]",
"comment": "this is a comment",
"topic": {
"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d"
},
"modifieddate": "2012-04-23T18:25:44.511Z",
"priority": "2"
},
{
"guid": "dd550b4f-b110-4056-83d6-337c5e226a22",
"verbalstatus": "In Progress",
"status": "unknown",
"date": "2012-04-23T18:25:44.511Z",
"author": "[email protected]",
"comment": "this is the answer to a comment",
"topic": {
"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d"
},
"modifieddate": "2012-05-14T17:22:44.511Z",
"priority": "2"
}
]
### Create a Comment [POST]
+ Request (application/json)
{
"guid": "dd550b4f-b110-4056-83d6-337c5e226a22",
"verbalstatus": "In Progress",
"status": "unknown",
"date": "2012-04-23T18:25:44.511Z",
"author": "[email protected]",
"comment": "this is the answer to a comment",
"topic": {
"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d"
},
"modifieddate": "2012-05-14T17:22:44.511Z",
"priority": "2"
}
+ Response 201 (application/json)
{ "guid": "dd550b4f-b110-4056-83d6-337c5e226a22",
"comment": "this is the answer to a comment",
"topic":
{"guid": "ab770b4f-b590-4056-83a6-683c5e226a7d"}
}