Get defect
curl --request GET \
--url https://api.buildpass.global/builders/{builderId}/defects/{defectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.buildpass.global/builders/{builderId}/defects/{defectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.buildpass.global/builders/{builderId}/defects/{defectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buildpass.global/builders/{builderId}/defects/{defectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buildpass.global/builders/{builderId}/defects/{defectId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buildpass.global/builders/{builderId}/defects/{defectId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildpass.global/builders/{builderId}/defects/{defectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "defect_extapidefect01",
"builderId": "buil_clgbsb90b001qjy0f0eo1hspp",
"projectId": "proj_clgbsb90b001qjy0f0eo1hscp",
"projectName": "Downtown Mall Construction",
"number": 1,
"title": "Damaged wall finish",
"description": "Repair the damaged wall finish on Level 1.",
"status": "TO_DO",
"priority": "LOW",
"type": "BUILDER_DEFECT",
"dueDate": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"location": {
"id": "loc_extapiprojectlocation01",
"name": "Level 1",
"parentId": "loc_extapiprojectlocation00"
},
"assigner": {
"id": "user_clgbsb90b001qjy0f0eo1hsau",
"name": "Alex Builder"
},
"assignees": [
{
"type": "USER",
"id": "wkr_fsf1r0nqlcirkxlz1gzbw7oh",
"name": "John Smith"
}
],
"attachments": [
{
"id": "extapidefectattachment01",
"fileName": "defect-photo.jpg",
"contentType": "image/jpeg",
"url": "<string>"
}
],
"distributedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"fieldName": "name",
"message": "This field is required."
}
]
}Defects
Get defect
Get one defect for a builder.
GET
/
builders
/
{builderId}
/
defects
/
{defectId}
Get defect
curl --request GET \
--url https://api.buildpass.global/builders/{builderId}/defects/{defectId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.buildpass.global/builders/{builderId}/defects/{defectId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.buildpass.global/builders/{builderId}/defects/{defectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.buildpass.global/builders/{builderId}/defects/{defectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.buildpass.global/builders/{builderId}/defects/{defectId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.buildpass.global/builders/{builderId}/defects/{defectId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.buildpass.global/builders/{builderId}/defects/{defectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "defect_extapidefect01",
"builderId": "buil_clgbsb90b001qjy0f0eo1hspp",
"projectId": "proj_clgbsb90b001qjy0f0eo1hscp",
"projectName": "Downtown Mall Construction",
"number": 1,
"title": "Damaged wall finish",
"description": "Repair the damaged wall finish on Level 1.",
"status": "TO_DO",
"priority": "LOW",
"type": "BUILDER_DEFECT",
"dueDate": "2023-11-07T05:31:56Z",
"tags": [
"<string>"
],
"location": {
"id": "loc_extapiprojectlocation01",
"name": "Level 1",
"parentId": "loc_extapiprojectlocation00"
},
"assigner": {
"id": "user_clgbsb90b001qjy0f0eo1hsau",
"name": "Alex Builder"
},
"assignees": [
{
"type": "USER",
"id": "wkr_fsf1r0nqlcirkxlz1gzbw7oh",
"name": "John Smith"
}
],
"attachments": [
{
"id": "extapidefectattachment01",
"fileName": "defect-photo.jpg",
"contentType": "image/jpeg",
"url": "<string>"
}
],
"distributedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errors": [
{
"fieldName": "name",
"message": "This field is required."
}
]
}Requires
read:defects. Returns one defect for the authenticated builder. The
defectId path parameter is the defect_-prefixed ID returned by the list
endpoint.Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Example:
"buil_clgbsb90b001qjy0f0eo1hspp"
The defect_-prefixed defect ID
Example:
"defect_extapidefect01"
Response
The defect
A defect_-prefixed defect ID
Example:
"defect_extapidefect01"
Example:
"buil_clgbsb90b001qjy0f0eo1hspp"
Example:
"proj_clgbsb90b001qjy0f0eo1hscp"
Example:
"Downtown Mall Construction"
The human-facing sequence number within the project and defect type
Example:
1
Example:
"Damaged wall finish"
Example:
"Repair the damaged wall finish on Level 1."
Available options:
TO_DO, IN_PROGRESS, WAITING_REVIEW, BLOCKED, RESOLVED, CANCELLED Available options:
LOW, MEDIUM, HIGH, CRITICAL Builder-defined defect type
Example:
"BUILDER_DEFECT"
Show child attributes
Show child attributes
The assigning admin user, identified by a user_-prefixed ID
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes