Success Response Schema
The following example shows the schema for an API success response:
{
"type": "object",
"id": "http://api.lookout.com/events-schema#",
"title": "Lookout Mobile Risk API Response Schema",
"description": "A response from the Lookout Mobile Risk API",
"required": ["count", "streamPosition", "moreEvents", "requestId", "links", "events"],
"properties": {
"count": {
"description": "The total number of events in this response",
"type": "integer",
"minimum": 0
},
"streamPosition": {
"description": "The Lookout id of the last event available in this response",
"type": "string"
},
"moreEvents": {
"description": "Indicates whether the stream position returned is the last event available",
"type": "boolean"
},
"requestId": {
"description": "The Lookout id which identifies each individual request",
"type": "string"
},
"links": {
"description": "Relative paths to the root events path and the next set of events available",
"type": "array",
"items": {
"$ref": "http://json-schema.org/draft-04/hyper-schema#/definitions/linkDescription"
}
},
"events": {
"description": "An array of events",
"type": "array",
"uniqueItems": true,
"minItems": 0,
"items": {
"description": "An individual event",
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/threatEvent" }
]
}
}
},
"definitions": {
"applicationThreat": {
"properties": {
"id": { "type": "string" },
"type": { "enum": ["APPLICATION"] },
"action": { "$ref": "#/definitions/threatAction" },
"classifications": { "$ref": "#/definitions/classifications" },
"description": { "type": "string" },
"assessments": {"$ref":
"#\/definitions\/AssessmentClassificationResponseConfig"},
"severity": { "$ref": "#/definitions/severity" },
"applicationName": { "type": "string" },
"packageName": { "type": "string" },
"packageSha": { "type": "string" },
"path": { "type": "string" },
"fileName": { "type": "string" },
},
"required": ["type", "id", "action", "severity", "classifications", "applicationName", "packageName", "path", "fileName"]
},
"classifications": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": {
"enum": [
"ROOT_ENABLER", "RISKWARE", "ADWARE", "CHARGEWARE", "DATA_LEAK", "TROJAN", "WORM", "VIRUS", "EXPLOIT", "BACK_DOOR", "BOT", "APP_DROPPER", "CLICK_FRAUD", "SPAM", "SPYWARE", "SURVEILLANCEWARE", "VULNERABILITY", "ROOT_JAIL_BREAK", "CONNECTIVITY", "TOLL_FRAUD", "SIDELOADED_APP", "ACTIVE_MITM", "UNKNOWN"
]
}
},
"fileThreat": {
"properties": {
"id": { "type": "string" },
"type": { "enum": ["FILE"] },
"action": { "$ref": "#/definitions/threatAction" },
"classifications": { "$ref": "#/definitions/classifications" },
"description": { "type": "string" },
"assessments": {"$ref":
"#\/definitions\/AssessmentClassificationResponseConfig"},
"severity": { "$ref": "#/definitions/severity" },
"applicationName": { "type": "string" },
"packageName": { "type": "string" },
"path": { "type": "string" },
"fileName": { "type": "string" },
},
"required": ["type", "id", "action", "severity", "classifications", "applicationName", "packageName", "path", "fileName"]
},
"networkThreat": {
"properties": {
"id": { "type": "string" },
"type": { "enum": ["NETWORK"] },
"action": { "$ref": "#/definitions/threatAction" },
"classifications": { "$ref": "#/definitions/classifications" },
"description": { "type": "string" },
"assessments": {"$ref":
"#\/definitions\/AssessmentClassificationResponseConfig"},
"severity": { "$ref": "#/definitions/severity" },
"dnsIpAddresses": {
"type": "array",
"uniqueItems": true,
"minItems": 1,
"items": { "type": "string" }
},
"vpnPresent": { "type": "boolean" },
"vpnLocalAddress": { "type": "string" },
"macAddress": { "type": "string" },
"proxyAddress": { "type": "string" },
"proxyPort": {
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"ssid": { "type": "string" },
"proxyProtocol": { "enum": ["http", "https"] }
},
"required": ["type", "id", "action", "severity", "classifications"]
},
"osThreat": {
"properties": {
"id": { "type": "string" },
"type": { "enum": ["OS"] },
"action": { "$ref": "#/definitions/threatAction" },
"classifications": { "$ref": "#/definitions/classifications" },
"description": { "type": "string" },
"assessments": {"$ref":
"#\/definitions\/AssessmentClassificationResponseConfig"},
"severity": { "$ref": "#/definitions/severity" },
"osVersion": { "type": "string" }
},
"required": ["type", "id", "action", "severity", "classifications", "osVersion"]
},
"severity": { "enum": ["LOW", "MEDIUM", "HIGH"]},
"target": {
"type": "object",
"properties": {
"id": { "type": "string" },
"type": { "enum": [ "DEVICE" ] },
"externalId": { "type": "string" },
"emailAddress": { "type": "string" },
"platform": { "enum": ["ANDROID","IOS","UNKNOWN"] }
},
"required": ["id","type","externalId","emailAddress","platform"]
},
"threatAction": { "enum": ["DETECTED", "RESOLVED", "IGNORED"] },
"threatEvent": {
"properties": {
"id": {"type": "string"},
"type": { "enum": [ "THREAT" ] },
"eventTime": { "type": "string", "format": "date-time" },
"details": {
"description": "Full threat details",
"type": "object",
"oneOf": [
{ "$ref": "#/definitions/applicationThreat" },
{ "$ref": "#/definitions/networkThreat" },
{ "$ref": "#/definitions/fileThreat" },
{ "$ref": "#/definitions/osThreat" }
]
},
"target" : { "$ref": "#/definitions/target" }
},
"required": ["id","type","eventTime","details", "target"]
}
}