POST /v1/report
Url
1 |
http://api.consolari.io/v1/report |
Method
1 |
POST |
Header html
1 |
Content-Type: application/x-www-form-urlencoded |
Header json
1 |
Content-Type: application/json |
Report
key
The key which belongs to user account
source
The source identifiying the sender. This could be a domain
url
The full url of the sender
level
The message level, this could have any of the following values: message, notice or error
1 2 3 4 5 6 7 |
{ "key": "api_key", "user": "your@email.com", "source": "domain", "url": "http:\/\/url.com", "level": "message", } |
Data string
An example of a report with a string entry
value
The string value
label
The label for string
time
The date time stamp
type
On string types this must be string
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 |
{ "entries": [ { "value": "string value", "label": "string label", "time": 1388172148, "type": "string", "group": "String group" } ] } |
Data array
An example of a report with an array entry
value
The array
label
The label for array
time
The date time stamp
type
array
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
{ "entries": [ { "value": { "key": "value", "key2": { "subkey": "subvalue" } }, "label": "Array", "time": 1388259497, "type": "array", "group": "DEMO" } ] } |
Data url
An example of a report with an url entry
value
The url
label
The label for url
time
The date time stamp
type
url
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 |
{ "entries": [ { "value": "http:\/\/consolari.io", "label": "Url", "time": 1388259497, "type": "url", "group": "DEMO" } ] } |
Data table
An example of a report with a table entry
value
The table
label
The label for table
time
The date time stamp
type
table
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
{ "entries": [ { "value": [ { "col1": "row value", "col2": "row value", "col3": "row value", }, { "col1": "row value", "col2": "row value", "col3": "row value", } ], "label": "Table", "time": 1388259497, "type": "table", "group": "DEMO" } ] } |
Data sql
An example of a report with a sql entry
value
The sql
label
The label for sql
time
The date time stamp
type
sql
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
{ "entries": [ { "value": { "sql": "select * from table limit 1", "rows": 10, "rows_available": 10, "run_time": 10 }, "label": "SQL", "time": 1388259497, "type": "sql", "group": "DEMO", "context": { "file": "/path/to/script.php", "class": "class", "method": "method", "line": "122", "code": "pdo();", "language": "php", } } ] } |
Data email
An example of a report with a email entry
value
The email
label
The label for email
time
The date time stamp
type
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
{ "entries": [ { "value": { "receiver": "receiver@consolari.io", "sender": "sender@consolari.io", "cc": "cc@@consolari.io", "bcc": "bcc@@consolari.io", "subject": "API demostration", "body_html": "email body in html", "body_text": "email body in raw text" }, "label": "Email", "time": 1388259497, "type": "email", "group": "DEMO" } ] } |
Data request
An example of a report with a request entry
value
The request. Response and request body supports both xml and json format. The correct body is detected by Content-Type in header
label
The label for request
time
The date time stamp
type
request
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
{ "entries": [ { "value": { "request_header": "Content-type: text\/xml", "request_body": "data<\/item>data<\/item><\/element><\/document>", "response_header": "Accept-type: text\/xml", "response_body": "data<\/item>data<\/item><\/element><\/document>", "url": "http:\/\/api.consolari.net\/v1\/report", "parametres": "?key=value", "type": "POST" }, "label": "Report request", "time": 1388259497, "type": "request", "group": "DEMO" } ] } |
Data chart
An example of a report with a chart entry
value
The chart
label
The label for chart
time
The date time stamp
type
chart
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
{ "entries": [ { "value": { "header": "Response times", "yAxis": "ms", "series": [ { "x": [ 300, 400, 250, ], "label": "Bootstrap" }, { "x": [ 200, 100, 250, ], "label": "Signup" } ] }, "label": "Chart of response times", "time": 1388259497, "type": "chart", "group": "DEMO" } ] } |
Data xml
An example of a report with a xml entry
value
The xml
label
The label for xml
time
The date time stamp
type
xml
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 |
{ "entries": [ { "value": "data<\/item>data<\/item><\/element><\/document>", "label": "XML", "time": 1388259497, "type": "xml", "group": "DEMO" } ] } |
Data json
An example of a report with a json entry
value
The json
label
The label for json
time
The date time stamp
type
json
group
The group of data this entry belongs to
1 2 3 4 5 6 7 8 9 10 11 |
{ "entries": [ { "value": "{\"key\":\"value\",\"key2\":{\"subkey\":\"subvalue\"}}", "label": "Json", "time": 1388261274, "type": "json", "group": "DEMO" } ] } |