Who is this for: Architects, engineers, vendors and developers involved with building energy analysis who have software development skills.
Takeaway: This is a follow up post on GBS API. A typical or manual building performance analysis workflow to solve a real world problem usually will take days if not weeks. One example is provided to solve a real world building performance analysis problem using GBS API within just a few minutes.
Author: Barry Tsai - Software Development Manager, BPA, Autodesk, Inc.
Barry works for Autodesk as the software development manager in the Building Performance Analysis (BPA)group. He holds a Master of Science degree in engineering from U.C. Berkley. Barry has a background in software development for both desktop and cloud-based solutions and he is a certified Microsoft System Engineer and Developer.
Link to First Article: Green Building Studio API Part I
Article:
This is to follow up to my first post about GBS API that is now available through the Autodesk Developer Network, and if you are a member, the SDK can be downloaded here. An example is provided on how to use GBS and its API to solve a real world building performance problem using the API. Recall from the last post, GBS API follows the REST calling style. To create a project in GBS, one can use the create project API in the following REST form:
Create Project API
The Create Project API provides GBS client developers a facility for creating a new project in their account.
Making the request
To access the Create Project API , use:
https://gbs.autodesk.com/gbs/api/v1/project/create/responseFormat |
where responseFormat may be either of the following values:
- json indicates output in JavaScript Object Notation (JSON)
- xml indicates output as XML
if resposeFormat is omitted, the output will default to XML.
Request Method
POST
Parameters
- Title- Title for this new run
- Values: string (50 chars max)
- Required: Yes
- Demo - true if its test project false if its a real project
- Values: boolean
- Required: Yes
- BuildingTypeId- see Building Type API
- Values: integer
- Required: Yes
- ScheduleId- see Schedule List API
- Values: integer
- Required: Yes
- Latitude - location
- Values: double
- Required: Yes
- Longitude - location
- Values: double
- Required: Yes
- ElecCost- electric cost see Default Utility Cost API
- Values: float
- Required: No (If no value the default utility cost is used)
- FuelCost - fuel cost see Default Utility Cost API
- Values: float
- Required: No (If no value the default utility cost is used)
- CultureInfo - unit cost (example en-us)
- Values: string
- Required: No (If no value "en-use" is used.
Create Project Responses
Create Project API responses are returned in the format indicated in the responseFormat within the request URL.
JSON Output Example
100
XML Output Example
<int xmlns="http://schemas.microsoft.com/2003/10/Serialization/">100</int>
Sample code from SDK
A typical or manual building performance analysis workflow to solve a real world problem usually will take days if not weeks. The following example shows how one can use GBS and its API to solve a real world BPA problem in just a few minutes. You can easily develop this program using the SDK sample code we provided in ADN website (Autodesk ADN access is required to get access to this site and download the SDK). There is already utility libraries encapsulating the routine to mange the REST call to GBS server. There are only a few lines of code to string together this example workflow.
Are you interested in using our API? Are you a developer who is interested in providing building performance analysis solutions that can potentially change this industry? To give us more feedback or to participate in this program, please submit a request with the title “GBS: interested in pilot program” via e-mail to [email protected]. In your email, please provide the following information:
▪ Company name
▪ Main contact person’s name
▪ Email address
▪ ADN Developer ID
▪ Brief description of intention
After receiving your request, we will contact you with more information.
We would really like to hear your thoughts on the GBS API – do you find it interesting and would you use it or encourage developers you work with to use it?
Comments