REST API
Bugcollect provides access to your account data using an XML based RESTful API. Using this API you can:
- submit new reports from applications
- retrieve reports submitted by your applications
- retrieve information about the buckets and sources into which the reports were categorized
- update a bucket response
- delete reports, buckets, sources
- manage application credentials
The Bucgollect submission components available on the Downloads page are using this same API.
Authentication and Authorization
All requests made to the Bugcollect API are authorized based on the HTTP Digest access authentication. Requests that use an application credentials are authorized only to submit new reports and to view the status of their own credential. All other API methods are restricted to the account owner.
Report submission Example
Request:
POST /rest/reports HTTP/1.1
Content-Type: text/xml
Authorization: Digest username="username",realm="bugcollect.com",...
Host: bugcollect.com
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<report xmlns="http://bugcollect.com/schemas/report/v1.0">
<report_uuid>4f0728b6-1cc1-45eb-92f6-bbc2c1749baa</report_uuid>
<message>A problem was detected</message>
<severity>0</severity>
<stack> at Program.Main(String[] args)</stack>
<notes>Developer notes</notes>
<application>TestBG_1</application>
<application_version>1.0.0</application_version>
<module>TestBG_1</module>
<module_version>1.0.0</module_version>
<host_name>SAMPLE</host_name>
<os>Win32NT</os>
<os_version>5.1.2600.196608</os_version>
<incident_time>2009-08-11T05:39:52.0000000Z</incident_time>
</report>
Reponse:
HTTP/1.1 200 OK
Date: Tue, 11 Aug 2009 05:39:43 GMT
Server: Apache/2.2.13 ..
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8" ?>
<result xmlns="http://bugcollect.com/schemas/result/v1.0">
<report_uuid>4f0728b6-1cc1-45eb-92f6-bbc2c1749baa</report_uuid>
<report_id>19528</report_id>
<bucket_id>655</bucket_id>
<source_id>42</source_id>
<status>CREATED</status>
</result>
RESTful resources and types
reports
Methods for retrieving, deleting and submitting new reports.
| Method | Attributes |
|---|---|
reports.get
Retrieves one individual report. |
|
reports.list
Lists all reports order by report id |
|
reports.add
Adds a new report. This is the method for submitting reports from applications. |
|
reports.delete
Deletes a report. This decrements the account report count, allowing for more reports to be submitted. |
|
buckets
Methods for retrieving, deleting and updating buckets.
| Method | Attributes |
|---|---|
buckets.get
Retrieves one individual bucket. |
|
buckets.list
Lists all buckets order by bucket id. |
|
buckets.update
Updates information on a bucket. Only the bucket response and the status can be updated. |
|
buckets.delete
Deletes a bucket. This also deletes all reports in the deleted bucket and decrements the account report count. |
|
sources
Methods for retrieving and deleting sources.
| Method | Attributes |
|---|---|
sources.get
Retrieves an individual source. |
|
sources.list
Lists all sources ordered by source id. |
|
sources.delete
Deletes a source. This also deletes all reports submitted from the deleted source and decrements the account report count. |
|
accounts
Methods for retrieving information about your account.
| Method | Attributes |
|---|---|
accounts.list
Retrieves the account owned by the authenticated user. This list will always contain only one account. |
|
users
Methods for retrieving, updating, deleting and adding new application credentials to your account.
| Method | Attributes |
|---|---|
users.get
Retrieves a specific application credential. The account owner can retrieve any credential information. Applications can retrieve only their own credential. |
|
users.list
Lists all application credentials in the account. |
|
users.add
Adds a new application credential to the account. This method is exposed to allow design time wizard components to add an application credential during application development. |
|
users.update
Updates an application credential. Only the credential password can be updated and the operation can ony be performed by the account owner. |
|
users.delete
Removes an application credential. |
|
notificationTokens
Methods for managing notifications to your account.
| Method | Attributes |
|---|---|
notificationTokens.list
Lists all application notification tokens in the account. |
|
notificationTokens.add
Adds a new notification token to the account. |
|
report
- XML list element
- reports
- XML namespace
- http://bugcollect.com/schemas/report/v1.0
| Field | Type | Description |
|---|---|---|
report_id | int | The report identifier. Generated by bugcollect.com for each report submitted. This identifier does not change once generated. |
bucket_id | int | The report bucket identifier. Generated by bugcollect.com for each bucket created. This identifier does not change once generated. |
source_id | int | The report source identifier. Generated by bugcollect.com for each source that submits reports. This identifier does not change once generated. |
report_uuid | uuid | The report globally unique identifier. If the report submitted has a uuid set by the client then the client uuid is kept. Otherwise the server generates a uuid for the submitted report. This uuid is used to identify report submission retries and duplicates for offline report submission. |
message | string | The error message. |
exception | string | The exception class. |
severity | int | The error severity. |
code | int | The error number or error code. |
stack | string | The error stack trace. |
notes | string | Any additional information that is useful to understand or troubleshoot the report. |
application | string | The name of the application that submitted the report. |
application_version | string | The application version that submitted the report. |
module | string | The module in the application that submitted the report. |
module_version | string | The version of the module that submitted the report. |
response | string | The response configured on the bucket the report is in. |
host_name | string | Host name of the machine that submitted the report. |
submit_ip | string | The internet IP address from which the report was submitted. |
os | string | The operating system of the machine that submitted the report. |
os_version | string | The operating system version of the machine that submitted the report. |
incident_time | datetime | The date and time at which the incident that caused the report occurred. |
report_time | datetime | The date and time at which the report was submitted. |
bucket
- XML list element
- buckets
- XML namespace
- http://bugcollect.com/schemas/bucket/v1.0
| Field | Type | Description |
|---|---|---|
bucket_id | int | The report bucket identifier. Generated by bugcollect.com for each bucket created. This identifier does not change once generated. |
message | string | The error message. |
exception | string | The exception class. |
severity | int | The error severity. |
code | int | The error number or error code. |
application | string | The name of the application that submitted the report. |
application_version | string | The application version that submitted the report. |
module | string | The module in the application that submitted the report. |
module_version | string | The version of the module that submitted the report. |
response | string | The response configured on the bucket the report is in. |
status | string | Bucket status: accept new reports or ignore new reports. |
reports_count | int | The number of submitted reports that are in this bucket. |
last_report | datetime | The date and time when the last report in this bucket was submitted. |
source
- XML list element
- sources
- XML namespace
- http://bugcollect.com/schemas/source/v1.0
| Field | Type | Description |
|---|---|---|
source_id | int | The report source identifier. Generated by bugcollect.com for each source that submits reports. This identifier does not change once generated. |
host_name | string | Host name of the machine that submitted the report. |
submit_ip | string | The internet IP address from which the report was submitted. |
os | string | The operating system of the machine that submitted the report. |
os_version | string | The operating system version of the machine that submitted the report. |
reports_count | int | The number of reports submitted from this source. |
last_report | datetime | The date and time when the last report from this source was submitted. |
error
- XML namespace
- http://bugcollect.com/schemas/error/v1.0
| Field | Type | Description |
|---|---|---|
message | string | Error message. |
status | int | Error status. |
result
- XML list element
- results
- XML namespace
- http://bugcollect.com/schemas/result/v1.0
| Field | Type | Description |
|---|---|---|
report_uuid | uuid | The report globally unique identifier. If the report submitted had a uuid set by the client then the client uuid is kept. Otherwise the server generates a uuid for the submitted report. |
report_id | int | The report identifier that was generated for the submission. |
bucket_id | int | The identifier of the bucket into which the report was placed. |
source_id | int | The identifier for the source that submitted the report. |
status | string | What was the result of the processing submission: |
response | string | The response that is set for the bucket into which the report was placed. |
account
- XML list element
- accounts
- XML namespace
- http://bugcollect.com/schemas/account/v1.0
| Field | Type | Description |
|---|---|---|
account_name | string | The account name. |
subscription_type | string | The account subscription type. |
service_date | datetime | Date and time until the account service is currently payed. |
user
- XML list element
- users
- XML namespace
- http://bugcollect.com/schemas/user/v1.0
| Field | Type | Description |
|---|---|---|
user_name | string | The user name used by the application to submit reports. |
password | string | The password used by the application to submit reports. |
timezone | int | Reserved for future use. |
relation | int | Reserved for future use. |
notificationToken
- XML list element
- notificationTokens
- XML namespace
- http://bugcollect.com/schemas/notificationToken/v1.0
| Field | Type | Description |
|---|---|---|
tokenId | string | The notification identifier. |
bytes | string | The notification token bytes. |