NAV

Activity: a piece of work

A. is a main time tracking unit

Get Activity

Request

GET /v1/s-12312-almagro/activities/16/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "",
    "duration": 0,
    "moment": "2015-09-16T09:57:28Z",
    "started": "2013-05-01T12:00:00Z",
    "id": 16,
    "stopped": "2015-09-16T09:57:28Z",
    "isrunning": 0,
    "description": "new activity",
    "task": {
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 4,
        "title": "Implement database"
    }
}

Get Activities

Request

GET /v1/s-12312-almagro/activities/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "created": "",
    "duration": 0,
    "moment": "2015-09-16T09:57:28Z",
    "started": "2013-05-01T12:00:00Z",
    "id": 27,
    "stopped": "2015-09-16T09:57:28Z",
    "isrunning": 0,
    "description": "dinner",
    "task": {
        "project": {
            "name": "Created new project",
            "id": 4
        },
        "id": 14,
        "title": "asdasd"
    }
}, {
    "created": "",
    "duration": 49546698,
    "moment": "2015-09-16T09:57:28Z",
    "started": "2014-02-19T22:59:10Z",
    "id": 45,
    "stopped": "2015-09-16T09:57:28Z",
    "isrunning": 0,
    "description": "",
    "task": {
        "id": 31,
        "title": "Some Title"
    }
}]

Add Activity

With linked Task

Request

POST /v1/s-12312-almagro/activities/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Content-Type: application/json
Host: api.roundbee.com

{
    "taskid": "15",
    "description": "Creating new activity for task"
}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-02-26T16:43:03Z",
    "duration": 0,
    "moment": "2017-02-26T16:43:03Z",
    "started": "",
    "id": 208,
    "stopped": "",
    "isrunning": 0,
    "description": "Creating new activity for task",
    "task": {
        "project": {
            "name": "Project Poland",
            "id": 5
        },
        "id": 15,
        "title": "tv"
    }
}

Without linked Task

Request

POST /v1/s-12312-almagro/activities/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Content-Type: application/json
Host: api.roundbee.com

{
    "description": "Creating new activity without a task"
}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-02-26T16:46:26Z",
    "duration": 0,
    "moment": "2017-02-26T16:46:26Z",
    "started": "",
    "id": 209,
    "stopped": "",
    "isrunning": 0,
    "description": "Creating new activity without a task"
}

Update Activity

Without Task assignation

Request

POST /v1/s-12312-almagro/activities/90/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Content-Type: application/json
Host: api.roundbee.com

{"description":"Updated description"}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "",
    "duration": 3822,
    "moment": "2017-02-26T17:01:02Z",
    "started": "2016-03-19T21:08:38Z",
    "id": 90,
    "stopped": "2016-03-21T21:05:42Z",
    "isrunning": 0,
    "description": "Updated description"
}

With Task assignation

Request

POST /v1/s-12312-almagro/activities/90/ HTTP/1.1
Authorization: Bearer bcd6dc37a9d145de9d3bfbc719eb14cb5ff8099e
Content-Type: application/json
Host: api.roundbee.com

{"taskid": 42, "description":"Updated description"}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "",
    "duration": 3822,
    "moment": "2017-02-26T17:03:48Z",
    "started": "2016-03-19T21:08:38Z",
    "id": 90,
    "stopped": "2016-03-21T21:05:42Z",
    "isrunning": 0,
    "description": "Updated description",
    "task": {
        "id": 42,
        "title": "Job to be done"
    }
}

Delete Activity

Request

DELETE /v1/s-12312-almagro/activities/31/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2015-05-01T12:00:00Z",
    "duration": 0,
    "moment": "2015-09-16T09:57:28Z",
    "started": "2015-05-01T12:00:00Z",
    "id": 31,
    "stopped": "2015-09-16T09:57:28Z",
    "isrunning": 0,
    "description": "deleted activity"
}

Quickstart Activity

Request

PUT /v1/s-12312-almagro/activities/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{
    "description": "Quickly starting new activity without a task"
}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-03-29T20:17:36Z",
    "duration": 0,
    "moment": "2017-03-29T20:17:36Z",
    "started": "2017-03-29T20:17:36Z",
    "id": 210,
    "stopped": "",
    "isrunning": 1,
    "description": "Quickly starting new activity without a task"
}

