Skip to content

Instantly share code, notes, and snippets.

@agraebe
Created October 18, 2019 19:47
Show Gist options
  • Save agraebe/ba8174543e9725561c6812988a2484c1 to your computer and use it in GitHub Desktop.
Save agraebe/ba8174543e9725561c6812988a2484c1 to your computer and use it in GitHub Desktop.
HyperTrack Swagger 2.0 Spec
{
"swagger": "2.0",
"info": {
"version": "1.0",
"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]([email protected]) or our [customer support slack channel](https://join.slack.com/t/hypertracksupport/shared_invite/enQtNDA0MDYxMzY1MDMxLWFlMmNkYmYxOTA4OTZiNTkxOTBiY2FmYjdiMWY1NWUwYWFlYjNhNmFiNTYxYWZhNDg3Mzg2NWJiYjc4NzEzNDE).",
"contact": {}
},
"host": "v3.api.hypertrack.com",
"basePath": "/",
"securityDefinitions": {
"auth": {
"type": "basic"
}
},
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/devices": {
"get": {
"description": "Retrieve the current location and movement status data for your devices.",
"summary": "Get all devices",
"tags": [
"Misc"
],
"operationId": "DevicesGet",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
}
},
"/devices/x": {
"get": {
"description": "Retrieve the current location and movement status data for one specific device.",
"summary": "Get device by device_id",
"tags": [
"Misc"
],
"operationId": "DevicesXGet",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
},
"patch": {
"description": "Retrieve the current location and movement status data for one specific device.",
"summary": "Update device name/metadata by device_id",
"tags": [
"Misc"
],
"operationId": "DevicesXPatch",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
},
{
"name": "Body",
"in": "body",
"required": true,
"description": "",
"schema": {
"$ref": "#/definitions/Updatedevicename~1metadatabydevice_idRequest"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
},
"delete": {
"description": "Remove one specific device for the list of all tracked devices.",
"summary": "Remove existing device",
"tags": [
"Misc"
],
"operationId": "DevicesXDelete",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
}
},
"/trips": {
"post": {
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"summary": "Create new trip",
"tags": [
"Misc"
],
"operationId": "TripsPost",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
},
{
"name": "Body",
"in": "body",
"required": true,
"description": "",
"schema": {
"$ref": "#/definitions/CreatenewtripRequest"
}
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
},
"get": {
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"summary": "Get active trips",
"tags": [
"Misc"
],
"operationId": "TripsGet",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
}
},
"/trips/x": {
"get": {
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"summary": "Get trip by trip_id",
"tags": [
"Misc"
],
"operationId": "TripsXGet",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
}
},
"/trips/x/complete": {
"post": {
"description": "Generate routes and estimates on arrival, get notified when devices arrive at or leave the specified destination, and get trip summaries upon completion",
"summary": "Complete existing trip",
"tags": [
"Misc"
],
"operationId": "TripsXCompletePost",
"deprecated": false,
"produces": [
"application/json"
],
"parameters": [
{
"name": "Content-Type",
"in": "header",
"required": true,
"type": "string",
"description": ""
}
],
"responses": {
"200": {
"description": "",
"headers": {}
}
}
}
}
},
"definitions": {
"Updatedevicename/metadatabydevice_idRequest": {
"title": "Updatedevicename/metadatabydevice_idRequest",
"example": {
"name": "Updated device name",
"metadata": {
"patched": true
}
},
"type": "object",
"properties": {
"name": {
"type": "string"
},
"metadata": {
"$ref": "#/definitions/Metadata"
}
},
"required": [
"name",
"metadata"
]
},
"Metadata": {
"title": "Metadata",
"example": {
"patched": true
},
"type": "object",
"properties": {
"patched": {
"type": "boolean"
}
},
"required": [
"patched"
]
},
"CreatenewtripRequest": {
"title": "CreatenewtripRequest",
"example": {
"device_id": "x",
"destination": {
"geometry": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
}
},
"type": "object",
"properties": {
"device_id": {
"type": "string"
},
"destination": {
"$ref": "#/definitions/Destination"
}
},
"required": [
"device_id",
"destination"
]
},
"Destination": {
"title": "Destination",
"example": {
"geometry": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
}
},
"type": "object",
"properties": {
"geometry": {
"$ref": "#/definitions/Geometry"
}
},
"required": [
"geometry"
]
},
"Geometry": {
"title": "Geometry",
"example": {
"type": "Point",
"coordinates": [
-122.4379421,
37.80056376
]
},
"type": "object",
"properties": {
"type": {
"type": "string"
},
"coordinates": {
"type": "array",
"items": {
"type": "number",
"format": "double"
}
}
},
"required": [
"type",
"coordinates"
]
}
},
"security": [
{
"auth": []
}
],
"tags": [
{
"name": "Misc",
"description": ""
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment