Skip to main content

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
NameLocated inDescriptionRequiredSchema
api-keyheaderAPI KeyYesstring
tenantIDheaderTenant IDYesstring
pagequeryPage number, default is 1Nointeger
sizequeryPage size, default is 10Nointeger
sortByquerySort byNostring
sortOrderquerysort order, A for ascending and D for descendingNostring
fromDatequeryspecify a start date in the format yyyy-MM-ddNostring
toDatequeryspecify an end date in the format yyyy-MM-ddNostring
fromIdqueryFrom observation IDNointeger
toIdqueryTo observation IDNointeger
observerqueryObserver usernameNostring
statusqueryspecify observation status either C for Complete or O for OpenNostring
namequeryreturn observations that contains the given string in the nameNostring
Responses
CodeDescription
200Observations found
401Unauthorized

/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
NameLocated inDescriptionRequiredSchema
idpathObservation IDYesinteger
api-keyheaderAPI KeyYesstring
tenantIDheaderTenant IDYesstring
Responses
CodeDescription
200Observation found
401Unauthorized
404Observation 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
NameLocated inDescriptionRequiredSchema
api-keyheaderAPI KeyYesstring
tenantIDheaderTenant IDYesstring
pagequeryPage number, default is 1Nointeger
sizequeryPage size, default is 10Nointeger
sortByquerySort byNostring
sortOrderquerysort order, A for ascending and D for descendingNostring
fromDatequeryspecify a start date in the format yyyy-MM-ddNostring
toDatequeryspecify an end date in the format yyyy-MM-ddNostring
fromIdqueryFrom observation IDNointeger
toIdqueryTo observation IDNointeger
observerqueryObserver usernameNostring
statusqueryspecify observation status either C for Complete or O for OpenNostring
namequeryreturn observations that contains the given string in the nameNostring
Responses
CodeDescription
200Observations found
401Unauthorized