Quickstart Activity for Task

Request

PUT /v1/s-12312-almagro/tasks/12/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{
    "description": "Creating new activity with a task"
}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{

    "created": "2017-03-29T20:36:29Z",
    "duration": 0,
    "moment": "2017-03-29T20:36:29Z",
    "started": "2017-03-29T20:36:29Z",
    "id": 212,
    "stopped": "",
    "isrunning": 1,
    "description": "Creating new activity with a task",
    "task": {
        "project": {
            "name": "new project",
            "id": 4
        },
        "id": 12,
        "title": "new task"
    }
}

Toggle Activity

Starts and Stops Activity. IsRunning flag is toggled. Tidbit is created.

Request

PATCH /v1/s-12312-almagro/activities/212/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-03-29T20:36:29Z",
    "duration": 234,
    "moment": "2017-03-29T20:40:23Z",
    "started": "2017-03-29T20:36:29Z",
    "id": 212,
    "stopped": "2017-03-29T20:40:23Z",
    "isrunning": 0,
    "description": "new activity with a task",
    "task": {
        "project": {
            "name": "new project",
            "id": 4
        },
        "id": 12,
        "title": "new task with project"
    }
}

Authentification

There are three key methods for auntenticate a user

Ping

Request

GET /v1/s-12312-almagro/users/ping/ HTTP/1.1
Host: api.roundbee.com
Authorization: Bearer ae616d74c318c2b552d8a22f00b2f1b2b85783d5
Origin: http://demo.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8
Content-Length: 397

{
    "activity": {
        "created": "2016-10-03T06:58:14Z",
        "duration": 122869,
        "moment": "2017-04-10T07:40:53Z",
        "started": "2016-10-03T06:58:14Z",
        "id": 118,
        "stopped": "",
        "isrunning": 1,
        "description": "Coffee",
        "task": {
            "project": {
                "name": "Work",
                "id": 12
            },
            "id": 75,
            "title": "Breaks and lunches"
        }
    },
    "user": {
        "lastname": "Bykov",
        "firstname": "Rodion",
        "id": 4,
        "login": "roundbee@roundbee.com",
        "email": "roundbee@roundbee.com"
    }
}

Login

Login and password should be sent as for Basic Authentification: it should be Base64 encoded string “login:password”. In this string password should be signed using HMAC SHA1 function, using as key Subscriber’s secret.

Request

POST http://api.roundbee.com/v1/s-12312-almagro/users/login/ HTTP/1.1
Host: api.roundbee.com
Authorization: Basic YZRtaW46MjBEWzBENTGFRjk1MjhBM0HCQkI5OTJEQzIzNzI5DTRGQTkzOEMyMg==

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8
Content-Length: 243
{
   "moment":"2016-04-23T10:43:08Z",
   "tokens":[
      "UserLoggedIn"
   ],
   "created":"2016-04-23T10:43:08Z",
   "lastname":"User",
   "sessiontoken":"3c93a2dded174de61f873eb2088a8b0fb6f6f319",
   "activity":{
      "duration":5767,
      "moment":"2016-04-23T10:41:49Z",
      "started":"2016-02-28T21:18:02Z",
      "id":80,
      "stopped":"",
      "isrunning":1,
      "description":"Some currently running activity",
      "task":{
         "id":42,
         "title":"Running this activity right now"
      }
   },
   "firstname":"Some",
   "id":4,
   "login":"user",
   "email":"test2@somedomain.com"
}

Jot: a small note

Small note (not yet implemented)

Project: where all Tasks live

P. is a top-level grouping element

Get projects

Returns array of Projects, with all their Tasks and each Task has all Activities

Request

GET /v1/s-12312-almagro/projects/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "created": "2014-12-23T22:18:57Z",
    "tasks": [{
        "created": "2013-12-23T22:23:08Z",
        "duration": 70,
        "moment": "2016-02-21T21:33:48Z",
        "activities": [{
            "created": "",
            "duration": 70,
            "moment": "2016-02-21T21:33:48Z",
            "started": "2016-01-25T20:33:16Z",
            "id": 68,
            "stopped": "2016-02-21T21:33:48Z",
            "isrunning": 0,
            "description": "test",
            "task": {
                "project": {
                    "name": "Project BETA",
                    "id": 2
                },
                "id": 7,
                "title": "Investigate compatibility"
            }
        }],
        "project": {
            "name": "Project BETA",
            "id": 2
        },
        "id": 7,
        "isrunning": 0,
        "title": "Investigate compatibility",
        "description": ""
    }, {
        "created": "2013-12-23T22:23:08Z",
        "duration": 0,
        "moment": "2016-01-10T20:48:32Z",
        "project": {
            "name": "Project BETA",
            "id": 2
        },
        "id": 8,
        "isrunning": 0,
        "title": "Investigate capabilities",
        "description": ""
    }, {
        "created": "2014-02-05T19:33:25Z",
        "duration": 50235448,
        "moment": "2015-09-16T09:57:28Z",
        "activities": [{
            "created": "",
            "duration": 50235448,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2014-02-11T23:40:00Z",
            "id": 42,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "Creating Some tickets",
            "task": {
                "project": {
                    "name": "Project BETA",
                    "id": 2
                },
                "id": 27,
                "title": "new task from api 5"
            }
        }],
        "project": {
            "name": "Project BETA",
            "id": 2
        },
        "id": 27,
        "isrunning": 0,
        "title": "new task from api 5",
        "description": "task description"
    }],
    "duration": 50235518,
    "moment": "2014-12-23T22:18:57Z",
    "name": "Project BETA",
    "id": 2,
    "description": "Second project "
}]

Get Project

Returns one Project and all its Tasks with Activities

Request

GET /v1/s-12312-almagro/projects/1/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2014-12-23T22:18:57Z",
    "tasks": [{
        "created": "2016-02-19T07:19:59Z",
        "duration": 0,
        "moment": "2016-02-19T07:19:59Z",
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 48,
        "isrunning": 0,
        "title": "Test task new2",
        "description": "qweqwe"
    }, {
        "created": "2015-09-08T12:39:08Z",
        "duration": 10742,
        "moment": "2016-01-24T22:17:42Z",
        "activities": [{
            "created": "",
            "duration": 9621,
            "moment": "2016-01-24T22:17:42Z",
            "started": "2016-01-17T20:38:20Z",
            "id": 64,
            "stopped": "2016-01-24T22:17:42Z",
            "isrunning": 0,
            "description": "Some old task",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 29,
                "title": "New title"
            }
        }, {
            "created": "",
            "duration": 1121,
            "moment": "2016-01-17T20:37:31Z",
            "started": "2016-01-17T20:18:50Z",
            "id": 63,
            "stopped": "2016-01-17T20:37:31Z",
            "isrunning": 0,
            "description": "Rest",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 29,
                "title": "New title"
            }
        }],
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 29,
        "isrunning": 0,
        "title": "New title",
        "description": "New Description"
    }, {
        "created": "2013-12-23T22:23:08Z",
        "duration": 0,
        "moment": "2015-09-16T09:57:28Z",
        "activities": [{
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 5,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "basic methods",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 3,
                "title": "Implement basic methods"
            }
        }, {
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 6,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "select method",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 3,
                "title": "Implement basic methods"
            }
        }, {
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 7,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "select method",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 3,
                "title": "Implement basic methods"
            }
        }, {
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 9,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "qwertyuiop",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 3,
                "title": "Implement basic methods"
            }
        }],
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 3,
        "isrunning": 0,
        "title": "Implement basic methods",
        "description": ""
    }, {
        "created": "2013-12-23T22:23:08Z",
        "duration": 0,
        "moment": "2015-09-16T09:57:28Z",
        "activities": [{
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 10,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "new activity",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 4,
                "title": "Implement database"
            }
        }, {
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 16,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "new activity",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 4,
                "title": "Implement database"
            }
        }, {
            "created": "",
            "duration": 0,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2013-05-01T12:00:00Z",
            "id": 17,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "home screen",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 4,
                "title": "Implement database"
            }
        }],
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 4,
        "isrunning": 0,
        "title": "Implement database",
        "description": ""
    }, {
        "created": "2015-09-08T18:53:02Z",
        "duration": 50330100,
        "moment": "2015-09-16T09:57:28Z",
        "activities": [{
            "created": "",
            "duration": 50330100,
            "moment": "2015-09-16T09:57:28Z",
            "started": "2014-02-18T22:53:46Z",
            "id": 44,
            "stopped": "2015-09-16T09:57:28Z",
            "isrunning": 0,
            "description": "",
            "task": {
                "project": {
                    "name": "Project ALPHA",
                    "id": 1
                },
                "id": 30,
                "title": "Some Title"
            }
        }],
        "project": {
            "name": "Project ALPHA",
            "id": 1
        },
        "id": 30,
        "isrunning": 0,
        "title": "Some Title",
        "description": "Some Description"
    }],
    "duration": 50340842,
    "moment": "2014-12-23T22:18:57Z",
    "name": "Project ALPHA",
    "id": 1,
    "description": "First project"
}

