Skip to content

Instantly share code, notes, and snippets.

@agraebe
Created October 18, 2019 00:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agraebe/db392cafdd985bfe909442fd3759dce4 to your computer and use it in GitHub Desktop.
Save agraebe/db392cafdd985bfe909442fd3759dce4 to your computer and use it in GitHub Desktop.
HyperTrack OpenAPI v3 Spec
{
"openapi": "3.0.0",
"info": {
"title": "HyperTrack API",
"description": "# Postman collection for the [HyperTrack API](https://docs.hypertrack.com/)\n\n## Setting authorization\n\nAll API calls use Basic Auth. Please ensure to replace the variables {{AccountId}} and {{SecretKey}} with your own keys from the [HyperTrack dashboard](https://dashboard.hypertrack.com/setup).\n\n## Setting Device ID\nFor Trips for single device retrieval, please replace the variable {{DeviceID}} with yoru actual device ID.\n\n## Support\n\nIf you have any questions, please [reach out to us via email](help@hypertrack.com) or our [customer support slack channel](https://join.slack.com/t/hypertracksupport/shared_invite/enQtNDA0MDYxMzY1MDMxLWFlMmNkYmYxOTA4OTZiNTkxOTBiY2FmYjdiMWY1NWUwYWFlYjNhNmFiNTYxYWZhNDg3Mzg2NWJiYjc4NzEzNDE).",
"contact": {},
"version": "1.0"
},
"servers": [
{
"url": "https://v3.api.hypertrack.com",
"variables": {}
}
],
"paths": {
"/devices": {
"get": {
"tags": [
"Misc"
],
"summary": "Get all devices",
"description": "Retrieve the current location and movement status data for your devices.",
"operationId": "GetAllDevices",
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
}
},
"/devices/x": {
"get": {
"tags": [
"Misc"
],
"summary": "Get device by device_id",
"description": "Retrieve the current location and movement status data for one specific device.",
"operationId": "Get device by deviceId",
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
},
"patch": {
"tags": [
"Misc"
],
"summary": "Update device name/metadata by device_id",
"description": "Retrieve the current location and movement status data for one specific device.",
"operationId": "Update device name/metadata by deviceId",
"parameters": [],
"requestBody": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Updatedevicename~1metadatabydevice_idRequest"
},
"example": {
"name": "Updated device name",
"metadata": {
"patched": true
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
},
"delete": {
"tags": [
"Misc"
],
"summary": "Remove existing device",
"description": "Remove one specific device for the list of all tracked devices.",
"operationId": "RemoveExistingDevice",
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
}
},
"/trips": {
"post": {
"tags": [
"Misc"
],
"summary": "Create new trip",
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"operationId": "CreateNewTrip",
"parameters": [],
"requestBody": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreatenewtripRequest"
},
"example": {
"device_id": "x",
"destination": {
"geometry": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
}
}
}
},
"required": true
},
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
},
"get": {
"tags": [
"Misc"
],
"summary": "Get active trips",
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"operationId": "GetActiveTrips",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
}
},
"/trips/x": {
"get": {
"tags": [
"Misc"
],
"summary": "Get trip by trip_id",
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"operationId": "Get trip by tripId",
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
}
},
"/trips/x/complete": {
"post": {
"tags": [
"Misc"
],
"summary": "Complete existing trip",
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"operationId": "CompleteExistingTrip",
"parameters": [
{
"name": "Content-Type",
"in": "header",
"description": "",
"required": true,
"style": "simple",
"schema": {
"type": "string",
"example": "application/json"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
},
"deprecated": false
}
}
},
"components": {
"schemas": {
"Updatedevicename/metadatabydevice_idRequest": {
"title": "Updatedevicename/metadatabydevice_idRequest",
"required": [
"name",
"metadata"
],
"type": "object",
"properties": {
"name": {
"type": "string"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
}
},
"example": {
"name": "Updated device name",
"metadata": {
"patched": true
}
}
},
"Metadata": {
"title": "Metadata",
"required": [
"patched"
],
"type": "object",
"properties": {
"patched": {
"type": "boolean"
}
},
"example": {
"patched": true
}
},
"CreatenewtripRequest": {
"title": "CreatenewtripRequest",
"required": [
"device_id",
"destination"
],
"type": "object",
"properties": {
"device_id": {
"type": "string"
},
"destination": {
"$ref": "#/components/schemas/Destination"
}
},
"example": {
"device_id": "x",
"destination": {
"geometry": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
}
}
},
"Destination": {
"title": "Destination",
"required": [
"geometry"
],
"type": "object",
"properties": {
"geometry": {
"$ref": "#/components/schemas/Geometry"
}
},
"example": {
"geometry": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
}
},
"Geometry": {
"title": "Geometry",
"required": [
"type",
"coordinates"
],
"type": "object",
"properties": {
"type": {
"type": "string"
},
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"description": ""
}
},
"example": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
}
},
"securitySchemes": {
"httpBasic": {
"type": "http",
"scheme": "basic"
}
}
},
"security": [
{
"httpBasic": []
}
],
"tags": [
{
"name": "Misc",
"description": ""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment