Skip to content

Commit

Permalink
Changed document_recerences_PUT to include either a GUID or an extern…
Browse files Browse the repository at this point in the history
…al_reference; Added 4.9 document POST and GET with schema
  • Loading branch information
GeorgDangl committed Feb 12, 2015
1 parent 35ae4ee commit e530478
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 23 deletions.
40 changes: 37 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
- [4.8 Document Reference Services](#48-document-reference-services)
- [4.8.1 GET Document Reference Services](#481-get-document-reference-services)
- [4.8.2 PUT Document Reference Services](#482-put-document-reference-services)



- [4.9 Document Services](#49-document-services)
- [4.9.1 POST Document Services](#491-post-document-services)
- [4.9.2 GET Document Services](#492-get-document-services)


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

Add or update document references to a topic.
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.

**Example Request**

Expand All @@ -2006,5 +2007,38 @@ Add or update document references to a topic.
}
]

## 4.9 Document Services

### 4.9.1 POST Document Services

[document_GET.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas_draft-03/Collaboration/Document/document_GET.json)

**Recource URL**

POST /bcf/{version}/projects/{project_id}/documents

Upload a document (binary file) to a project. The following HTTP headers are used for the upload:

Content-Type: application/octet-stream;
Content-Length: {Size of file in bytes};
Content-Disposition: attachment; filename="{Filename.extension}";

**Example Response**

{
"guid":"472ab37a-6122-448e-86fc-86503183b520"
}

### 4.9.2 GET Document Services

**Recource URL**

GET /bcf/{version}/projects/{project_id}/documents/{guid}

Retrieves a document as binary file. Will use the following HTTP headers to deliver additional information:

Content-Type: application/octet-stream;
Content-Length: {Size of file in bytes};
Content-Disposition: attachment; filename="{Filename.extension}";


10 changes: 10 additions & 0 deletions Schemas_draft-03/Collaboration/Document/document_GET.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"title": "document_GET",
"type": "object",
"properties": {
"guid": {
"required": true,
"type": "string"
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"title": "document_reference_PUT",
"type": "object",
"properties": {
"guid": {
"type": [
"string",
"null"
]
},
"referenced_document": {
"type": [
"string",
Expand Down

0 comments on commit e530478

Please sign in to comment.