Add Project

Creates new empty Project for current User

Request

POST /v1/s-12312-almagro/projects/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'name':'Some New Project','description':'Freshly created Project'}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-23T17:56:59Z",
    "duration": 0,
    "moment": "2017-04-23T17:56:59Z",
    "name": "Some New Project",
    "id": 17,
    "description": "Freshly created Project"
}

Update Project

Request

POST /v1/s-12312-almagro/projects/17/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'name':'Some Great New Project','description':'Freshly created great Project'}

Request

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-23T17:56:59Z",
    "duration": 0,
    "moment": "2017-04-23T18:01:53Z",
    "name": "Some Great New Project",
    "id": 17,
    "description": "Freshly created great Project"
}

Delete Project

Deleting Project stops all Tasks belonging to it, and de-associates Tasks from that Project.

Request

DELETE /v1/s-12312-almagro/projects/17/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-23T17:56:59Z",
    "duration": 0,
    "moment": "2017-04-23T18:06:48Z",
    "name": "Some Great New Project",
    "id": 17,
    "description": "Freshly created great Project"
}

Reports

Summary report

Summary report per activity; time spent for each activity during period

Request

GET /v1/s-12312-almagro/reports/summary/&from=2017-01-01&to=2017-03-31 HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "duration": 27157,
    "activity": {
        "id": 193,
        "description": "Release",
        "task": {
            "id": 115,
            "title": "Deployments"
        }
    }
}, {
    "duration": 6196,
    "activity": {
        "id": 201,
        "description": "Setup machine",
        "task": {
            "id": 118,
            "title": "Environment"
        }
    }
}, {
    "duration": 16813,
    "activity": {
        "id": 206,
        "description": "Jenkins",
        "task": {
            "id": 121,
            "title": "Integration"
        }
    }
}, {
    "duration": 2288,
    "activity": {
        "id": 90,
        "description": "Lunches",
        "task": {
            "id": 42,
            "title": "Breaks"
        }
    }
}]

Activity Report

Time report summarized by day/activity; daily times spent over activity

Request

GET /v1/s-12312-almagro/reports/activity/&from=2017-01-01&to=2017-03-31 HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "duration": 16,
    "activity": {
        "id": 192,
        "description": "Homepage design",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 89,
            "title": "Support Tickets"
        }
    },
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 15465,
    "activity": {
        "id": 191,
        "description": "Homepage design",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 89,
            "title": "Support Tickets"
        }
    },
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 1769,
    "activity": {
        "id": 126,
        "description": "Daily scrum",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 75,
            "title": "Meetings"
        }
    },
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 12905,
    "activity": {
        "id": 127,
        "description": "Sorting emails",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 77,
            "title": "Project management"
        }
    },
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 27157,
    "activity": {
        "id": 193,
        "description": "Next release",
        "task": {
            "id": 115,
            "title": "Deployments"
        }
    },
    "datestarted": "2017-01-18T00:00:00Z"
}, {
    "duration": 3599,
    "activity": {
        "id": 194,
        "description": "Docker",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 76,
            "title": "Learning"
        }
    },
    "datestarted": "2017-01-20T00:00:00Z"
}]

Time Report

Detailed time report for the period

Request

