Observation API
APIs for Observations, use https://app.guardiansafetysoftware.com/ as base path
Version: 1.0
/guardian/v1/api/observation
GET
Summary:
Get Observations in pages
Description:
The API returns the observations based on the filter criteria. The API can be invoked using curl like below:
curl -X GET "https://app.guardiansafetysoftware.com/guardian/v1/api/observation?page=1&size=10&sortBy=id&sortOrder=A&fromDate=2024-01-01&toDate=2024-01-31&fromId=1&toId=100&observer=user1&status=C&name=safety" -H "api-key: 73a8a9a5-8ef3-4965-9694-ab6be2489be5" -H "tenantID: tenant1"
Output: The response includes the following fields:
- content: The actual content of the page. List of observation objects (refer to the Get Observation by ID API for the observation object structure).
- pageable: The pagination information.
- totalPages: The total number of pages.
- totalElements: The total number of elements.
- last: Whether the current page is the last one.
- first: Whether the current page is the first one.
- number: The current page number (0-based).
- size: The number of elements in the page.
- numberOfElements: The number of elements currently on this page.
- empty: Whether the page is empty.
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
api-key | header | API Key | Yes | string |
tenantID | header | Tenant ID | Yes | string |
page | query | Page number, default is 1 | No | integer |
size | query | Page size, default is 10 | No | integer |
sortBy | query | Sort by | No | string |
sortOrder | query | sort order, A for ascending and D for descending | No | string |
fromDate | query | specify a start date in the format yyyy-MM-dd | No | string |
toDate | query | specify an end date in the format yyyy-MM-dd | No | string |
fromId | query | From observation ID | No | integer |
toId | query | To observation ID | No | integer |
observer | query | Observer username | No | string |
status | query | specify observation status either C for Complete or O for Open | No | string |
name | query | return observations that contains the given string in the name | No | string |
Responses
Code | Description |
---|---|
200 | Observations found |
401 | Unauthorized |
/guardian/v1/api/observation/id/{id}
GET
Summary:
Get Observation by ID
Description:
The API returns the observation details for the given observation ID. The API can be invoked using curl like below:
curl -X GET "https://app.guardiansafetysoftware.com/guardian/v1/api/observation/id/1234" -H "api-key: 73a8a9a5-8ef3-4965-9694-ab6be2489be5" -H "tenantID: tenant1"
Output
{
"observationID": integer,
"observationName": "string",
"templateName": "string",
"description": "string",
"timeZone": "string",
"displayDate": "string",
"modifiedOn": "string",
"createdOn": "string",
"state": "string",
"observer": {
"name": "string",
"email": "string",
"formattedName": "string"
},
"project": "string",
"contractor": "string",
"fields": [
{
"rowNo": "string",
"columnNo": "string",
"section": "string",
"elementName": "string",
"elementType": "string",
"control": {
"label": "string",
"type": "string",
"value": "string",
"modelValue": "string",
"file": [
"string"
],
"qualifiers": {
"qualifierElements": [
{
"name": "string",
"notes": "string",
"followUpNotes": "string",
"file": [
"string"
],
"qualifierCategory": [
{
"name": "string",
"checked": boolean
}
]
}
]
}
},
"controls": [
{
"label": "string",
"type": "string",
"value": "string",
"modelValue": "string",
"file": [
"string"
],
"qualifiers": {
"qualifierElements": [
{
"name": "string",
"notes": "string",
"followUpNotes": "string",
"file": [
"string"
],
"qualifierCategory": [
{
"name": "string",
"checked": boolean
}
]
}
]
}
}
]
}
]
}
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
id | path | Observation ID | Yes | integer |
api-key | header | API Key | Yes | string |
tenantID | header | Tenant ID | Yes | string |
Responses
Code | Description |
---|---|
200 | Observation found |
401 | Unauthorized |
404 | Observation not found |
/guardian/v1/api/observation/header
GET
Summary:
Get Observations in pages
Description:
The API returns the observations header info based on the filter criteria. The API can be invoked using curl like below:
curl -X GET "https://app.guardiansafetysoftware.com/guardian/v1/api/observation/header?page=1&size=10&sortBy=id&sortOrder=A&fromDate=2024-01-01&toDate=2024-01-31&fromId=1&toId=100&observer=user1&status=C&name=safety" -H "api-key: 73a8a9a5-8ef3-4965-9694-ab6be2489be5" -H "tenantID: tenant1"
Output: The response includes the following fields:
-
content: The actual content of the page. List of observation header objects.
-
pageable: The pagination information.
-
totalPages: The total number of pages.
-
totalElements: The total number of elements.
-
last: Whether the current page is the last one.
-
first: Whether the current page is the first one.
-
number: The current page number (0-based).
-
size: The number of elements in the page.
-
numberOfElements: The number of elements currently on this page.
-
empty: Whether the page is empty.
{
"observationID": integer,
"observationName": "string",
"templateName": "string",
"description": "string",
"timeZone": "string",
"displayDate": "string",
"modifiedOn": "string",
"createdOn": "string",
"state": "string",
"observer": {
"name": "string",
"email": "string",
"formattedName": "string"
},
"project": "string",
"contractor": "string",
}
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
api-key | header | API Key | Yes | string |
tenantID | header | Tenant ID | Yes | string |
page | query | Page number, default is 1 | No | integer |
size | query | Page size, default is 10 | No | integer |
sortBy | query | Sort by | No | string |
sortOrder | query | sort order, A for ascending and D for descending | No | string |
fromDate | query | specify a start date in the format yyyy-MM-dd | No | string |
toDate | query | specify an end date in the format yyyy-MM-dd | No | string |
fromId | query | From observation ID | No | integer |
toId | query | To observation ID | No | integer |
observer | query | Observer username | No | string |
status | query | specify observation status either C for Complete or O for Open | No | string |
name | query | return observations that contains the given string in the name | No | string |
Responses
Code | Description |
---|---|
200 | Observations found |
401 | Unauthorized |