Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/inspection-forms"
method: GET
headers:
Accept: application/json
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
[
{
"id": "inspection_form_9Kd2Lm7Aq1",
"name": "Pre-trip DVIR",
"description": "Daily vehicle inspection report, filed before the first run.",
"type": "dvir",
"status": "published",
"items": [],
"grouped_fields": [
{
"id": "category_4Tn6Ry8Wz3",
"name": "Safety",
"description": null,
"order": 1,
"meta": { "grid_size": 2 },
"fields": [
{
"id": "custom_field_9f61c8b7a6",
"name": "brakes",
"label": "Brakes",
"description": null,
"help_text": "Check the pedal travel.",
"type": "pass-fail",
"component": "pass-fail",
"required": true,
"editable": true,
"options": [],
"order": 1,
"meta": {
"severity": "critical",
"require_comment_on_fail": true,
"require_photo_on_fail": true,
"unsafe_on_fail": true
}
},
{
"id": "custom_field_8a521d9f3b",
"name": "odometer",
"label": "Odometer",
"description": null,
"help_text": null,
"type": "number",
"component": "number",
"required": false,
"editable": true,
"options": [],
"order": 2,
"meta": { "unit": "km", "role": "odometer" }
}
]
}
],
"settings": { "create_issue_on_failure": true, "create_work_order_on_failure": false },
"meta": {},
"subject_name": null,
"item_count": 2,
"is_published": true,
"published_at": "2026-09-01T00:00:00.000000Z",
"updated_at": "2026-09-01T00:00:00.000000Z",
"created_at": "2026-08-28T00:00:00.000000Z"
}
]
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/inspections"
method: GET
headers:
Accept: application/json
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
[
{
"id": "inspection_submission_4Mnp8Qx2Vz",
"form": { "id": "inspection_form_9Kd2Lm7Aq1", "name": "Pre-trip DVIR", "type": "dvir" },
"vehicle": { "id": "vehicle_7Hx3Pq9Rt2", "plate_number": "TRK-7" },
"driver": { "id": "driver_2Fb8Nc4Wm6", "name": "Dana Driver" },
"issue": { "id": "issue_3Vb7Kd1Pq8", "status": "pending", "priority": "critical" },
"work_order": null,
"answers": [
{
"field": "custom_field_9f61c8b7a6",
"name": "brakes",
"label": "Brakes",
"type": "pass-fail",
"value": {
"passed": false,
"not_applicable": false,
"severity": "critical",
"comments": "Pedal is soft.",
"photos": [
{
"id": "file_5Qw8Zt2Nb7",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"filename": "lq8w1c0v9xk3.png",
"content_type": "image/png"
}
],
"unsafe": true
}
},
{
"field": "custom_field_8a521d9f3b",
"name": "odometer",
"label": "Odometer",
"type": "number",
"value": 120400
}
],
"files": [
{
"id": "file_5Qw8Zt2Nb7",
"uuid": "3a6c9e21-7b4d-4f18-9c05-2d8e1f7a6b34",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"original_filename": "lq8w1c0v9xk3.png",
"content_type": "image/png",
"type": "inspection_photo",
"caption": null,
"created_at": "2026-09-09T07:30:00.000000Z"
}
],
"item_results": [
{
"id": "b3f0c4a2-1d6e-4c1a-9c2b-8e7f6a5d4c3b",
"item_key": "brakes",
"label": "Brakes",
"category": "Safety",
"status": "failed",
"severity": "critical",
"passed": false,
"comments": "Pedal is soft.",
"photos": [
{
"id": "file_5Qw8Zt2Nb7",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"filename": "lq8w1c0v9xk3.png",
"content_type": "image/png"
}
],
"meta": { "not_applicable": false, "unsafe": true },
"submission_id": "inspection_submission_4Mnp8Qx2Vz",
"updated_at": "2026-09-09T07:30:00.000000Z",
"created_at": "2026-09-09T07:30:00.000000Z"
}
],
"type": "dvir",
"status": "submitted",
"result": "failed",
"source": "navigator",
"odometer": 120400,
"engine_hours": 3100,
"total_items": 1,
"failed_items": 1,
"location": { "latitude": 1.3521, "longitude": 103.8198 },
"signature": {},
"attachments": [],
"meta": { "unsafe": true },
"form_name": "Pre-trip DVIR",
"vehicle_name": "Truck 7",
"driver_name": "Dana Driver",
"has_failures": true,
"started_at": "2026-09-09T07:10:00.000000Z",
"submitted_at": "2026-09-09T07:30:00.000000Z",
"resolved_at": null,
"updated_at": "2026-09-09T07:30:00.000000Z",
"created_at": "2026-09-09T07:30:00.000000Z"
}
]
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/vehicles/:id/inspections"
method: GET
headers:
Accept: application/json
pathVariables:
id: "vehicle_7Hx3Pq9Rt2"
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
[
{
"id": "inspection_submission_4Mnp8Qx2Vz",
"form": { "id": "inspection_form_9Kd2Lm7Aq1", "name": "Pre-trip DVIR", "type": "dvir" },
"vehicle": { "id": "vehicle_7Hx3Pq9Rt2", "plate_number": "TRK-7" },
"driver": { "id": "driver_2Fb8Nc4Wm6", "name": "Dana Driver" },
"issue": { "id": "issue_3Vb7Kd1Pq8", "status": "pending", "priority": "critical" },
"work_order": null,
"answers": [
{
"field": "custom_field_9f61c8b7a6",
"name": "brakes",
"label": "Brakes",
"type": "pass-fail",
"value": {
"passed": false,
"not_applicable": false,
"severity": "critical",
"comments": "Pedal is soft.",
"photos": [
{
"id": "file_5Qw8Zt2Nb7",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"filename": "lq8w1c0v9xk3.png",
"content_type": "image/png"
}
],
"unsafe": true
}
},
{
"field": "custom_field_8a521d9f3b",
"name": "odometer",
"label": "Odometer",
"type": "number",
"value": 120400
}
],
"files": [
{
"id": "file_5Qw8Zt2Nb7",
"uuid": "3a6c9e21-7b4d-4f18-9c05-2d8e1f7a6b34",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"original_filename": "lq8w1c0v9xk3.png",
"content_type": "image/png",
"type": "inspection_photo",
"caption": null,
"created_at": "2026-09-09T07:30:00.000000Z"
}
],
"item_results": [
{
"id": "b3f0c4a2-1d6e-4c1a-9c2b-8e7f6a5d4c3b",
"item_key": "brakes",
"label": "Brakes",
"category": "Safety",
"status": "failed",
"severity": "critical",
"passed": false,
"comments": "Pedal is soft.",
"photos": [
{
"id": "file_5Qw8Zt2Nb7",
"url": "https://files.fleetbase.io/inspections/4Mnp8Qx2Vz/lq8w1c0v9xk3.png",
"filename": "lq8w1c0v9xk3.png",
"content_type": "image/png"
}
],
"meta": { "not_applicable": false, "unsafe": true },
"submission_id": "inspection_submission_4Mnp8Qx2Vz",
"updated_at": "2026-09-09T07:30:00.000000Z",
"created_at": "2026-09-09T07:30:00.000000Z"
}
],
"type": "dvir",
"status": "submitted",
"result": "failed",
"source": "navigator",
"odometer": 120400,
"engine_hours": 3100,
"total_items": 1,
"failed_items": 1,
"location": { "latitude": 1.3521, "longitude": 103.8198 },
"signature": {},
"attachments": [],
"meta": { "unsafe": true },
"form_name": "Pre-trip DVIR",
"vehicle_name": "Truck 7",
"driver_name": "Dana Driver",
"has_failures": true,
"started_at": "2026-09-09T07:10:00.000000Z",
"submitted_at": "2026-09-09T07:30:00.000000Z",
"resolved_at": null,
"updated_at": "2026-09-09T07:30:00.000000Z",
"created_at": "2026-09-09T07:30:00.000000Z"
}
]
order: 1000
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
$kind: http-example
request:
url: "{{base_url}}/{{namespace}}/inspection-forms/:id"
method: GET
headers:
Accept: application/json
pathVariables:
id: "inspection_form_9Kd2Lm7Aq1"
response:
statusCode: 200
statusText: OK
headers:
Content-Type: application/json
body:
type: json
content: |-
{
"id": "inspection_form_9Kd2Lm7Aq1",
"name": "Pre-trip DVIR",
"description": "Daily vehicle inspection report, filed before the first run.",
"type": "dvir",
"status": "published",
"items": [],
"grouped_fields": [
{
"id": "category_4Tn6Ry8Wz3",
"name": "Safety",
"description": null,
"order": 1,
"meta": { "grid_size": 2 },
"fields": [
{
"id": "custom_field_9f61c8b7a6",
"name": "brakes",
"label": "Brakes",
"description": null,
"help_text": "Check the pedal travel.",
"type": "pass-fail",
"component": "pass-fail",
"required": true,
"editable": true,
"options": [],
"order": 1,
"meta": {
"severity": "critical",
"require_comment_on_fail": true,
"require_photo_on_fail": true,
"unsafe_on_fail": true
}
},
{
"id": "custom_field_8a521d9f3b",
"name": "odometer",
"label": "Odometer",
"description": null,
"help_text": null,
"type": "number",
"component": "number",
"required": false,
"editable": true,
"options": [],
"order": 2,
"meta": { "unit": "km", "role": "odometer" }
}
]
}
],
"settings": { "create_issue_on_failure": true, "create_work_order_on_failure": false },
"meta": {},
"subject_name": null,
"item_count": 2,
"is_published": true,
"published_at": "2026-09-01T00:00:00.000000Z",
"updated_at": "2026-09-01T00:00:00.000000Z",
"created_at": "2026-08-28T00:00:00.000000Z"
}
order: 1000
Loading
Loading