/v1/facilities/{facility_id}/inspections/summaryAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request GET \
--url 'https://api.staging.facily.ai/v1/facilities/<FACILITY_ID>/inspections/summary' \
--header "Authorization: Bearer $FACILY_API_KEY"Try a request
Staging · read-onlyExplore your organization with a read-only request to staging.
Parameters
facility_idpath · string | stringrequiredFormat: uuid
monthquery · string | nullThe month to count, as YYYY-MM. Omitted, each facility counts its own current month, and the answer's month is null under all or for an id that names no facility, which reads zeros.
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"completed": 0,
"issues_found": 0,
"month": "string",
"open": 0,
"overdue": 0,
"pass_rate": "<VALUE_MATCHING_PATTERN>",
"total": 0
},
"meta": {
"request_id": "string"
}
}application/json
dataInspectionSummaryResponserequiredThe month figures: the rounds scheduled in a month, and the rounds overdue in any month.
Show data schema
completedintegerrequiredThe month's completed rounds.
issues_foundintegerrequiredThe issues found over the month's completed rounds.
monthstring | nullrequiredThe month counted, as YYYY-MM. A month asked for is always echoed. With none asked for it is null under all, because each facility then counts its own, and for an id that names no facility.
Show month schema
string | nullThe month counted, as YYYY-MM. A month asked for is always echoed. With none asked for it is null under all, because each facility then counts its own, and for an id that names no facility.
Variant 1: string
stringVariant 2: null
nullopenintegerrequiredThe month's rounds not yet completed: scheduled or in progress.
overdueintegerrequiredEvery scheduled or in-progress round past its date at its facility, whatever its month.
pass_ratestring | nullrequiredThe share of the month's completed rounds that found no issue, as a decimal string from 0 to 1 to four places, such as 0.8750. Null when none is completed.
Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
Show pass_rate schema
string | nullThe share of the month's completed rounds that found no issue, as a decimal string from 0 to 1 to four places, such as 0.8750. Null when none is completed.
Variant 1: string
stringVariant 2: null
nulltotalintegerrequiredThe month's rounds that are not cancelled.
metaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired