XP-Dev.com Documentation

Old Task Hours 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 Task Hour Object has the following attributes:

Attribute Description
id Unique Task Hour ID
user Username of the user that registered this Task Hour
task Task ID that the Task Hour belongs to
hour Number of hours registered

List All Task Hours for a Task

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

curl https://xp-dev.com/api/v1/taskhours/task/2

Responses will be a list of Task Hour Objects:

{"response":[
    {
        "id":6,
        "hour":4.0,
        "user":"developer",
        "task":2
    },
    ...
]}

List All Task Hours for a Story

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

curl https://xp-dev.com/api/v1/taskhours/story/3

Responses will be a list of Task Hour Objects.

List All Task Hours for a Project

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

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

Responses will be a list of Task Hour Objects.

Create a New Task Hour

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

Mandatory:

  • task
  • hour

Example request:

curl -X POST -H 'Content-Type: application/json' -d '{"hour":14.0,"task":2}' https://xp-dev.com/api/v1/taskhours/

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

Get a Single Task Hour

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

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

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

Update a Single Task Hour

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

Mandatory:

  • hour

Example request:

curl -X PUT -H 'Content-Type: application/json' -d '{"hour":14.0}' https://xp-dev.com/api/v1/taskhours/6

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

Delete a Single Task Hour

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

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

Feel free to contact us if you need any assistance.