All endpoints expect an Authorization
header in the following format:
Authorization: Bearer <your token here>
Refer to the token generation documentation if you are unsure how to generate a token.
GET app.visibuild.com.au/api/v2/projects
Returns basic information on all active projects, including IDs and names. IDs are universally unique and do not change over time.
Example response
{
"data": {
"projects": [
{
"id": "00000000-0000-0000-000000000000",
"name": "Example Project"
},
{
"id": "00000000-0000-0000-000000000001",
"name": "Example Project 2"
}
]
}
}
GET app.visibuild.com.au/api/v2/projects/visi-counts
Returns a paginated list of projects with Visi counts grouped by type and status. There are 8 keys for each set of counts: the 6 statuses plus complete
and total
. complete
is always the sum of na
, cantClose
, and closed
and provided for convenience.
total
will always be the sum of all 6 statuses.
skippedHoldPoints
counts the number of hold points across the entire project that have been skipped. That is, hold points that originated in a template that were still incomplete when a Visi that occurs after it in the template was completed. For example:
โ
Example response
{
"data": {
"projects": [
{
"id": "00000000-0000-0000-000000000000",
"name": "Example Project",
"visiCounts": {
"inspection": {
"open": 0,
"inProgress": 0,
"inReview": 0,
"closed": 0,
"na": 0,
"cantClose": 0,
"complete": 0,
"total": 0
},
"task": {...},
"incorrectWorks": {...},
"ncr": {...},
"defect": {...},
"incompleteWorks": {...},
"holdPoint": {...},
"witnessPoint": {...}
},
"skippedHoldPoints": 0
},
... (4 more projects)
]
},
"pagination": {
"pageSize": 5,
"next": "00000000-0000-0000-000000000005"
}
}
Fetch the next page by appending ?next=<id>
to the URL. Refer to the pagination documentation for more information.
GET app.visibuild.com.au/api/v2/projects/:projectId/locations
Returns complete list of all locations in a given project. :projectId
matches the id
keys corresponding to projects in other endpoints. Consider the following project structure:
Example response
{
"data": {
"locations": [
{
"id": "00000000-0000-0000-000000000000",
"name": "Project",
"order": 1,
"parentLocationId": null,
"childLocationIds": [
"00000000-0000-0000-000000000001"
],
"pathName": "Project"
},
{
"id": "00000000-0000-0000-000000000001",
"name": "Area 1",
"order": 1,
"parentLocationId": "00000000-0000-0000-000000000000"
"childLocationIds": [
"00000000-0000-0000-000000000002",
"00000000-0000-0000-000000000003"
],
"pathName": "Project / Area 1"
},
{
"id": "00000000-0000-0000-000000000002",
"name": "Silo 1",
"order": 1,
"parentLocationId": "00000000-0000-0000-000000000001",
"childLocationIds": [],
"pathName": "Project / Area 1 / Silo 1"
},
{
"id": "00000000-0000-0000-000000000003",
"name": "Silo 2",
"order": 2,
"parentLocationId": "00000000-0000-0000-000000000001",
"childLocationIds": [],
"pathName": "Project / Area 1 / Silo 2"
}
]
}
}
order
is an integer that represents where the location is ordered relative to its siblings.
parentLocationId
will always be null
for the root location; all other locations should have a parent.
childLocationIds
is a flat array of the IDs of immediate child locations.
pathName
is a serialised string representing the location and all ancestor locations up to the root, delimited by /
.
GET /api/v2/projects/:projectId/locations/:locationId/visi-counts
Returns same information as :projectId/locations
plus Visi status counts. The difference is that you only get the requested location and immediate children.
Example response
{
"data": {
"locations": [
{
"id": "00000000-0000-0000-000000000000",
"name": "Project",
"order": 1,
"parentLocationId": null,
"childLocationIds": [
"00000000-0000-0000-000000000001"
],
"pathName": "Project",
"visiCounts": {...}
},
{
"id": "00000000-0000-0000-000000000001",
"name": "Area 1",
"order": 1,
"parentLocationId": "00000000-0000-0000-000000000000"
"childLocationIds": [
"00000000-0000-0000-000000000002",
"00000000-0000-0000-000000000003"
],
"pathName": "Project / Area 1"
"visiCounts": {...}
}
]
}
}