Skip to content

Instantly share code, notes, and snippets.

@m0sth8
Last active August 29, 2015 14:12
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 m0sth8/812eb42fa3cf4b1d2cab to your computer and use it in GitHub Desktop.
Save m0sth8/812eb42fa3cf4b1d2cab to your computer and use it in GitHub Desktop.
// POST /api/tasks/ - create Scanning task and return task data
{
"type": "docker" //
"options": { // common options for task
"timeout": 0 // task timeout, 0 - with no timeout
"proxy": "", // proxy settings
},
"docker": { // configuration for docker task type
"image": "barbudo/wappalyzer",
"args": ["http://domain.com"], // arguments pushed to running container
}
}
// Possible headers
// X-Callback-Addr: url
// I'll sent POST request with task to this url if taks state is modified
// GET /api/tasks/ID - return task data
{
"id": "long string"
"type": "docker" //
"options": { // common options for task
"timeout": 0 // task timeout, 0 - with no timeout
"proxy": "", // proxy settings
},
"docker": { // configuration for docker task type
"image": "barbudo/wappalyzer",
"cmd": ["http://domain.com"], // arguments pushed to running container
}
"state": {
"status": "waiting|working|paused|done|error"
},
"report": {
"type": "raw",
"raw": "string" // output from container
}
}
// GET /api/tasks/ID/report - 404 if report is not ready
{
"type": "raw",
"raw": "string" // output from container
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment