{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "Fleet Monitoring API"
},
"host": "virtserver.swaggerhub.com",
"basePath": "/GenetecCities/FleetMonitoring/v1",
"schemes": [
"https"
],
"paths": {
"/avlManager": {
"post": {
"tags": [
"Avl"
],
"summary": "Creates an avl unit along with a gps unit under an area with specified parent area and also moves cameras below that area.",
"operationId": "Avl_AddAvlUnit",
"consumes": [
"application/json",
"text/json",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "request",
"required": true,
"schema": {
"$ref": "#/definitions/AddAvlUnitRequest"
}
}
],
"responses": {
"200": {
"description": "Avl unit has been created",
"schema": {
"$ref": "#/definitions/AddAvlUnitResult"
}
},
"400": {
"description": "The request is invalid",
"schema": {
"$ref": "#/definitions/AddAvlUnitError"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"$ref": "#/definitions/AddAvlUnitError"
}
}
}
}
},
"/geofences": {
"get": {
"tags": [
"GeoFences"
],
"summary": "Retrieve GeoFences associated to a GPS Unit.",
"operationId": "GeoFences_GetGeoFences",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "gpsunitid",
"in": "query",
"description": "The GUID of the GPS unit",
"required": true,
"type": "string",
"format": "uuid"
}
],
"responses": {
"200": {
"description": "Retrieving GeoFences for GPS unit succeeded",
"schema": {
"$ref": "#/definitions/GeoFenceModel"
}
},
"401": {
"description": "Authentication information is missing or invalid"
}
}
}
},
"/healthz": {
"get": {
"tags": [
"HealthCheck"
],
"summary": "Get the health of the API server",
"operationId": "HealthCheck_GetHealthZ",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [],
"responses": {
"200": {
"description": "Retrieve the current health of the API server"
}
}
}
},
"/inventory": {
"get": {
"tags": [
"Inventory"
],
"summary": "Get list of AVL units that exist in the system",
"operationId": "Inventory_GetInventory",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [],
"responses": {
"200": {
"description": "Inventory result",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AvlUnitApiModel"
}
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
}
}
}
},
"/inventory/search": {
"get": {
"tags": [
"InventorySearch"
],
"summary": "Search for AVL unit",
"operationId": "InventorySearch_Search",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "id",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "name",
"in": "query",
"required": false,
"type": "string"
},
{
"name": "logicalId",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
}
],
"responses": {
"200": {
"description": "AVL units that meet the search criteria",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/AvlUnitApiModel"
}
}
},
"400": {
"description": "Error executing search",
"schema": {
"$ref": "#/definitions/SearchAvlUnitsError"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
}
}
}
},
"/offloads/{id}": {
"get": {
"tags": [
"Offloads"
],
"summary": "Get a previously initiated offload by ID.",
"operationId": "Offloads_GetOffload",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of a previously initiated offload",
"required": true,
"type": "string"
},
{
"name": "details",
"in": "query",
"description": "Include this parameter to include extra details in the response. If this is omitted or false then response elements marked optional will be omitted",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"description": "Offload is found and returned",
"schema": {
"$ref": "#/definitions/AvlDataOffloadStatus"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
},
"404": {
"description": "Offload with specified ID is not found"
}
}
},
"put": {
"tags": [
"Offloads"
],
"summary": "Initiate an Automatic offload for an AVL unit. Automatic offloads attempt to offload video using a configured lookback time up to the current time, filling in any data within that time frame that was previously missed.",
"operationId": "Offloads_InitiateAutomaticOffloadAsync",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "The Security Center GUID of an AVL unit",
"required": true,
"type": "string"
}
],
"responses": {
"200": {
"description": "Offload has been initiated",
"schema": {
"$ref": "#/definitions/InitiateOffloadResponse"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
},
"409": {
"description": "Offload could not be initiated",
"schema": {
"$ref": "#/definitions/InitiateOffloadError"
}
}
}
},
"patch": {
"tags": [
"Offloads"
],
"summary": "Issue command on a previously initiated offload.",
"operationId": "Offloads_IssueOffloadCommand",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "id",
"in": "path",
"description": "ID of a previously initiated offload",
"required": true,
"type": "string"
},
{
"name": "offloadCommand",
"in": "query",
"description": "The command to apply to the offload",
"required": false,
"type": "string",
"enum": [
"None",
"Pause",
"Resume",
"Cancel"
]
}
],
"responses": {
"200": {
"description": "The specified command was successful"
},
"400": {
"description": "The offload command specified is not valid"
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
},
"404": {
"description": "Offload with specified ID is not found"
},
"409": {
"description": "The offload is not in a valid state to perform the command"
},
"500": {
"description": "Error performing the command"
}
}
}
},
"/offloads": {
"post": {
"tags": [
"Offloads"
],
"summary": "Initiate a Manual offload for an AVL unit. Manual offloads are for a specific time range and allow specification of several other options that dictate what will be offloaded.",
"operationId": "Offloads_InitiateManualOffload",
"consumes": [
"application/json",
"text/json",
"application/x-www-form-urlencoded"
],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"in": "body",
"name": "request",
"description": "Request an offload for a specific time frame with other optional settings",
"required": true,
"schema": {
"$ref": "#/definitions/ManualOffloadRequest"
}
}
],
"responses": {
"200": {
"description": "Offload has been initiated",
"schema": {
"$ref": "#/definitions/InitiateOffloadResponse"
}
},
"400": {
"description": "Offload could not be initiated",
"schema": {
"$ref": "#/definitions/InitiateOffloadError"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
},
"409": {
"description": "Offload could not be initiated",
"schema": {
"$ref": "#/definitions/InitiateOffloadError"
}
}
}
}
},
"/offloads/search": {
"get": {
"tags": [
"OffloadsSearch"
],
"summary": "Search for previously initiated offloads.",
"operationId": "OffloadsSearch_SearchOffloads",
"consumes": [],
"produces": [
"application/json",
"text/json"
],
"parameters": [
{
"name": "startDateTime",
"in": "query",
"description": "The start date time in ISO 8601 format",
"required": true,
"type": "string"
},
{
"name": "endDateTime",
"in": "query",
"description": "The end date time in ISO 8601 format",
"required": true,
"type": "string"
},
{
"name": "dataOffloadState",
"in": "query",
"description": "Filter used to include only offloads with the given states in the search results. Omit to allow any offload state.",
"required": true,
"type": "array",
"items": {
"type": "string",
"enum": [
"Unknown",
"InProgress",
"Completed",
"Retrying",
"Canceled",
"Failed",
"Paused",
"Queued"
]
},
"collectionFormat": "multi"
},
{
"name": "avlUnitId",
"in": "query",
"description": "The Security Center GUID of an AVL unit",
"required": false,
"type": "string"
},
{
"name": "dateTimeSearchType",
"in": "query",
"description": "The type of timestamp to use for comparison during search. Default is to use the data start time stamp.",
"required": false,
"type": "string",
"enum": [
"StartOfOffload",
"StartOfData"
]
},
{
"name": "dataOffloadType",
"in": "query",
"description": "The type of offloads to include. Omit for any type of offload.",
"required": false,
"type": "string",
"enum": [
"Any",
"Automatic",
"Manual"
]
},
{
"name": "offloadDescription",
"in": "query",
"description": "Filter used to include only offloads that contain the given text (case insensitive) in their description. Omit to allow any description.",
"required": false,
"type": "string"
},
{
"name": "details",
"in": "query",
"description": "Include this parameter to include extra details in the response. If this is omitted or false then response elements marked optional will be omitted.",
"required": false,
"type": "boolean"
},
{
"name": "userName",
"in": "query",
"description": "Filter used to include only offloads created by a specific user. If omitted and you have the permission to search offloads for any user, all user's offloads that meet the other search criteria will be included. If ommitted and you do not have the permission to search offloads for any user, only your offloads will be searched. If a user name is specified and you do not have permission to search offloads for any user, a 401 error will occur.",
"required": false,
"type": "string"
}
],
"responses": {
"200": {
"description": "Offloads that met the search criteria",
"schema": {
"$ref": "#/definitions/AvlDataOffloadStatus"
}
},
"400": {
"description": "Error executing search",
"schema": {
"$ref": "#/definitions/SearchOffloadsError"
}
},
"401": {
"description": "Authentication information is missing or invalid",
"headers": {
"WWW_Authenticate": {
"type": "string",
"description": ""
}
}
}
}
}
}
},
"definitions": {
"AddAvlUnitRequest": {
"type": "object",
"required": [
"Name",
"ParentAreaGuid",
"VehicleId"
],
"properties": {
"AvlType": {
"type": "string"
},
"Cameras": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
}
},
"Name": {
"type": "string"
},
"ParentAreaGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"VehicleId": {
"type": "string"
}
}
},
"AddAvlUnitResult": {
"type": "object",
"properties": {
"AvlAreaGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"AvlEntityGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"ErrorMsg": {
"type": "string"
},
"GpsEntityGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"Success": {
"type": "boolean"
}
}
},
"AddAvlUnitError": {
"type": "object",
"properties": {
"Reason": {
"type": "string",
"description": "The reason the offload could not be initiated",
"readOnly": true
}
}
},
"GeoFenceModel": {
"type": "object",
"properties": {
"EntryHeadingDegrees1": {
"type": "number",
"format": "double",
"description": "First of the heading values used to define the acceptable headings\r\nfor considering a vehicle's entry into this geofence. Used to prevent\r\ndetecting entries for vehicles traveling in the opposite direction.\r\nCan be higher than EntryHeadingDegrees2 if the acceptable range spans zero."
},
"EntryHeadingDegrees2": {
"type": "number",
"format": "double",
"description": "Second of the heading values used to define the acceptable headings\r\nfor considering a vehicle's entry into this geofence. Used to prevent\r\ndetecting entries for vehicles traveling in the opposite direction.\r\nCan be lower than EntryHeadingDegrees1 if the acceptable range spans zero."
},
"Id": {
"type": "string"
},
"IntersectionId": {
"type": "string"
},
"Name": {
"type": "string"
},
"OrganizationId": {
"type": "string"
},
"Shape": {
"type": "array",
"items": {
"$ref": "#/definitions/PointModel"
}
}
}
},
"PointModel": {
"type": "object",
"properties": {
"Lat": {
"type": "number",
"format": "double"
},
"Lon": {
"type": "number",
"format": "double"
}
}
},
"AvlUnitApiModel": {
"type": "object",
"properties": {
"Description": {
"type": "string"
},
"Id": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"LogicalId": {
"type": "integer",
"format": "int32"
},
"Name": {
"type": "string"
}
}
},
"SearchAvlUnitsError": {
"type": "object",
"properties": {
"Reason": {
"type": "string",
"description": "The reason the search could not be completed",
"readOnly": true
}
}
},
"AvlDataOffloadStatus": {
"type": "object",
"properties": {
"AvlUnitGuids": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
}
},
"BitRate": {
"type": "number",
"format": "float"
},
"DataOffloadDescription": {
"type": "string"
},
"DataOffloadGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"DestinationArchivers": {
"type": "array",
"items": {
"$ref": "#/definitions/EntityIdentity"
}
},
"ElementStatuses": {
"type": "array",
"items": {
"$ref": "#/definitions/AvlDataOffloadElementStatus"
}
},
"ElementSummary": {
"$ref": "#/definitions/AvlDataOffloadElementSummary"
},
"EndTime": {
"type": "string",
"format": "date-time"
},
"ExportLocation": {
"type": "string"
},
"ExportState": {
"type": "integer",
"format": "int32",
"description": "The state of the export (if any) that occurs after offloading is complete. Applies when\r\n{Genetec.ITS.AVL.Api.Models.Offloads.ManualOffloadRequest.ExportAfterOffload} is true.",
"enum": [
0,
1,
2,
3,
4
]
},
"IsFinished": {
"type": "boolean",
"readOnly": true
},
"MaxRetries": {
"type": "integer",
"format": "int32"
},
"NextRetryScheduled": {
"type": "string",
"format": "date-time"
},
"OffloadState": {
"type": "string",
"description": "The state of the offload portion, separate from the exporting.",
"enum": [
"Unknown",
"InProgress",
"Completed",
"Retrying",
"Canceled",
"Failed",
"Paused",
"Queued"
]
},
"PercentComplete": {
"type": "integer",
"format": "int32"
},
"PluginGuid": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"RetriesUsed": {
"type": "integer",
"format": "int32"
},
"StartTime": {
"type": "string",
"format": "date-time"
},
"State": {
"type": "string",
"description": "The combined state taking into consideration the offload portion and export (if any)",
"enum": [
"Unknown",
"InProgress",
"Completed",
"Retrying",
"Canceled",
"Failed",
"Paused",
"Queued"
]
},
"StatusTime": {
"type": "string",
"format": "date-time"
},
"UserId": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
}
}
},
"EntityIdentity": {
"type": "object",
"properties": {
"Id": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"Name": {
"type": "string"
}
}
},
"AvlDataOffloadElementStatus": {
"type": "object",
"properties": {
"BitRate": {
"type": "number",
"format": "float",
"description": "Bit rate, in bytes per second."
},
"BytesTransferred": {
"type": "integer",
"format": "int64",
"description": "Number of bytes transferred, -1 means not set."
},
"Description": {
"type": "string",
"description": "Description of the element"
},
"ElementId": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000",
"description": "The Guid of the AVL unit or camera whose offload state is being reported."
},
"EndDateTime": {
"type": "string",
"format": "date-time",
"description": "The end date time of the data that is to be offloaded."
},
"EndedDateTime": {
"type": "string",
"format": "date-time",
"description": "The date time the offload was ended."
},
"FailureReason": {
"type": "string",
"description": "When State is Failed, this contains the error string."
},
"IsFinished": {
"type": "boolean",
"description": "Returns true if the current state indicates this element has finished.",
"readOnly": true
},
"PercentComplete": {
"type": "number",
"format": "float",
"description": "Percent complete"
},
"RetriesLeft": {
"type": "integer",
"format": "int32",
"description": "The amount of retries left for this offload element."
},
"StartDateTime": {
"type": "string",
"format": "date-time",
"description": "The start date time of the data that is to be offloaded."
},
"StartedDateTime": {
"type": "string",
"format": "date-time",
"description": "The date time the offload was started. This does not get updated until the\r\nelement is no longer queued and is processing."
},
"State": {
"type": "integer",
"format": "int32",
"description": "The current state of offload for this element.",
"enum": [
0,
1,
2,
3,
4,
5,
6,
7
]
},
"StatusId": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000",
"description": "The Id of this status, as created upon construction."
},
"TransferStateUpdateDateTime": {
"type": "string",
"format": "date-time",
"description": "The last time we received a transfer state update for this item.\r\nApplicable to video offload, and should be expected to update\r\nafter the state is set to pending until the state indicates finished."
},
"Type": {
"type": "integer",
"format": "int32",
"description": "The type of element (Camera offload, AVL unit offload, or Export).",
"enum": [
0,
1,
2
]
}
}
},
"AvlDataOffloadElementSummary": {
"type": "object",
"properties": {
"Active": {
"type": "integer",
"format": "int32"
},
"Canceled": {
"type": "integer",
"format": "int32"
},
"Completed": {
"type": "integer",
"format": "int32"
},
"Failed": {
"type": "integer",
"format": "int32"
},
"InProgress": {
"type": "integer",
"format": "int32"
},
"Other": {
"type": "integer",
"format": "int32"
},
"Paused": {
"type": "integer",
"format": "int32"
},
"Pending": {
"type": "integer",
"format": "int32"
},
"Queued": {
"type": "integer",
"format": "int32"
},
"Total": {
"type": "integer",
"format": "int32"
},
"Waiting": {
"type": "integer",
"format": "int32"
}
}
},
"InitiateOffloadResponse": {
"type": "object",
"properties": {
"DataOffloadGuid": {
"type": "string",
"description": "The ID of the offload that was initiated",
"readOnly": true
}
}
},
"InitiateOffloadError": {
"type": "object",
"properties": {
"Reason": {
"type": "string",
"description": "The reason the offload could not be initiated",
"readOnly": true
}
}
},
"ManualOffloadRequest": {
"type": "object",
"properties": {
"AvlUnitId": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
},
"AllCameras": {
"type": "boolean",
"description": "If true, all video for all cameras associated with the avl unit will be offloaded."
},
"CameraIds": {
"type": "array",
"items": {
"type": "string",
"format": "uuid",
"example": "00000000-0000-0000-0000-000000000000"
}
},
"ExportAfterOffload": {
"type": "boolean"
},
"ForceOffload": {
"type": "boolean"
},
"GpsDataEndDateTime": {
"type": "string"
},
"GpsDataStartDateTime": {
"type": "string"
},
"MaximumRetries": {
"type": "integer",
"format": "int32"
},
"OffloadAvlUnitData": {
"type": "boolean"
},
"OffloadDescription": {
"type": "string"
},
"OffloadVideo": {
"type": "boolean"
},
"RaiseOffloadCompletedEvent": {
"type": "boolean"
},
"RaiseOffloadQueuedEvent": {
"type": "boolean"
},
"RetryDelayMinutes": {
"type": "integer",
"format": "int32"
},
"VideoDataOptions": {
"$ref": "#/definitions/VideoDataOptions"
},
"VideoDataOptionsEnabled": {
"type": "boolean"
},
"VideoEndDateTime": {
"type": "string"
},
"VideoOffloadOrder": {
"type": "integer",
"format": "int32",
"enum": [
0,
1
]
},
"VideoStartDateTime": {
"type": "string"
}
},
"description": "Following the api spec\r\nhttps://app.swaggerhub.com/apis/rdoyle/fleet-monitoring_api/v1"
},
"VideoDataOptions": {
"type": "object",
"properties": {
"IncludeAlarms": {
"type": "boolean",
"description": "Flag that indicates video should be offloaded around the times of alarms."
},
"IncludeBookmarks": {
"type": "boolean",
"description": "Flag that indicates video should be offloaded around the times of bookmarks."
},
"IncludeInputTriggers": {
"type": "boolean",
"description": "Flag that indicates video should be offloaded around the times of input triggers."
},
"IncludeMotionEvents": {
"type": "boolean",
"description": "Flag that indicates video should be offloaded around the times of motion events."
},
"IncludeVideoAnalyticsEvents": {
"type": "boolean",
"description": "Flag that indicates video should be offloaded around the times of analytics events."
},
"LastPeriodInMinutes": {
"type": "integer",
"format": "int32",
"description": "Alternative to using Start and Stop time for the specific time range.\r\nIf this is set to non-zero, the archive transfer will use this and\r\noffload the last N minutes instead of a specific time frame."
},
"SecondsAfter": {
"type": "integer",
"format": "int32",
"description": "Number of seconds after a specific time range that will be included."
},
"SecondsBefore": {
"type": "integer",
"format": "int32",
"description": "Number of seconds before a specific time that will be included."
},
"SpecificTimeFrame": {
"type": "boolean",
"description": "Flag that indicates if the start and end time should be used."
},
"StartTime": {
"type": "string",
"description": "Start time of day of specific time frame. HH:mm:ss relative to camera local time."
},
"StopTime": {
"type": "string",
"description": "End time of day of specific time frame. HH:mm:ss relative to camera local time."
}
}
},
"SearchOffloadsError": {
"type": "object",
"properties": {
"Reason": {
"type": "string",
"description": "The reason the search could not be completed",
"readOnly": true
}
}
}
}
}