XP-Dev.com Documentation

Old Bugs API

This user guide only applies if your account and project is on our old platform, i.e. if your project's URL begins with https://xp-dev.com rather than https://<your-account>.xp-dev.com. If your account is on our new platform, you should be using this user guide instead.

Each Bug Object has the following attributes:

Attribute Description
id Unique Bug ID
title Bug title
description Bug description in Textile
descriptionHtml Bug description in HTML
closed Whether the Bug is closed or not
assignedTo Username that the Bug is assigned to
project Project ID that the Bug belongs to
estimatedTime Bug’s estimated time
iteration Iteration ID that the Bug belongs to, will be zero (0) if the Bug is in the backlog
displayId Bug’s artifact ID
state Bug’s current state

List All Bugs

GET request to https://xp-dev.com/api/v1/bugs/project/<project-id>:

curl https://xp-dev.com/api/v1/bugs/project/3

Responses will be a list of Bug Objects:

{"response":[
    {
        "id":1,
        "state":"New",
        "closed":false,
        "description":"Logging is broken",
        "project":3,
        "estimatedTime":0.0,
        "assignedTo":"developer",
        "displayId":1,
        "iteration":0,
        "title":"Check Logging code",
        "htmlDescription":"<p>Logging is broken</p>"
    },
    ...
]}

Create a New Bug

POST request to https://xp-dev.com/api/v1/bugs/ with the following attributes:

Mandatory:

  • project
  • title
  • description
  • estimatedTime
  • state
  • closed

Optional:

  • assignedTo
  • iteration

Example request:

curl -X POST -H 'Content-Type: application/json' -d '{"state":"New","closed":true,"description":"Logging is broken","project":3,"estimatedTime":10.0,"assignedTo":"developer","iteration":11,"title":"Check Logging code"}' https://xp-dev.com/api/v1/bugs/

Responses will be in the form of a single Bug Object

Get a Single Bug

GET request to https://xp-dev.com/api/v1/bugs/<bug-id>. For example:

curl https://xp-dev.com/api/v1/bugs/6

Responses will be in the form of a single Bug Object

Update a Single Bug

PUT request to https://xp-dev.com/api/v1/bugs/<bug-id> with the following attributes:

Mandatory:

  • project
  • title
  • description
  • estimatedTime
  • state
  • closed

Optional:

  • assignedTo
  • iteration

Example request:

curl -X PUT -H 'Content-Type: application/json' -d '{"state":"Closed","closed":true,"description":"Logging is broken","project":3,"estimatedTime":10.0,"assignedTo":"developer","iteration":11,"title":"Check Logging code"}' https://xp-dev.com/api/v1/bugs/6

Responses will be in the form of a single Bug Object

Delete a Single Bug

DELETE request to https://xp-dev.com/api/v1/bugs/<bug-id>:

curl -X DELETE https://xp-dev.com/api/v1/bugs/6

Bug Metrics

Each Bug Metrics Object has the following attributes:

Attribute Description
hours Total number of hours estimated, added, remaining and percentage completion

Get Metrics for a Single Bug

GET request to https://xp-dev.com/api/v1/bugs/metrics/<bug-id>:

curl https://xp-dev.com/api/v1/bugs/metrics/6

Responses will be an Bug Metrics Object:

{"response":{
    "hours":{
        "total":10.0,
        "remaining":9.0,
        "added":7.0,
        "completion":70.0
    }
}}

Feel free to contact us if you need any assistance.