The api base endpoint is http://UPLOADER-HOST:18080
You can get your UPLOADER-HOST on your website configuration page. Be carefull, if you own multiple website, it can be different for each website.
GET parameters must always be specified via the URL query string.
For now, the API is a bit restrictive : you can't do multiple API call at the same time. So you can't trigger the parsing or delete an uploaded log while you are already uploading a log; you can't upload multiple logs in parallel.
Also, if you triggered a site reset or removed a bot via the website, the API will be locked until the pending operation is totally done.
Used to upload logs on the server. Once a successfull upload call is done, the log is stored on the server and available for parsing (which your trigger yourself using parse api call).
You must do a PUT http request on the endpoint. It is raw upload : the uploaded data basically contains a compressed log without any kind of encoding. (so no url encode and no multipart upload, just the log file).
PUT http://UPLOADER-HOST:18080/upload
X-Upload-Key |
mandatory | Your Upload Key, you can get it on your website configuration page. |
Content-Type |
mandatory | Must always be set to application/octet-stream . |
compress |
mandatory | Possibles values : gzip bzip rar zip none . |
crc32 |
optional | crc32 of the uploaded file. Not mandatory but highly recommanded. |
filename |
optional | For informational purpose. |
ok on success, an error message otherwise.
curl -T /path/to/log.gz \ -H "Content-Type: application/octet-stream" \ -H "X-Upload-Key: UPLOAD-KEY" \ "http://UPLOADER-HOST:18080/upload?compress=gzip&filename=srv01-20-12-2010.gz"
Used to trigger a parsing of the unparsed uploaded logs.
You must do a GET http request on the endpoint.
GET http://UPLOADER-HOST:18080/parse
X-Upload-Key |
mandatory | Your Upload Key, you can get it on your website configuration page. |
checkOnly |
optional | Do not analyze the logs but only return the list of uploaded logs available for parsing. |
A json encoded message containing :
curl -H "X-Upload-Key: UPLOAD-KEY" "http://UPLOADER-HOST:18080/parse"
You can delete uploaded log which have not been parsed or set for parsing.
Usefull if you uploaded several times the same logs by error.
You can get a list of deletable logs using the parse call with the checkOnly=true
parameter.
GET http://UPLOADER-HOST:18080/delete-log
X-Upload-Key |
mandatory | Your Upload Key, you can get it on your website configuration page. |
id |
mandatory | The id of the log you want to delete. |
A json encoded message containing :
curl -H "X-Upload-Key: UPLOAD-KEY" "http://UPLOADER-HOST:18080/delete-log?id=3"