Source
GET <qbench-url>/qbench/api/v1/source/{sourceId}
Will retrieve a Source by its ID.
Example Request:
GET /qbench/api/v1/source/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example Response:
{
"custom_formatted_id":"1",
"customer_ids":[1,2,4],
"date_of_birth":"10/01/2020",
"description":"This is a source",
"display_name":"Mr. John R. Smith",
"first_name":"John",
"id":1,
"identifier":"333222",
"lab_id":"123",
"last_name":"Smith",
"last_updated":"1602800331",
"latitude":12321.0,
"longitude":99874.0,
"project":{
"custom_formatted_id":null,
"date_completed":"08/04/2020",
"date_started":"08/06/2020",
"estimated_complete_date":"08/26/2020",
"id":5,
"last_updated":"1597699308",
"percent_completion":44,
"result":"2456",
"title":"QBench Project"
},
"project_id":5,
"tags":[],
}
GET <qbench-url>/qbench/api/v1/source?page_num={pageNum}&page_size={pageSize}
Will retrieve a paginated list of Source. Maximum page size is 50.
Example Request:
GET /qbench/api/v1/source?page_num=1&page_size=50 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example Response:
{
"total_count": 75,
"total_pages": 2,
"data":
[
}
"custom_formatted_id":"1",
"customer_ids":[1,2,4],
"date_of_birth":"10/01/2020",
"description":"This is a source",
"display_name":"Mr. John R. Smith",
"first_name":"John",
"id":1,
"identifier":"333222",
"lab_id":"123",
"last_name":"Smith",
"tags":[],
},
{
"custom_formatted_id":"2",
"customer_ids":[1,3,4],
"date_of_birth":"10/01/2020",
"description":"This is a source as well",
"display_name":"Mrs. Jane L. Smith",
"first_name":"Jane",
"id":2,
"identifier":"333222",
"lab_id":"123",
"last_name":"Smith",
"tags":[],
},
...
]
}
Currently available filter params:
display_name:
- Will retrieve the Sources that match or are similar in specified value.
customer_ids:
- Will retrieve Sources only where its associated Customer's ID matches one of the specified Customer's IDs.
project_ids:
- Will retrieve Sources only where its associated Project's ID matches one or more of the specified Project's IDs.
identifier:
- Will retrieve the Sources that match or are similar in specified value.
lab_id:
- Will retrieve the Sources that match or are similar in specified value.
last_updated:
- Will retrieve Sources that was last updated.
POST /source
Will create a new Source. Display Name is required.
Example Request
POST /qbench/api/v1/source HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"first_name": "John",
"last_name": "Smith",
"display_name": "Mr. John R. Smith",
"lab_id":"1235678"
}
Example Response:
{"id":1}
PUT<qbench-url>/qbench/api/v1/source/<source_id>
Example Request:
PUT /qbench/api/v1/source/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"first_name":"Johnny"
}
Example Response:
{"message":"OK"}
DELETE <qbench-url>/qbench/api/v1/source/<source_id>
Will delete a Source.
Example Request:
DELETE /qbench/api/v1/source/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example Response:
{"message":"OK"}
Comments
0 comments
Please sign in to leave a comment.