Diggers
PUT diggers/:id
The request updates all fields of the specified digger with the parameters passed in the query.
Reference information about the resource:
| API Endpoint | https://www.diggernaut.com/api/diggers/:id |
| Request Format | JSON |
| Response Format | JSON |
| Access Level | User |
| Limits | Yes |
Request parameters:
| name | Digger name [string]. |
| project | Project ID [integer]. Project where digger should be placed to. |
| url | URL of source site [string]. |
| status | Digger status [string], can be one of two values: "debug" or "active". Optional. |
| schedule_from | Schedule runs starting from this date [datetime in ISO format]. Optional. |
| schedule_to | Schedule runs ending at this date [datetime in ISO format]. Optional. |
curl -v -X PUT -H "Content-type: application/json" -H "Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b" https://www.diggernaut.com/api/diggers/1 -d '{"name":"CoolRobot1","url":"www.smarty-digger.coolrobot","project":"1"}'
HTTP/1.0 200 OK
Date: Fri, 19 Aug 2016 18:24:49 GMT
Vary: Accept, Accept-Language, Cookie
X-Frame-Options: SAMEORIGIN
Content-Type: application/json
Content-Language: en
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
{
"id": 1,
"name": "CoolRobot1",
"project": 1,
"url": "www.smarty-digger.robot",
"config": "---\ndo:...etc",
"status": "active",
"schedule_from": null,
"schedule_to": null,
"bandwidth": "1790852072.00",
"calls": 21,
"requests": 16749,
"last_session":null
}