diff --git a/Images/Topology1.png b/Images/Topology1.png new file mode 100644 index 0000000..2d17095 Binary files /dev/null and b/Images/Topology1.png differ diff --git a/Images/Topology2.png b/Images/Topology2.png new file mode 100644 index 0000000..410ff7f Binary files /dev/null and b/Images/Topology2.png differ diff --git a/Images/Topology3.png b/Images/Topology3.png new file mode 100644 index 0000000..256cc11 Binary files /dev/null and b/Images/Topology3.png differ diff --git a/README.md b/README.md index 340d6e9..49a9d11 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,10 @@ -## BIM REST API +## BCF REST API ![](https://raw.githubusercontent.com/BuildingSMART/BCF/master/Icons/BCFicon128.png) -**Version 0.99** based on BCFv2. +**Version 1.0** based on BCFv2. [GitHub repository](https://github.com/BuildingSMART/BCF-API) -Services: - -- Information -- Team, Project, Domain -- Revision -- BCF -- Attachment -- User - ---------- @@ -21,6 +12,7 @@ Services: # 1. Introduction # +BCF is a format for managing issues on a BIM project. RESTful BCF-API supports the exchange of BCFv2 issues between software applications. All API access is over HTTPS. Data is sent as query parameters and received as JSON. Every resource has a corresponding Json Schema. (There are also XSD-Schemas available but XML support ist optionally). Json Hyper Schema is used for link definition. Authentication method is OAuth2. @@ -102,13 +94,35 @@ The server has a web config file .. "*" means the server allow the resources fo +## 1.4 Http status codes ## + +- 200 OK (Data is returned) +- 201 No content (Data has been deleted) +- 302 Redirect (Returning a redirect to the GET-resource for the data that has been created/updated) +- 400 BadRequest (Input data is invalid) +- 401 Unauthorized (User don’t have access to the requested resource) +- 403 Forbidden +- 404 Not found (It must be discussed if the user should get “unauthorized” to resources he don’t have access to, or “not found") +- 422 Unprocessable entity (Input data is well formed, but the semantic is wrong; Example: Resource define that a value cannot be “null”, but the value is “null”) + +## 1.5 Error response body format ## + +BCF-API has a specified error response body format [error.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/error.json). + +---------- + + -# 2. Services # +# Topology 1 - BCF-Server only# +Model collaboration is managed through a shared file server or a network file sharing service like Dropbox. The BCF-Server handels the Authentication and the BCF-Issues. +![Topology1](Images/Topology1.png) -## 2.1 Information Services ## + + +## Information Services (Topology 1) ## [version.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/version.json), [link.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/link.json), [colors.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/colors.json) @@ -121,34 +135,34 @@ Services: ---------- - GET /V0.99/schemas + GET /{version}/schemas -- GET - Retrieve link schema that contains all available schemas in BIM-API +- GET - Retrieve link schema that contains all available schemas for Topolgy1 ---------- - GET /V0.99/schemas/{rel} + GET /{version}/schemas/{rel} - GET - Retrieve a specific schema. ---------- -`GET /V0.99/colors` +`GET /{version}/colors` - GET - Retrieve ARGB values for colours ---------- -## 2.2 Authentication ## +## Authentication (Topology 1) ## -Authentication is based on the [OAuth 2.0 Protocol](http://tools.ietf.org/html/draft-ietf-oauth-v2-22). +The Authentication server is the BCF-Server. Authentication is based on the [OAuth 2.0 Protocol](http://tools.ietf.org/html/draft-ietf-oauth-v2-22). Services: - GET /V0.99/oauth/authorize + GET /{version}/oauth2/authorize Open a browser window or redirect the user to this resource. @@ -164,7 +178,7 @@ Redirects back to the specified redirect URI with the provided state as a query Long Url: - - POST /V0.99/oauth/access_token + POST /{version}/oauth2/access_token After you have received the authorization code you can request an access token. The access token will be returned as JSON in the response body. @@ -173,160 +187,121 @@ The access token is an arbitrary string, guarantied to fit in a varchar(255) fie When requesting other resources the access token must be passed via the Authorization header using the Bearer scheme *(e.g. Authorization: Bearer T9UNRV4sC9vr7ga)*. -## 2.3 Team, Project, Domain Services ## - -#### *2.3.1 Team* #### - -[team.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/team.json) - -Services: - - GET, POST /V0.99/teams -- GET - Retrieve a list of teams where the currently logged on user is assigne to with his specific role -- Post - Add a new team - -Long Url: - - - GET, PUT, DELETE /V0.99/teams/{guid} - +## Project Services (Topology 1) ## -- GET - Retrieve a specific team -- PUT - Modify a specific team -- DELETE - Delete a specific team - -Long Url: - - -#### *2.3.2 Project* #### [project.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/project.json), [extensions.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/extensions.json) Services: - GET, POST /V0.99/ teams/{guid}/projects + GET, POST /{version}/projects - GET - Retrieve a list of projects where the currently logged on user is assigned to with his specific roles. - POST - Add a new project Long Url: - - GET, PUT, DELETE /V0.99/projects/{guid} + GET, PUT, DELETE /{version}/projects/{project_id} - GET - Retrieve a specific project - PUT - Modify a specific project - DELETE - Delete a specific project -Long URL: /V0.99/teams/{guid}/projects/{guid} - - GET, POST, PUT, DELETE /V0.99/projects/{guid}/thumbnail - +Long URL: - -- GET - Retrieve the project thumbnail (blob) -- POST - Upload the project thumbnail (blob) -- DELETE – Delete the project thumbnail -Long URL: /V0.99/teams/{guid}/projects/{guid}/thumbnail - - - GET, POST, PUT, DELETE /V0.99/projects/{guid}/extension + GET, POST, PUT, DELETE /V0.99/projects/{project_id}/extension - GET - Retrieve the project extension schema - POST - Add the project extension schema - PUT - Change the project extension schema - DELETE – Delete the project extension schema -Long URL: /V0.99/teams/{guid}/projects/{guid}/extensions - - -#### *2.3.3 Domain* #### -[domain.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/domain.json) - -Services: +Long URL: /V0.99/teams/{guid}/projects/{project_id}/extensions - GET, POST /V0.99/projects/{guid}/domains -- GET - Retrieve a list of domains within a project where the currently logged on user is assigned to with his specific roles -- POST - Add a new domain to a project +---------- -Long URL: /V0.99/ teams/{ guid }/projects/{guid}/domains - GET, PUT, DELETE /V0.99/domains/{guid} +# Topology 2 - Connected BCF-Server and Model Server# -- GET - Retrieve a specific domain -- PUT - Change a specific domain -- DELETE – Delete a specific domain +BCF and Model server are aware of each other but are running independently (e.g. BCF Server is provided by vendor A while model server is provided by vendor B) -Long URL: /V0.99/ teams/{ guid }/projects/{guid}/domains/{guid} +![Topology2](Images/Topology2.png) -## 2.4 Revision Services ## -[revision.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/revision.json) +---------- -Services: +# Topology 3 - Co-Located BCF-Server and Model Server# - GET, POST /V0.99/domains/{guid}/revisions +BCF and model server are co located on the same hosts. -- GET - Retrieve revisions of a domain -- POST - Add a new revision to a domain; Multipart -> all informations retrieved from header -Long URL: /V0.99/ teams/{guid }/projects/{guid}/domains/{guid}/revisions +![Topology3](Images/Topology3.png) - GET, DELETE /V0.99/revisions/{guid} +---------- -- GET - Download a specific revision -- DELETE - Delete a specific revision -Long URL: /V0.99/ teams/{guid }/projects/{guid}/domains/{guid}/revisions/{guid} -## 2.5 BCF Services ## +## BCF Services (Toplogy 1, Topology 2, Topology3) ## -#### *2.5.1 Topic* #### -[topic.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/topic.json), [revision.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/revision.json) +#### *Topic* #### +[topic.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/topic.json) -Services: - GET, POST /V0.99/projects/{guid}/topics + GET, POST /{version}/projects/{project_id}/topics - GET - Retrieve topics of a project (default sort = CreationDate) - POST - Add a new topic to a project -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics +Long URL: - - GET, PUT, DELETE /V0.99/topics/{guid} + GET, PUT, DELETE /{version}/topics/{guid} - GET - Retrieve a specific topic - PUT - Update a specific topic - DELETE - Delete a specific topic -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid} +Long URL: /{version}/projects/{project_id}/topics/{guid} + + +---------- + - GET /V0.99/topics/{guid}/revisions -- GET - Retrieve all revisions related to a topic -- POST - Assign a revision to a topic +#### *File* #### + [file.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/file.json) -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/revisions +`GET /{version}/topics/{guid}/files` - DELETE /V0.99/topics/{guid}/revisions/{guid} +- GET - Retrieve the header of a topic +- POST - Assign a file to a topic -- DELETE - Delete a revison to topic assignment +Long URL: /{version}/projects/{project_id}/topics/{guid}/files -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/revisions/{guid} +`DELETE /{version}/topic/{guid}/files/{reference}` +- DELETE - Remove a file from topic header -#### *2.5.2 Comment* #### +Long URL: /{version}/projects/{project_id}/topics/{guid}/revisions/{reference} + + +---------- + + +#### *Comment* #### [comment.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/comment.json) -Services: - GET, POST /V0.99/topics/{guid}/comments + GET, POST /{version}/topics/{guid}/comments - GET - Retrieve comments of a topic - POST - Add a new comment to a topic -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments +Long URL: /{version}/projects/{project_id}/topics/{guid}/comments GET, PUT, DELETE /V0.99/comments/{guid} @@ -334,7 +309,7 @@ Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments - PUT - Update a specific comment - DELETE - Delete a specific comment -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid} +Long URL: /{version}/projects/{project_id}/topics/{guid}/comments/{guid} GET, POST, DELETE /V0.99/comments/{guid}/viewpoint @@ -342,7 +317,7 @@ Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid} - POST - Assign a viewpoint to a comment - DELETE - Delete the viewpoint assigned to a comment -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid}/viewpoint +Long URL: /{version}/projects/{project_id}/topics/{guid}/comments/{guid}/viewpoint GET, POST, DELETE /V0.99/comments/{guid}/reply_to @@ -350,278 +325,103 @@ Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid}/view - POST - Add a replyTo comment relation to a comment - DELETE - Delete the replyTo comment relation on a comment -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid}/reply_to - - GET, POST /V0.99/comments/{guid}/attachments - -- GET - Retrieve the list of attachments on a comment -- POST - Add a new attachment to a comment +Long URL: /{version}/projects/{project_id}/topics/{guid}/comments/{guid}/reply_to -Long URL: /V0.99/ teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid}/attachments - GET, PUT, DELETE /V0.99/attachments/{guid} - -- GET - Retrieve a specific attachment -- PUT - Change a specific attachment -- DELETE – Delete a specific attachment +---------- -Long URL: /V0.99/ teams/{guid}/projects/{guid}/topics/{guid}/comments/{guid}/attachments/{guid} -#### *2.5.3 Viewpoint* #### +#### *Viewpoint* #### [viewpoint.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/viewpoint.json) -Services: - GET, POST /V0.99/topics/{guid}/viewpoints + GET, POST /{version}/topics/{guid}/viewpoints - GET - Retrieve viewpoints of a topic - POST - Add a new viewpoint to a topic -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/viewpoints +Long URL: /{version}/projects/{project_id}/topics/{guid}/viewpoints + - GET, PUT, DELETE /V0.99/viewpoints/{guid} + GET, PUT, DELETE /{version}/viewpoints/{guid} - GET - Retrieve a specific viewpoint - PUT - Modify a specific viewpoint - DELETE – Delete a specific viewpoint -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/viewpoints/{guid} +Long URL: /{version}/projects/{project_id}/topics/{guid}/viewpoints/{guid} - GET, POST, DELETE /V0.99/viewpoints/{guid}/bitmap + GET, POST, DELETE /{version}/viewpoints/{guid}/bitmap - GET - Retrieve the bitmap related to a viewpoint - PUT - Add a bitmap to the viewpoint - DELETE – Delete the bitmap of the viewpoint -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/viewpoints/{guid}/bitmap +Long URL: /{version}/projects/{project_id}/topics/{guid}/viewpoints/{guid}/bitmap -#### *2.5.4 Component* #### +#### *Component* #### [component.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/component.json) -Services: - GET, POST /V0.99/viewpoints/{guid}/components + GET, POST /{version}/viewpoints/{guid}/components - GET - Retrieve components of a viewpoint - POST - Add a new component to a viewpoint -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/viewpoints/{guid}/components +Long URL: /{version}/projects/{project_id}/topics/{guid}/viewpoints/{guid}/components - GET, PUT, DELETE /V0.99/components/{ifc_guid} + GET, PUT, DELETE /{version}/components/{ifc_guid} - GET - Retrieve a specific component - PUT - Modify a specific component - DELETE – Delete a specific component -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/viewpoints/{guid}/components/{ifcguid} +Long URL: /{version}/projects/{project_id}/topics/{guid}/viewpoints/{guid}/components/{ifc_guid} -#### *2.5.5 Related Topic* #### - [related_topic.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/related_topic.json) -Services: +---------- + - GET, POST /V0.99/topics/{guid}/related_topics +#### *Related Topic* #### + [related_topic.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/related_topic.json) + + GET, POST /{version}/topics/{guid}/related_topics - GET - Retrieve related topics to a topic - POST - Add a new related_topic to a topic -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/related_topics +Long URL: /{version}/projects/{project_id}/topics/{guid}/related_topics + + DELETE /{version}/topics/{guid}/related_topics/{guid} - DELETE /V0.99/topics/{guid}/related_topics/{guid} +- DELETE – Delete related topic -- DELETE – Delete a topic to topic relation +Long URL: /{version}/projects/{project_id}/topics/{guid}/related_topics/{guid} + + +---------- -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/related_topics/{guid} -#### *2.5.6 Document Reference* #### +#### *Document Reference* #### [document_reference.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/document_reference.json) -Services: - GET, POST /V0.99/topics/{guid}/document_references + GET, POST /{version}/topics/{guid}/document_references - GET - Retrieve documents referenced on a topic - POST - Add a new document reference to a topic -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/document_references +Long URL: /{version}/projects/{project_id}/topics/{guid}/document_references - DELETE /V0.99/topics/{guid}/document_references/{guid} + DELETE /{version}/topics/{guid}/document_references/{guid} - GET - Retrieve a document referenced on a topic - DELETE – Delete a document reference -Long URL: /V0.99/teams/{guid}/projects/{guid}/topics/{guid}/document_references/{guid} - -## 2.6 Attachment Services ## - -[attachment.json](https://raw.githubusercontent.com/BuildingSMART/BCF-API/master/Schemas/attachment.json) - -List of resources where a file can be attached: - -- project -- domain -- revision -- comment -- viewpoint - -Services: - - GET, POST /V0.99/...RESOURCE.../{guid}/attachments - -- GET - Retrieve the list of attachments on a resource -- POST - Add a new attachment to a resource - -Long URL: /V0.99/...RESOURCE.../{guid}/...RESOURCE.../{guid}/...../attachments - - GET, PUT, DELETE /V0.99/attachments/{guid} - -- GET - Retrieve a specific attachment -- PUT - Change a specific attachment -- DELETE – Delete a specific attachment - -Long URL: /V0.99/...RESOURCE.../{guid}/...RESOURCE.../{guid}/...../attachments/{guid} - - -## 2.7 User Services ## - -#### *2.7.1 Registration* #### - -To register a user, use the webplatform of the BIM – API server. - -#### *2.7.2 Roles* #### - -**Team-Owner:** Has all rights within a “Team and its “Projects” and “Domains” - -**BIM-Manager:** Has all rights within a “Project” and its “Domains” - -**Domain-Manager:** Has all rights within a “Domain” - -**Domain-User:** Has specific rights within a “Domain” - - -#### *2.7.2 Rights* #### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Team-OwnerBIM-ManagerDomain-ManagerDomain-User
assign, remove team userX
create, edit, delete projectXX
invite user to projectXX
view project (attachments)XX
create, edit, delete domainXX
view all domainsXX
assign user to domainXX
upload revision to domainXXX
view domainXXXX
add BCFXXXX
edit BCFXAuthorAuthorAuthor
delete BCFXAuthor & only last commentAuthor & only last commentAuthor & only last comment
- -#### *2.7.3 Membership* #### - -A user can be assigned to a *Team*, *Project* or *Domain*. - - GET, POST /V0.99/objects/{guid}/users - -- GET - Retrieve the list of users assigned to an object with their specific roles -- POST - Assign a user with its role to an object - -Long Url: - - - PUT, DELETE /V0.99/objects/{guid}/users/{user_id} - -- PUT - Change a user role on an object -- DELETE - Remove a user from an object - -Long Url: - - - GET /V0.99/users/{user_id} - -- GET - Retrieve a list of objects wher a user is assigned to with his specific roles - -Long Url: - +Long URL: /{version}/projects/{project_id}/topics/{guid}/document_references/{guid} ---------- diff --git a/Schemas/attachment.json b/Schemas/attachment.json deleted file mode 100644 index 99ee4b0..0000000 --- a/Schemas/attachment.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Attachment", - "description": "Attachment in BIM 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"}, - "reference": {"type": "string"}, - "description": {"type": "string"} - }, - "required": ["guid"] -} diff --git a/Schemas/comment.json b/Schemas/comment.json index 14cadf8..56d7712 100644 --- a/Schemas/comment.json +++ b/Schemas/comment.json @@ -23,7 +23,6 @@ }, "required": ["guid","status","date","author","comment","topic_guid"], "links": [ - {"rel": "viewpoints","href": "{guid}/viewpoints"}, - {"rel": "attachments","href": "{guid}/attachments"} + {"rel": "viewpoints","href": "{guid}/viewpoints"} ] } diff --git a/Schemas/component.json b/Schemas/component.json index f2309c7..9bcc494 100644 --- a/Schemas/component.json +++ b/Schemas/component.json @@ -3,14 +3,8 @@ "title": "Component", "description": "Schema for Component, BCF REST API. A viewpoint can have multiple components.", "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": { "ifc_guid": {"type": "string"}, - "guid": {"$ref": "#/definitions/guid"}, "selected": {"type": "boolean"}, "color": { "type": "string", @@ -18,10 +12,6 @@ }, "originating_system": {"type": "string"}, "authoring_tool_id": {"type": "string"} - }, - "required": ["guid"], - "links": [ - {"rel": "attachments","href": "{guid}/attachments"} - ] + } } diff --git a/Schemas/domain.json b/Schemas/domain.json deleted file mode 100644 index 5bd03b2..0000000 --- a/Schemas/domain.json +++ /dev/null @@ -1,34 +0,0 @@ - { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Domain", - "description": "Schema for Domain, BCF REST API. A project can have multiple domains.", - "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"}, - "name": {"type": "string"}, - "short_descr": {"type": "string"}, - "creator": {"$ref": "#/definitions/guid"}, - "created": { "type": "string", "format": "date-time" }, - "changed": { "type": "string", "format": "date-time" }, - "project_guid": {"$ref": "#/definitions/guid"}, - "rights": { - "type": "object", - "properties": { - "revision_add": { "type": "boolean" }, - "revision_delete": { "type": "boolean" }, - "revision_edit": { "type": "boolean" }, - "revision_view": { "type": "boolean" } - } - } - }, - "required": ["guid","name","project_guid"], - "links": [ - {"rel": "revisions","href": "{guid}/revisions"} - ] - } - diff --git a/Schemas/error.json b/Schemas/error.json new file mode 100644 index 0000000..0227b4c --- /dev/null +++ b/Schemas/error.json @@ -0,0 +1,19 @@ +{ + +"$schema": "http://json-schema.org/draft-04/schema#", + +"title": "Error", + +"description": "Schema for error, BCF REST API.", + +"type": "object", + +"properties": { + + "message": {"type": "string"} + +}, + +"required": ["message"] + +} diff --git a/Schemas/file.json b/Schemas/file.json new file mode 100644 index 0000000..f85cf71 --- /dev/null +++ b/Schemas/file.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "File", + "description": "File in BCF REST API. A topic can be related to multiple files.", + "type": "object", + "properties": { + "ifc_project": {"type": "string"}, + "ifc_spatial_structure_element": {"type": "string"}, + "file_name": {"type": "string"}, + "date": {"type": "string", "format": "date-time"}, + "reference": {"type": "string"} + } +} diff --git a/Schemas/link.json b/Schemas/link.json index f77a8ea..eb5a8b6 100644 --- a/Schemas/link.json +++ b/Schemas/link.json @@ -3,18 +3,14 @@ "title": "Link", "description": "Link schema. Links to available schemas in 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/domains","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/domains.json"}, - {"rel": "teams/projects/domains/revisions","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/revision.json"}, - {"rel": "teams/projects/topics", "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"}, - {"rel": "colours","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/colours.json"}, - {"rel": "attachments","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/attachment.json"} + {"rel": "projects","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/project.json"}, + {"rel": "projects/topics", "href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/topic.json"}, + {"rel": "projects/topics/files","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/file.json"}, + {"rel": "projects/topics/document_references","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/document_reference.json"}, + {"rel": "projects/topics/related_topics","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/related_topic.json"}, + {"rel": "projects/topics/comments","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/comment.json"}, + {"rel": "projects/topics/viewpoints","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/viewpoint.json"}, + {"rel": "projects/topics/viewpoints/components","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/component.json"}, + {"rel": "colours","href": "https://raw.github.com/BuildingSMART/BCF-API/master/Schemas/colours.json"} ] } \ No newline at end of file diff --git a/Schemas/project.json b/Schemas/project.json index cf6e915..857b9ef 100644 --- a/Schemas/project.json +++ b/Schemas/project.json @@ -1,55 +1,15 @@ - { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Project", - "description": "Schema for project, BCF REST API. A team can have multiple projects.", - "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"}, - "name": {"type": "string"}, - "short_descr": {"type": "string"}, - "creator": {"$ref": "#/definitions/guid"}, - "created": { "type": "string", "format": "date-time" }, - "changed": { "type": "string", "format": "date-time" }, - "team_guid": {"$ref": "#/definitions/guid"}, - "rights": { - "type": "object", - "properties": { - "project_admin": { "type": "boolean" }, - "project_delete": { "type": "boolean" }, - "project_edit": { "type": "boolean" }, - "domain_create": { "type": "boolean" } - } - } , - "domains": { - "type": "array", - "items": [ - {"type": "object", - "properties": { - "guid": {"$ref": "#/definitions/guid"}, - "name": {"type": "string"}, - "rights": { - "type": "object", - "properties": { - "revision_add": { "type": "boolean" }, - "revision_delete": { "type": "boolean" }, - "revision_edit": { "type": "boolean" }, - "revision_view": { "type": "boolean" } - } - } - } - } - ] - } - }, - "required": ["guid","name","team_guid"], - "links": [ - {"rel": "domains","href": "{guid}/domains"}, - {"rel": "attachments","href": "{guid}/attachments"}, - {"rel": "thumbnail", "href": "{guid}/bitmap","mediaType": "image/*"} - ] - } \ No newline at end of file + { + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Project", + "description": "Schema for project, BCF REST API.", + "type": "object", + "properties": { + "project_id": {"type": "string"}, + "name": {"type": "string"}, + "extension_schema": {"type": "string"}, + "links": [ + {"rel": "topics", "href": "{guid}/topics"}, + {"rel": "extension", "href": "{guid}/extension"} + ] + } +} \ No newline at end of file diff --git a/Schemas/revision.json b/Schemas/revision.json deleted file mode 100644 index 59561d8..0000000 --- a/Schemas/revision.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Revision", - "description": "Revision in BCF REST API. A topic can be related to multiple revisions.", - "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"}, - "topology": {"$ref": "#/definitions/guid"}, - "domain_guid": {"$ref": "#/definitions/guid"}, - "ifc_project": {"type": "string"}, - "ifc_spatial_structure_element": {"type": "string"}, - "file_name": {"type": "string"}, - "date": {"type": "string", "format": "date-time"}, - "reference": {"type": "string"} - }, - "required": ["guid", "domain_guid"], - "links": [ - {"rel": "attachments","href": "{guid}/attachments"} - ] -} diff --git a/Schemas/team.json b/Schemas/team.json deleted file mode 100644 index f786ea7..0000000 --- a/Schemas/team.json +++ /dev/null @@ -1,48 +0,0 @@ - { - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Team", - "description": "Schema for team. A team is the root node in 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"}, - "slug": {"type": "string"}, - "name": {"type": "string"}, - "display_name": {"type": "string"}, - "owner": {"$ref": "#/definitions/guid"}, - "total_storage": {"type": "integer"}, - "storage_stats": { - "type": "object", - "properties": { - "used_space": {"type": "integer"}, - "number_of_projects": { "type": "integer" }, - "number_of_members": { "type": "integer" }, - "total_space": { "type": "integer" }, - "total_number_of_projects": { "type": "integer" }, - "total_number_of_members": { "type": "integer" } - } - }, - "status": {"type": "string"}, - "public": { - "type": "object", - "properties": { - "read": { "type": "boolean" }, - "write": { "type": "boolean" } - } - }, - "rights": { - "type": "object", - "properties": { - "project_create": { "type": "boolean" } - } - } - }, - "required": ["guid","name","display_name","owner","total_storage"], - "links": [ - {"rel": "projects","href": "{guid}/projects"} - ] - } \ No newline at end of file diff --git a/Schemas/topic.json b/Schemas/topic.json index b9b1aca..05547ce 100644 --- a/Schemas/topic.json +++ b/Schemas/topic.json @@ -42,8 +42,8 @@ "links":[ { - "rel": "revisions", - "href": "{guid}/revisions" + "rel": "files", + "href": "{guid}/files" }, { "rel": "document_references", @@ -60,12 +60,7 @@ { "rel": "viewpoints", "href": "{guid}/viewpoints" - }, - - { - "rel": "attachments", - "href": "{guid}/attachments" - } + } ] } diff --git a/Schemas/viewpoint.json b/Schemas/viewpoint.json index bc2f15b..14a874a 100644 --- a/Schemas/viewpoint.json +++ b/Schemas/viewpoint.json @@ -144,9 +144,7 @@ }, "required": ["guid"], "links": [ - {"rel": "comments","href": "{guid}/comments"}, {"rel": "components","href": "{guid}/components"}, - {"rel": "attachments","href": "{guid}/attachments"}, {"rel": "bitmap","href": "{guid}/bitmap"} ] } diff --git a/Schemas_XSD/attachment.xsd b/Schemas_XSD/attachment.xsd deleted file mode 100644 index 7ff03a8..0000000 --- a/Schemas_XSD/attachment.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/colors.xsd b/Schemas_XSD/colors.xsd deleted file mode 100644 index ee20010..0000000 --- a/Schemas_XSD/colors.xsd +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/Schemas_XSD/comment.xsd b/Schemas_XSD/comment.xsd deleted file mode 100644 index 9594d30..0000000 --- a/Schemas_XSD/comment.xsd +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/component.xsd b/Schemas_XSD/component.xsd deleted file mode 100644 index 8dbdb73..0000000 --- a/Schemas_XSD/component.xsd +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/document_reference.xsd b/Schemas_XSD/document_reference.xsd deleted file mode 100644 index c35305f..0000000 --- a/Schemas_XSD/document_reference.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/domain.xsd b/Schemas_XSD/domain.xsd deleted file mode 100644 index 5208be9..0000000 --- a/Schemas_XSD/domain.xsd +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/project.xsd b/Schemas_XSD/project.xsd deleted file mode 100644 index 41e65ad..0000000 --- a/Schemas_XSD/project.xsd +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/related_topic.xsd b/Schemas_XSD/related_topic.xsd deleted file mode 100644 index 2b997c4..0000000 --- a/Schemas_XSD/related_topic.xsd +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/revision.xsd b/Schemas_XSD/revision.xsd deleted file mode 100644 index daf9274..0000000 --- a/Schemas_XSD/revision.xsd +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/team.xsd b/Schemas_XSD/team.xsd deleted file mode 100644 index 1a27ab9..0000000 --- a/Schemas_XSD/team.xsd +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/topic.xsd b/Schemas_XSD/topic.xsd deleted file mode 100644 index fda2a4e..0000000 --- a/Schemas_XSD/topic.xsd +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/version.xsd b/Schemas_XSD/version.xsd deleted file mode 100644 index ef95781..0000000 --- a/Schemas_XSD/version.xsd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Schemas_XSD/viewpoint.xsd b/Schemas_XSD/viewpoint.xsd deleted file mode 100644 index e104cf2..0000000 --- a/Schemas_XSD/viewpoint.xsd +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -