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.

URL
http://bugcollect.com/rest/reports/report_id
HTTP Method
GET
Response type
report
Authentication
Required
Permission
Account owner
reports.list

Lists all reports order by report id

URL
http://bugcollect.com/rest/reports
HTTP Method
GET
Reponse type
reports
Authentication
Required
Permission
Account owner
reports.add

Adds a new report. This is the method for submitting reports from applications.

URL
http://bugcollect.com/rest/reports
HTTP Method
POST
Request type
report
Response type
result
Authentication
Required
Permission
Any application credential
reports.delete

Deletes a report. This decrements the account report count, allowing for more reports to be submitted.

URL
http://bugcollect.com/rest/reports/report_id
HTTP Method
DELETE
Authentication
Required
Permission
Account owner

buckets

Methods for retrieving, deleting and updating buckets.

Method Attributes
buckets.get

Retrieves one individual bucket.

URL
http://bugcollect.com/rest/buckets/bucket_id
HTTP Method
GET
Response type
bucket
Authentication
Required
Permission
Account owner
buckets.list

Lists all buckets order by bucket id.

URL
http://bugcollect.com/rest/buckets
HTTP Method
GET
Reponse type
buckets
Authentication
Required
Permission
Account owner
buckets.update

Updates information on a bucket. Only the bucket response and the status can be updated.

URL
http://bugcollect.com/rest/buckets/bucket_id
HTTP Method
POST
Request type
bucket
Response type
bucket
Authentication
Required
Permission
Account owner
buckets.delete

Deletes a bucket. This also deletes all reports in the deleted bucket and decrements the account report count.

URL
http://bugcollect.com/rest/buckets/bucket_id
HTTP Method
DELETE
Authentication
Required
Permission
Account owner

sources

Methods for retrieving and deleting sources.

Method Attributes
sources.get

Retrieves an individual source.

URL
http://bugcollect.com/rest/sources/source_id
HTTP Method
GET
Response type
source
Authentication
Required
Permission
Account owner
sources.list

Lists all sources ordered by source id.

URL
http://bugcollect.com/rest/sources
HTTP Method
GET
Reponse type
sources
Authentication
Required
Permission
Account owner
sources.delete

Deletes a source. This also deletes all reports submitted from the deleted source and decrements the account report count.

URL
http://bugcollect.com/rest/sources/source_id
HTTP Method
DELETE
Authentication
Required
Permission
Account owner

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.

URL
http://bugcollect.com/rest/accounts
HTTP Method
GET
Reponse type
accounts
Authentication
Required
Permission
Account owner

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.

URL
http://bugcollect.com/rest/users/name
HTTP Method
GET
Response type
user
Authentication
Required
Permission
Any application credential
users.list

Lists all application credentials in the account.

URL
http://bugcollect.com/rest/users
HTTP Method
GET
Reponse type
users
Authentication
Required
Permission
Account owner
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.

URL
http://bugcollect.com/rest/users
HTTP Method
POST
Request type
user
Response type
user
Authentication
Required
Permission
Account owner
users.update

Updates an application credential. Only the credential password can be updated and the operation can ony be performed by the account owner.

URL
http://bugcollect.com/rest/users/name
HTTP Method
POST
Request type
user
Response type
user
Authentication
Required
Permission
Account owner
users.delete

Removes an application credential.

URL
http://bugcollect.com/rest/users/name
HTTP Method
DELETE
Authentication
Required
Permission
Account owner

notificationTokens

Methods for managing notifications to your account.

Method Attributes
notificationTokens.list

Lists all application notification tokens in the account.

URL
http://bugcollect.com/rest/notificationTokens
HTTP Method
GET
Reponse type
notificationTokens
Authentication
Required
Permission
Account owner
notificationTokens.add

Adds a new notification token to the account.

URL
http://bugcollect.com/rest/notificationTokens
HTTP Method
POST
Request type
notificationToken
Response type
notificationToken
Authentication
Required
Permission
Account owner

report

XML list element
reports
XML namespace
http://bugcollect.com/schemas/report/v1.0
Field Type Description
report_idintThe report identifier. Generated by bugcollect.com for each report submitted. This identifier does not change once generated.
bucket_idintThe report bucket identifier. Generated by bugcollect.com for each bucket created. This identifier does not change once generated.
source_idintThe report source identifier. Generated by bugcollect.com for each source that submits reports. This identifier does not change once generated.
report_uuiduuidThe 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.
messagestringThe error message.
exceptionstringThe exception class.
severityintThe error severity.
codeintThe error number or error code.
stackstringThe error stack trace.
notesstringAny additional information that is useful to understand or troubleshoot the report.
applicationstringThe name of the application that submitted the report.
application_versionstringThe application version that submitted the report.
modulestringThe module in the application that submitted the report.
module_versionstringThe version of the module that submitted the report.
responsestringThe response configured on the bucket the report is in.
host_namestringHost name of the machine that submitted the report.
submit_ipstringThe internet IP address from which the report was submitted.
osstringThe operating system of the machine that submitted the report.
os_versionstringThe operating system version of the machine that submitted the report.
incident_timedatetimeThe date and time at which the incident that caused the report occurred.
report_timedatetimeThe 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_idintThe report bucket identifier. Generated by bugcollect.com for each bucket created. This identifier does not change once generated.
messagestringThe error message.
exceptionstringThe exception class.
severityintThe error severity.
codeintThe error number or error code.
applicationstringThe name of the application that submitted the report.
application_versionstringThe application version that submitted the report.
modulestringThe module in the application that submitted the report.
module_versionstringThe version of the module that submitted the report.
responsestringThe response configured on the bucket the report is in.
statusstringBucket status: accept new reports or ignore new reports.
reports_countintThe number of submitted reports that are in this bucket.
last_reportdatetimeThe 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_idintThe report source identifier. Generated by bugcollect.com for each source that submits reports. This identifier does not change once generated.
host_namestringHost name of the machine that submitted the report.
submit_ipstringThe internet IP address from which the report was submitted.
osstringThe operating system of the machine that submitted the report.
os_versionstringThe operating system version of the machine that submitted the report.
reports_countintThe number of reports submitted from this source.
last_reportdatetimeThe 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
messagestringError message.
statusintError status.

result

XML list element
results
XML namespace
http://bugcollect.com/schemas/result/v1.0
Field Type Description
report_uuiduuidThe 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_idintThe report identifier that was generated for the submission.
bucket_idintThe identifier of the bucket into which the report was placed.
source_idintThe identifier for the source that submitted the report.
statusstringWhat was the result of the processing submission:
responsestringThe 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_namestringThe account name.
subscription_typestringThe account subscription type.
service_datedatetimeDate 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_namestringThe user name used by the application to submit reports.
passwordstringThe password used by the application to submit reports.
timezoneintReserved for future use.
relationintReserved for future use.

notificationToken

XML list element
notificationTokens
XML namespace
http://bugcollect.com/schemas/notificationToken/v1.0
Field Type Description
tokenIdstringThe notification identifier.
bytesstringThe notification token bytes.