Skip to content

Commit e530478

Browse files
committed
Changed document_recerences_PUT to include either a GUID or an external_reference; Added 4.9 document POST and GET with schema
1 parent 35ae4ee commit e530478

File tree

4 files changed

+53
-23
lines changed

4 files changed

+53
-23
lines changed

README.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@
6767
- [4.8 Document Reference Services](#48-document-reference-services)
6868
- [4.8.1 GET Document Reference Services](#481-get-document-reference-services)
6969
- [4.8.2 PUT Document Reference Services](#482-put-document-reference-services)
70-
71-
72-
70+
- [4.9 Document Services](#49-document-services)
71+
- [4.9.1 POST Document Services](#491-post-document-services)
72+
- [4.9.2 GET Document Services](#492-get-document-services)
7373

7474

7575
----------
@@ -1984,6 +1984,7 @@ Retrieve a **collection** of all document references to a topic.
19841984
[document_reference_PUT.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas_draft-03/Collaboration/DocumentReference/document_reference_PUT.json)
19851985

19861986
Add or update document references to a topic.
1987+
The PUT object may either contain the property "guid" to reference a document stored on the BCF server (see section 4.9) OR the property "referenced_document" to point to an external resource.
19871988

19881989
**Example Request**
19891990

@@ -2006,5 +2007,38 @@ Add or update document references to a topic.
20062007
}
20072008
]
20082009

2010+
## 4.9 Document Services
2011+
2012+
### 4.9.1 POST Document Services
2013+
2014+
[document_GET.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas_draft-03/Collaboration/Document/document_GET.json)
2015+
2016+
**Recource URL**
2017+
2018+
POST /bcf/{version}/projects/{project_id}/documents
2019+
2020+
Upload a document (binary file) to a project. The following HTTP headers are used for the upload:
2021+
2022+
Content-Type: application/octet-stream;
2023+
Content-Length: {Size of file in bytes};
2024+
Content-Disposition: attachment; filename="{Filename.extension}";
2025+
2026+
**Example Response**
2027+
2028+
{
2029+
"guid":"472ab37a-6122-448e-86fc-86503183b520"
2030+
}
2031+
2032+
### 4.9.2 GET Document Services
2033+
2034+
**Recource URL**
2035+
2036+
GET /bcf/{version}/projects/{project_id}/documents/{guid}
2037+
2038+
Retrieves a document as binary file. Will use the following HTTP headers to deliver additional information:
2039+
2040+
Content-Type: application/octet-stream;
2041+
Content-Length: {Size of file in bytes};
2042+
Content-Disposition: attachment; filename="{Filename.extension}";
20092043

20102044

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"title": "document_GET",
3+
"type": "object",
4+
"properties": {
5+
"guid": {
6+
"required": true,
7+
"type": "string"
8+
}
9+
}
10+
}

Schemas_draft-03/Collaboration/DocumentReference/document_reference_POST.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

Schemas_draft-03/Collaboration/DocumentReference/document_reference_PUT.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
"title": "document_reference_PUT",
33
"type": "object",
44
"properties": {
5+
"guid": {
6+
"type": [
7+
"string",
8+
"null"
9+
]
10+
},
511
"referenced_document": {
612
"type": [
713
"string",

0 commit comments

Comments
 (0)