GET /v1/s-12312-almagro/reports/timelog/&from=2017-01-01&to=2017-03-31 HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "duration": 16,
    "started": "2017-01-17T08:38:14Z",
    "activity": {
        "id": 192,
        "description": "Homepage design",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 89,
            "title": "Support Tickets"
        }
    },
    "id": 364,
    "stopped": "2017-01-17T08:38:30Z",
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 13010,
    "started": "2017-01-17T08:38:41Z",
    "activity": {
        "id": 191,
        "description": "Homepage design",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 89,
            "title": "Support Tickets"
        }
    },
    "id": 365,
    "stopped": "2017-01-17T12:15:31Z",
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 2455,
    "started": "2017-01-17T12:45:00Z",
    "activity": {
        "id": 191,
        "description": "Homepage design",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 89,
            "title": "Support Tickets"
        }
    },
    "id": 367,
    "stopped": "2017-01-17T13:25:55Z",
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 12905,
    "started": "2017-01-17T13:25:55Z",
    "activity": {
        "id": 127,
        "description": "Emails",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 77,
            "title": "Project management"
        }
    },
    "id": 368,
    "stopped": "2017-01-17T17:01:00Z",
    "datestarted": "2017-01-17T00:00:00Z"
}, {
    "duration": 16521,
    "started": "2017-01-18T08:03:56Z",
    "activity": {
        "id": 193,
        "description": "Next Release",
        "task": {
            "id": 115,
            "title": "Deployments"
        }
    },
    "id": 369,
    "stopped": "2017-01-18T12:39:17Z",
    "datestarted": "2017-01-18T00:00:00Z"
}, {
    "duration": 3599,
    "started": "2017-01-20T11:21:52Z",
    "activity": {
        "id": 194,
        "description": "Docker",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 76,
            "title": "Learning"
        }
    },
    "id": 372,
    "stopped": "2017-01-20T12:21:51Z",
    "datestarted": "2017-01-20T00:00:00Z"
}, {
    "duration": 11636,
    "started": "2017-01-24T08:25:38Z",
    "activity": {
        "id": 127,
        "description": "Sorting Emails",
        "task": {
            "project": {
                "name": "Billable work",
                "id": 12
            },
            "id": 77,
            "title": "Project management"
        }
    },
    "id": 377,
    "stopped": "2017-01-24T11:39:34Z",
    "datestarted": "2017-01-24T00:00:00Z"
}, {
    "duration": 4344,
    "started": "2017-02-09T11:26:10Z",
    "activity": {
        "id": 202,
        "description": "Create Confluence pages with documentation",
        "task": {
            "project": {
                "name": "Shipping and handling",
                "id": 16
            },
            "id": 119,
            "title": "Documentation"
        }
    },
    "id": 394,
    "stopped": "2017-02-09T12:38:34Z",
    "datestarted": "2017-02-09T00:00:00Z"
}]

Subscriber: a billing agent

Redeem Package

Method adds Package nominal value of ‘passes’ to Subscriber’s account. Used to replenish Subscriber’s account. This method only can be called if User has AdminLoggedIn security token.

Request

POST /v1/s-12312-almagro/users/redeem/ HTTP/1.1
Host: api.roundbee.com
Authorization: Bearer f54218daf5e48c4d6e7db5bd5a50db5239bc16fc
Content-Type: application/json

{'package': '40CD8962-BA32-419C-AFFA-790E03FD8501'}

Response

HTTP/1.1 200 200
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "credits": 1380,
    "name": "Demo",
    "id": 1
}

Task: a bunch of Activities

Grouping element for Activities

Task groups together several Activities, summarizes time spent on its Activities. Task may or may not belong to Project.

Get Task

Request

GET /v1/s-12312-almagro/tasks/91/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2016-10-05T09:05:34Z",
    "duration": 7597,
    "moment": "2016-10-05T11:14:00Z",
    "activities": [{
        "created": "2016-10-05T09:05:34Z",
        "duration": 7597,
        "moment": "2016-10-05T11:14:00Z",
        "started": "2016-10-05T09:05:34Z",
        "id": 137,
        "stopped": "2016-10-05T11:14:00Z",
        "isrunning": 0,
        "description": "Skype with team",
        "task": {
            "id": 91,
            "title": "Meeting"
        }
    }],
    "id": 91,
    "isrunning": 0,
    "title": "Meeting",
    "description": "Team meeting"
}

Get Tasks

Request

GET /v1/s-12312-almagro/tasks/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

