Meego Wiki
Views

Quality/QA-tools/CrashReports/API

From MeeGo wiki
(Difference between revisions)
Jump to: navigation, search
(/api/import)
m
Line 36: Line 36:
| mac
| mac
| MD5(device's MAC address)
| MD5(device's MAC address)
-
|
+
| Optional
|-
|-
| imei
| imei
| MD5(device's IMEI address)
| MD5(device's IMEI address)
-
| Optional.
+
| Optional
|-
|-
| core
| core
Line 66: Line 66:
An example using [http://curl.haxx.se/Curl Curl] for testing the API:
An example using [http://curl.haxx.se/Curl Curl] for testing the API:
-
<code>TODO</code>
+
<code>curl -F "core=@filename.core" -F "rich-core=@filename.rcore" -F "stack-trace=@trace.txt" -F "id=1234567890ABCDEF" -F "auth-token=123456" -F "attachment.1=@test.jpg" -F "release="1.2" -F "product=N900" -F "build=2011.20" http://crash-reports.leonidasoy.fi/api/import</code>
The operation results status code in [http://en.wikipedia.org/wiki/JSON JSON] format. If the operation proceeds successfully, key value pair "ok" = 1 is returned with a link to the created report.
The operation results status code in [http://en.wikipedia.org/wiki/JSON JSON] format. If the operation proceeds successfully, key value pair "ok" = 1 is returned with a link to the created report.
-
<code>{"ok":"1", "url":"crash-reports.meego.com/1234657890ABCDEF"}</code>
+
<code>{"ok":"1", "url":"http://crash-reports.leonidasoy.fi/1234657890ABCDEF"}</code>
In case of error, ''ok'' values is 0, and an additional field ''errors'' describing the problem is returned
In case of error, ''ok'' values is 0, and an additional field ''errors'' describing the problem is returned
<code>{"ok":"0","errors":"unknown attribute: foobar"}</code>
<code>{"ok":"0","errors":"unknown attribute: foobar"}</code>

Revision as of 13:52, 17 May 2011

/api/import

Description: Import crash report
Method: POST [encoding multipart/form-data]

Parameters:

Parameter name Description Values
auth-token Personal authentication token 123456789ABCDE
release Release version 1.0, 1.1, 1.2
profile MeeGo profile Optional. Core, Handset, Tablet, Netbook, IVI
product Product name Ia-Russellville, N900, Pinetrail etc
build Build name e.g. 2011.14, 2011.15 etc
id Unique identifier for the crash, e.g. MD5(core file)
mac MD5(device's MAC address) Optional
imei MD5(device's IMEI address) Optional
core Coredump as an attachment
rich-core Rich core as an attachment
stack-trace Stack trace as an attachment
attachment.[1..n] Other files to be attached with the report: Screenshots, logs etc Optional


The input can contain multiple attachment files. An unique field name have to be given for each file. Unique file names are created by giving a sequence number for each file starting from number 1, for example "attachment.1", "attachment.2" etc.

Because multiple files can be uploaded, HTTP POST with "multipart/form-encoding" is used.

An example using Curl for testing the API:

curl -F "core=@filename.core" -F "rich-core=@filename.rcore" -F "stack-trace=@trace.txt" -F "id=1234567890ABCDEF" -F "auth-token=123456" -F "attachment.1=@test.jpg" -F "release="1.2" -F "product=N900" -F "build=2011.20" http://crash-reports.leonidasoy.fi/api/import

The operation results status code in JSON format. If the operation proceeds successfully, key value pair "ok" = 1 is returned with a link to the created report.

{"ok":"1", "url":"http://crash-reports.leonidasoy.fi/1234657890ABCDEF"}

In case of error, ok values is 0, and an additional field errors describing the problem is returned

{"ok":"0","errors":"unknown attribute: foobar"}

Personal tools