I have done “Intro Labs” series for some products’ API in the past. Occasionally I was asked if there is a similar one for Field API or planning to make one. So here it is. I’m going to write about the introduction to Field API in the next few posts.
That being said, I should add a disclaimer before I proceed with writing; Field API is still under discussion about its supportability. We don’t have good documentation and samples, yet. For example, there is no comprehensive API samples like SDK Test Harness or Sample Web App for Glue. You will probably find some discrepancy in the current online documentation. (There is some historical reasons that we have the API which supports a certain set of functionalities. But this will be a different discussion.) We hope this will improve as the API matures in future. For the time being, we appreciate your patience.
Enough is said, let’s talk about the labs. The intro labs are intended to be exercises to learn Field API for people who is new to the File API. (If you happen to have used Glue API Intro, and View and Data API Intro labs that I wrote, the idea is exactly the same. In fact, I’m following the same format.)
The labs include four incremental code projects. Starting from Lab 1, we learn the basics of Field API:
- Lab1 “Hello Field World” – this is THE minimum project which shows sign-in REST call. If you are new to the REST API, this lab will give you a pretty good picture of what REST API is like and how to use them.
- Lab2 “Field API Intro” – this lab shows how to retrieve project names and issues, and create a new issue.
- Lab3 “Field API Web Intro” – we then convert a client win forms application written in Lab 2 to a web application.
- Lab4 “Field API Web Intro Ex” – (extra bonus lab) we add a simple chart to report the number of issues.
Note that the last lab’s reporting functionality is not a part of Field API itself. I added this as I hear that reporting or “health monitoring” of a project is one of commonly discussed use case of Field API. (Apart from that, it also adds colors to the lab 🙂
All projects are minimum for clarity and focusing on understanding the logic of Field API for learning purposes. They are written in C#, ASP.NET. After the Lab4, the final application looks like below:
You can download the source code from here: Download Field API Intro Labs
Here are a few links about Field API as reference. You may want to take a look to get a big picture:
- BIM 360 SDK: Part 1-BIM 360 Field API – detailed overview of Field API by Manu Venugopal
- BIM 360 Field API Doc – online reference doc for Field API
Next: Lab1 “Hello Field World”