CreateBuilding Documentation
CreateBuilding
Draft documentation version
Documentation is partial and not validated !
Description
Version | V1 |
---|---|
Require User context | |
Authorization | |
Errors |
Request
Route
Parameters
Parameter | Required | Sample | Description |
---|---|---|---|
WAC | WAC123456789012 | Code of BusinessAccount | |
BuildingTypeLibraryID | 2 | ID of BuildingTypeLibrary | |
Code | MyBuildingCode | Your Infrastructure internal code | |
Description | My Buildingdescription | Infrastructure description | |
Name | My Building name | Infrastructure name | |
ParentInfrastructureID | 4 | ID of parent InfrastructureBase. Leave empty if no parent | |
Surface | 235 | Building surface (M2) |
Remarks
- To override Content-type in your clients HTTP Accept Header, append the
.jsv
suffix or?format=jsv
- To embed the response in a jsonp callback, append
?callback=myCallback
Post Data sample
POST /jsv/reply/CreateBuilding HTTP/1.1
Host: localhost
Content-Type: text/jsv
Content-Length: length
{
wType: CreateBuilding,
surface: 0,
name: String,
description: String,
code: String,
parentInfrastructureID: 0,
wac: String
}
cURL command sample
curl -k -H "Authorization: Bearer [YOUR_ACCESS_TOKEN]" -H "Content-Type:application/jsv" -X POST -d @filename.jsv https://api.wit-datacenter.com/WAC123456789012/Infrastructure/Building
Remark
@filename.jsv
contain your request parameters serialized in JSV as described in Post Data sample bottom
Response
Returned Entity
Created BuildingJSV Sample
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { wType: Building, surface: 0, parentInfrastructureID: 0, description: String, code: String, creationDate: 0001-01-01, updateDate: 0001-01-01, id: 0, picture: 00000000000000000000000000000000, name: String }