[{
    "created": "2013-12-23T22:23:08Z",
    "duration": 2767,
    "moment": "2017-04-08T09:09:35Z",
    "activities": [{
        "created": "2017-03-29T20:36:29Z",
        "duration": 2767,
        "moment": "2017-04-08T09:09:35Z",
        "started": "2017-03-29T20:36:29Z",
        "id": 212,
        "stopped": "",
        "isrunning": 1,
        "description": "New activity with a task",
        "task": {
            "project": {
                "name": "New project",
                "id": 4
            },
            "id": 12,
            "title": "New task"
        }
    }],
    "project": {
        "name": "Created new project",
        "id": 4
    },
    "id": 12,
    "isrunning": 1,
    "title": "New task",
    "description": "Description for new task"
},
{
    "created": "2016-10-03T06:56:18Z",
    "duration": 208831,
    "moment": "2017-03-22T11:56:00Z",
    "activities": [{
        "created": "2016-10-03T10:50:34Z",
        "duration": 49911,
        "moment": "2017-03-22T11:56:00Z",
        "started": "2016-10-03T10:50:34Z",
        "id": 126,
        "stopped": "2017-03-22T11:56:00Z",
        "isrunning": 0,
        "description": "Lunch",
        "task": {
            "project": {
                "name": "Free time",
                "id": 12
            },
            "id": 75,
            "title": "Breaks and lunches"
        }
    }],
    "id": 42,
    "isrunning": 0,
    "title": "Breaks and lunches",
    "description": "Free time for munchies"

}]

Add Task

Without Project reference

Request

POST /v1/s-12312-almagro/tasks/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{ 
    "title":"Some Title for New Task","description":"Some Description for New Task"
}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-12T19:36:03Z",
    "duration": 0,
    "moment": "2017-04-12T19:36:03Z",
    "id": 123,
    "isrunning": 0,
    "title": "Some Title for New Task",
    "description": "Some Description for New Task"
}

With Project reference

Request

POST /v1/s-12312-almagro/tasks/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'projectid':8,'title':'Some Title for New Task','description':'Some Description for New Task'}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-12T19:41:25Z",
    "duration": 0,
    "moment": "2017-04-12T19:41:25Z",
    "project": {
        "name": "Lorem Ipsum",
        "id": 8
    },
    "id": 124,
    "isrunning": 0,
    "title": "Some Title for New Task",
    "description": "Some Description for New Task"
}

Update Task

With Project reference

Request

POST /v1/s-12312-almagro/tasks/112/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'projectid':8,'title':'Updated task title','description':'Updated task description'}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
  "created": "2016-10-18T07:18:39Z",
  "duration": 34255,
  "moment": "2017-04-22T16:28:17Z",
  "activities": [
    {
      "created": "2017-02-15T10:56:20Z",
      "duration": 5800,
      "moment": "2017-02-15T12:33:00Z",
      "started": "2017-02-15T10:56:20Z",
      "id": 204,
      "stopped": "2017-02-15T12:33:00Z",
      "isrunning": 0,
      "description": "Deploy and testing",
      "task": {
        "project": {
          "name": "Lorem Ipsum",
          "id": 8
        },
        "id": 112,
        "title": "Updated task title"
      }
    },
    {
      "created": "2016-10-18T07:19:23Z",
      "duration": 28455,
      "moment": "2016-12-14T10:20:13Z",
      "started": "2016-10-18T07:19:31Z",
      "id": 173,
      "stopped": "2016-12-14T10:20:13Z",
      "isrunning": 0,
      "description": "Packaging",
      "task": {
        "project": {
          "name": "Lorem Ipsum",
          "id": 8
        },
        "id": 112,
        "title": "Updated task title"
      }
    }
  ],
  "project": {
    "name": "Lorem Ipsum",
    "id": 8
  },
  "id": 112,
  "isrunning": 0,
  "title": "Updated task title",
  "description": "Updated task description"
}

Without Project reference

Request

POST /v1/s-12312-almagro/tasks/112/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'title':'Updated task title','description':'Updated task description'}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2016-10-18T07:18:39Z",
    "duration": 34255,
    "moment": "2017-04-22T17:00:58Z",
    "activities": [{
        "created": "2017-02-15T10:56:20Z",
        "duration": 5800,
        "moment": "2017-02-15T12:33:00Z",
        "started": "2017-02-15T10:56:20Z",
        "id": 204,
        "stopped": "2017-02-15T12:33:00Z",
        "isrunning": 0,
        "description": "Deploy and testing",
        "task": {
            "id": 112,
            "title": "Updated task title"
        }
    }, {
        "created": "2016-10-18T07:19:23Z",
        "duration": 28455,
        "moment": "2016-12-14T10:20:13Z",
        "started": "2016-10-18T07:19:31Z",
        "id": 173,
        "stopped": "2016-12-14T10:20:13Z",
        "isrunning": 0,
        "description": "Packaging",
        "task": {
            "id": 112,
            "title": "Updated task title"
        }
    }],
    "id": 112,
    "isrunning": 0,
    "title": "Updated task title",
    "description": "Updated task description"
}

Delete Task

When deleting task, it become no more available to user. If Task had any Activities, all of them will be also deleted and excluded from reports.

Request

DELETE /v1/s-12312-almagro/tasks/94/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

Task had Activities

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
  "created": "2016-10-06T08:55:57Z",
  "duration": 0,
  "moment": "2017-04-22T17:34:04Z",
  "activities": [
    {
      "created": "",
      "duration": 0,
      "moment": "2015-09-16T09:57:28Z",
      "started": "2013-05-01T12:00:00Z",
      "id": 33,
      "stopped": "2015-09-16T09:57:28Z",
      "isrunning": 0,
      "description": "blabla",
      "task": {
        "id": 94,
        "title": "Deleted task"
      }
    }
  ],
  "id": 94,
  "isrunning": 0,
  "title": "Deleted task",
  "description": ""
}

Task had no Activities

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2016-10-06T08:55:57Z",
    "duration": 0,
    "moment": "2017-04-22T17:16:19Z",
    "id": 94,
    "isrunning": 0,
    "title": "Deleted task",
    "description": ""
}

Quickstart Task

Creates Task and Activity, starts Activity immediately (any others running Activities stop). Returns Activity.

Without Project reference

Request

PUT /v1/s-12312-almagro/tasks/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'title':'Quickstarted Task','description':'Quickstarted Activity'}

Response

HTTP/1.1 200 OK Access-Control-Allow-Origin: http://demo.roundbee.com Content-Type: application/json;charset=utf-8

{ “created”: “2017-04-22T17:43:08Z”, “duration”: 0, “moment”: “2017-04-22T17:43:08Z”, “started”: “2017-04-22T17:43:08Z”, “id”: 215, “stopped”: “”, “isrunning”: 1, “description”: “Quickstarted Activity”, “task”: { “id”: 125, “title”: “Quickstarted Task” } }

With Project reference

###Request

PUT /v1/s-12312-almagro/projects/15/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Content-Type: application/json
Host: api.roundbee.com

{'title':'Quickstarted Project Task','description':'Quickstarted Project Task Activity'}

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
    "created": "2017-04-22T17:49:27Z",
    "duration": 0,
    "moment": "2017-04-22T17:49:27Z",
    "started": "2017-04-22T17:49:27Z",
    "id": 216,
    "stopped": "",
    "isrunning": 1,
    "description": "Quickstarted Project Task Activity",
    "task": {
        "project": {
            "name": "Some existing project",
            "id": 15
        },
        "id": 126,
        "title": "Quickstarted Project Task"
    }
}

Stop Task

Automatically stops all activities on given task. User can stop only own tasks.

Request

PATCH /v1/s-12312-almagro/tasks/126/ HTTP/1.1
Authorization: Bearer c276a245e07cd21bfb3c378b29f0fa9ec4c806fa
Host: api.roundbee.com

Response

HTTP/1.1 200 OK
Access-Control-Allow-Origin: http://demo.roundbee.com
Content-Type: application/json;charset=utf-8

{
  "created": "2017-04-22T17:49:27Z",
  "duration": 7861,
  "moment": "2017-04-23T16:25:15Z",
  "project": {
    "id": 15,
    "name": "Some existing project"
  },
  "id": 126,
  "title": "Quickstarted Project Task",
  "isrunning": 0,
  "description": ""
}