XP-Dev.com Documentation

Bug Hours API

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

Each Bug Hour Object has the following attributes:

Attribute Description
id Unique Bug Hour ID
user User object of the user that registered this Bug Hour
bug Bug ID that the Bug Hour belongs to
hours Number of hours registered

List All Bug Hours for a Bug

GET request to https://<your-account>.xp-dev.com/api/v1/bughours/bug/<bug-id>:

curl https://<your-account>.xp-dev.com/api/v1/bughours/bug/2

Responses will be a list of Bug Hour Objects:

[
    {
        "id":6,
        "hours":4.0,
        "user": {
          "id": 20,
          "username": "developer"
        },
        "bug": {
          "id": 2
        }
    },
    ...
]

List All Bug Hours for a Project

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

curl https://<your-account>.xp-dev.com/api/v1/bughours/project/3

Responses will be a list of Bug Hour Objects.

Create a New Bug Hour

POST request to https://<your-account>.xp-dev.com/api/v1/bughours with the following attributes:

Mandatory:

  • bug
  • hours

Example request:

curl -X POST -H 'Content-Type: application/json' -d '{"hours":14.0,"bug":{"id:2}}' https://<your-account>.xp-dev.com/api/v1/bughours

Responses will be in the form of a single Bug Hour Object

Get a Single Bug Hour

GET request to https://<your-account>.xp-dev.com/api/v1/bughours/<bughour-id>. For example:

curl https://<your-account>.xp-dev.com/api/v1/bughours/6

Responses will be in the form of a single Bug Hour Object

Update a Single Bug Hour

PUT request to https://<your-account>.xp-dev.com/api/v1/bughours/<bughour-id> with the following attributes:

Mandatory:

  • hours

Example request:

curl -X PUT -H 'Content-Type: application/json' -d '{"hours":14.0}' https://<your-account>.xp-dev.com/api/v1/bughours/6

Responses will be in the form of a single Bug Hour Object

Delete a Single Bug Hour

DELETE request to https://<your-account>.xp-dev.com/api/v1/bughours/<bughour-id>:

curl -X DELETE https://<your-account>.xp-dev.com/api/v1/bughours/6

Feel free to contact us if you need any assistance.