Runrun.it API Documentation

How to authenticate to use the API

Every request to the API, should be sent with the authentication information, the app_key and user_token sent on the HEADER like:

    curl "https://secure.runrun.it/api/v1.0/users" -X GET \
      -H "App-Key: f9c650c98eeb28e345e0a38a184d20cb" \
      -H "User-Token: roBknmkPI0ALmwkRuC1q"

Whenever you send the incorrect information on app_key or user_token, the response is going to be 401 Unauthorized. The user_token is per user and when you use this, you will perform actions on behalf of that user, on Runrun.it, it will appear that the user have done the action

How to obtain authentication information to use the API

API access is a premium feature only available for customers of certain paid accounts. To see which plans have API access check here. However developers with ideas for apps taking advantage of Runrun.it are always welcome to contact help@runrun.it about setting up a test account with API access.

  1. Go to your profile on Runrun.it Your User Profile Menu
  2. Then click on Generate Generate application key
  3. Your app_key will be displayed with the user_token Get application key and user token

Data format

All responses will be valid JSON. Requests should be in JSON as well (although for most actions form-encoded data is accepted as well).

All dates will be in ISO 8601 format. The time-zones if specified, will take in account when doing date operations. Another thing to be mentioned is that you need to urlencode your dates if it does contains special characters as + to specify time-zones.

Monitoring

All calls to the API are recorded. Excessive use of the API will result in the offending app_key being revoked to ensure quality of service for other users. If you anticipate a need to issue a large number of API of calls please enter in contact with support beforehand.

Contacting API Support

If you have any trouble using the API, you can send an email to help@runrun.it.

Checklist Items

GET

/api/v1.0/checklists/:checklist_id/items

List checklist items

Request

Route

GET /api/v1.0/checklists/1/items

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/checklists/1/items" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 120

Body

[
  {
    "id": 1,
    "description": "Paper clips",
    "position": 1,
    "checked": false,
    "checker_id": null,
    "checked_at": null,
    "checklist_id": 1
  }
]
POST

/api/v1.0/checklists/:checklist_id/items

Create a checklist item

Create a new item on a given checklist

Request

Route

POST /api/v1.0/checklists/1/items

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "checklist_item": {
    "description": "Buy more pencils"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/checklists/1/items" -d '{"checklist_item":{"description":"Buy more pencils"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 123

Body

{
  "id": 1,
  "description": "Buy more pencils",
  "position": 1,
  "checked": false,
  "checker_id": null,
  "checked_at": null,
  "checklist_id": 1
}
GET

/api/v1.0/checklists/:checklist_id/items/:id

Show a checklist item

Request

Route

GET /api/v1.0/checklists/1/items/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/checklists/1/items/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 118

Body

{
  "id": 1,
  "description": "Paper clips",
  "position": 1,
  "checked": false,
  "checker_id": null,
  "checked_at": null,
  "checklist_id": 1
}
PUT

/api/v1.0/checklists/:checklist_id/items/:id

Update a checklist item

Update a item on a given checklist

Request

Route

PUT /api/v1.0/checklists/1/items/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "checklist_item": {
    "description": "Buy beer"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/checklists/1/items/1" -d '{"checklist_item":{"description":"Buy beer"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 115

Body

{
  "id": 1,
  "description": "Buy beer",
  "position": 1,
  "checked": false,
  "checker_id": null,
  "checked_at": null,
  "checklist_id": 1
}
DELETE

/api/v1.0/checklists/:checklist_id/items/:id

Destroy a checklist item

Request

Route

DELETE /api/v1.0/checklists/1/items/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/checklists/1/items/1" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Checklists

GET

/api/v1.0/tasks/:task_id/checklist

Show a checklist from a task

Request

Route

GET /api/v1.0/tasks/8/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/8/checklist" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 95

Body

{
  "id": 1,
  "title": "Office Supplies",
  "creator_id": "coyote-15",
  "task_id": 8,
  "checklist_item_ids": [

  ]
}
PUT

/api/v1.0/tasks/:task_id/checklist

Update a checklist from a task

Request

Route

PUT /api/v1.0/tasks/10/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "checklist": {
    "title": "Kitchen supplies"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/10/checklist" -d '{"checklist":{"title":"Kitchen supplies"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 97

Body

{
  "id": 1,
  "title": "Kitchen supplies",
  "creator_id": "coyote-19",
  "task_id": 10,
  "checklist_item_ids": [

  ]
}
DELETE

/api/v1.0/tasks/:task_id/checklist

Destroy a checklist from a task

Request

Route

DELETE /api/v1.0/tasks/12/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/12/checklist" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/task_templates/:task_template_id/checklist

Show a checklist from a task template

Request

Route

GET /api/v1.0/task_templates/3/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/3/checklist" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 113

Body

{
  "id": 1,
  "title": "Office Supplies Template",
  "creator_id": "coyote-31",
  "task_template_id": 3,
  "checklist_item_ids": [

  ]
}
PUT

/api/v1.0/task_templates/:task_template_id/checklist

Update a checklist from a task template

Request

Route

PUT /api/v1.0/task_templates/5/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "checklist": {
    "title": "Kitchen supplies"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/5/checklist" -d '{"checklist":{"title":"Kitchen supplies"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 105

Body

{
  "id": 1,
  "title": "Kitchen supplies",
  "creator_id": "coyote-35",
  "task_template_id": 5,
  "checklist_item_ids": [

  ]
}
DELETE

/api/v1.0/task_templates/:task_template_id/checklist

Destroy a checklist from a task_template

Request

Route

DELETE /api/v1.0/task_templates/7/checklist

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/7/checklist" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Clients

GET

/api/v1.0/clients

List all clients

Request

Route

GET /api/v1.0/clients

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2

Body

[

]
GET

/api/v1.0/clients/:id

Show a Client

Request

Route

GET /api/v1.0/clients/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id Client ID integer
name Client's name string
is_visible Client is currently visible to be used boolean
project_ids IDs of projects belonging to this client array

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 239

Body

{
  "id": 1,
  "name": "Test client 22",
  "is_visible": true,
  "project_ids": [

  ],
  "project_groups": [
    {
      "id": 1,
      "name": "Sem grupo",
      "is_default": true,
      "client_id": 1,
      "project_sub_groups": [
        {
          "id": 1,
          "name": "Sem subgrupo",
          "is_default": true,
          "project_group_id": 1
        }
      ]
    }
  ]
}
POST

/api/v1.0/clients

Create a Client

Parameters

Name Description type
clients[name] required

Client's name

string

clients[is_visible] required

Client is currently visible to be used

boolean

clients[budgeted_hours_month]

Total hours budgeted per month for this client's projects

integer

clients[budgeted_cost_month]

Total cost budgeted per month for hours spend on this client's projects

decimal

Request

Route

POST /api/v1.0/clients

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "client": {
    "budgeted_cost_month": "0.0",
    "budgeted_hours_month": 0,
    "is_visible": true,
    "name": "Test client 2"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/clients" -d '{"client":{"budgeted_cost_month":"0.0","budgeted_hours_month":0,"is_visible":true,"name":"Test client 2"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 258

Body

{
  "id": 1,
  "name": "Test client 2",
  "is_visible": true,
  "soft_deleted": null,
  "project_ids": [

  ],
  "project_groups": [
    {
      "id": 1,
      "name": "Sem grupo",
      "is_default": true,
      "client_id": 1,
      "project_sub_groups": [
        {
          "id": 1,
          "name": "Sem subgrupo",
          "is_default": true,
          "project_group_id": 1
        }
      ]
    }
  ]
}
PUT

/api/v1.0/clients/:id

Update a Client

Parameters

Name Description type
clients[name] required

Client's name

string

clients[is_visible] required

Client is currently visible to be used

boolean

clients[budgeted_hours_month]

Total hours budgeted per month for this client's projects

integer

clients[budgeted_cost_month]

Total cost budgeted per month for hours spend on this client's projects

decimal

Request

Route

PUT /api/v1.0/clients/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "client": {
    "name": "Widgets Inc"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1" -d '{"client":{"name":"Widgets Inc"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 256

Body

{
  "id": 1,
  "name": "Widgets Inc",
  "is_visible": true,
  "soft_deleted": null,
  "project_ids": [

  ],
  "project_groups": [
    {
      "id": 1,
      "name": "Sem grupo",
      "is_default": true,
      "client_id": 1,
      "project_sub_groups": [
        {
          "id": 1,
          "name": "Sem subgrupo",
          "is_default": true,
          "project_group_id": 1
        }
      ]
    }
  ]
}

Comments

GET

/api/v1.0/tasks/:task_id/comments

List comments on a task

Request

Route

GET /api/v1.0/tasks/22/comments

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/22/comments" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 316

Body

[
  {
    "id": 1,
    "user_id": "coyote-95",
    "is_system_message": false,
    "text": "Comment text",
    "commenter_name": "Coyote 95",
    "children_count": 1,
    "commentable_id": 22,
    "commentable_type": "Task",
    "created_at": "2016-04-21T10:25:34-03:00",
    "love_count": 0,
    "task_id": 22,
    "comment_id": null,
    "team_id": null,
    "enterprise_id": null,
    "document_id": null
  }
]
GET

/api/v1.0/comments/:id

Show a specific comment

Request

Route

GET /api/v1.0/comments/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/comments/2" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 315

Body

{
  "id": 2,
  "user_id": "coyote-97",
  "is_system_message": false,
  "text": "Comment text",
  "commenter_name": "Coyote 97",
  "children_count": 0,
  "commentable_id": 1,
  "commentable_type": "Comment",
  "created_at": "2016-04-21T10:25:38-03:00",
  "love_count": 0,
  "task_id": null,
  "comment_id": 1,
  "team_id": null,
  "enterprise_id": null,
  "document_id": null
}
GET

/api/v1.0/comments/:id/love

Love a specific comment

Request

Route

GET /api/v1.0/comments/1/love

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/comments/1/love" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 334

Body

{
  "id": 1,
  "user_id": "coyote-99",
  "is_system_message": false,
  "text": "Comment text",
  "commenter_name": "Coyote 99",
  "children_count": 0,
  "commentable_id": "acme-52",
  "commentable_type": "Enterprise",
  "created_at": "2016-04-21T10:25:40-03:00",
  "love_count": 1,
  "task_id": null,
  "comment_id": null,
  "team_id": null,
  "enterprise_id": "acme-52",
  "document_id": null
}
GET

/api/v1.0/comments/:id/unlove

unLove a specific comment

Request

Route

GET /api/v1.0/comments/1/unlove

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/comments/1/unlove" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 336

Body

{
  "id": 1,
  "user_id": "coyote-101",
  "is_system_message": false,
  "text": "Comment text",
  "commenter_name": "Coyote 101",
  "children_count": 0,
  "commentable_id": "acme-53",
  "commentable_type": "Enterprise",
  "created_at": "2016-04-21T10:25:43-03:00",
  "love_count": 0,
  "task_id": null,
  "comment_id": null,
  "team_id": null,
  "enterprise_id": "acme-53",
  "document_id": null
}
POST

/api/v1.0/tasks/:task_id/comments

Create a new comment

Request

Route

POST /api/v1.0/tasks/24/comments

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "text": "Comment text"
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/24/comments" -d '{"text":"Comment text"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 316

Body

{
  "id": 1,
  "user_id": "coyote-104",
  "is_system_message": false,
  "text": "Comment text",
  "commenter_name": "Coyote 104",
  "children_count": 0,
  "commentable_id": 24,
  "commentable_type": "Task",
  "created_at": "2016-04-21T10:25:46-03:00",
  "love_count": 0,
  "task_id": 24,
  "comment_id": null,
  "team_id": null,
  "enterprise_id": null,
  "document_id": null
}
DELETE

/api/v1.0/comments/:id

Destroy a comment

Request

Route

DELETE /api/v1.0/comments/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/comments/2" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Demanders

GET

/api/v1.0/users/:user_id/demanders

List all demanders of user

Return a list all demanders of user.

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

GET /api/v1.0/users/coyote-109/demanders

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-109/demanders" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id User's ID string
name User's full name string
email User's email string
avatar_url User's chosen profile photo url
avatar_large_url User's chosen profile photo url
super_compact_view *internal usage* boolean
compact_side_menu *internal usage* boolean
is_master User is an administrator boolean
is_manager User is a manager boolean
can_create_client_project_and_task_types User has permission to create client, projects and task types boolean
time_zone IANA Time Zone Database zone name string
position Job position in company string
on_vacation User currently on vacation boolean
birthday User's birthday date
phone User phone string
gender User gender string
marital_status User marital status string
in_company_since Joining date in company date
is_certified Whether the user has passed Runrun.it certification boolean
language User preference language string
oid Constant size ID (internal use only) string
see_archived_clients_and_projects Admin decides either to see or not archived clients and projects boolean
budget_manager Can edit project extra costs boolean
Shift[weekday] Day of the week. Starting with Sunday = 0 integer
Shift[work_day] This day of the week is a working day for user boolean
Shift[shift_end] User leaves from work. Format HH:MM:SS time
Shift[shift_start] User arrives to work. Format HH:MM:SS time
Shift[lunch_start] User leaves for lunch. Format HH:MM:SS time
Shift[lunch_end] User returns from lunch. Format HH:MM:SS time

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1554

Body

[
  {
    "id": "coyote-109",
    "name": "Coyote 109",
    "email": "coyote109@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "49537adb9",
    "see_archived_clients_and_projects": null,
    "budget_manager": false,
    "shifts": [
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  }
]
POST

/api/v1.0/users/:user_id/demanders

Adds a demander to a user

Adds the user represented by demander_id as demander of the user_id

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

POST /api/v1.0/users/coyote-109/demanders

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "demander_id": "coyote-110"
}

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-109/demanders" -d '{"demander_id":"coyote-110"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1

Body

 
DELETE

/api/v1.0/users/:user_id/demanders/:id

Destroys a demander of a user

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

DELETE /api/v1.0/users/coyote-112/demanders/coyote-111

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-112/demanders/coyote-111" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Description

GET

/api/v1.0/descriptions

Query Multiple Descriptions

Parameters

Name Description
task_template_ids

IDs of Task Templates if belongs

project_ids

IDs of Projects if belongs

Request

Route

GET /api/v1.0/descriptions?project_ids=1%2C2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

project_ids=1,2

cURL

curl "https://secure.runrun.it/api/v1.0/descriptions?project_ids=1%2C2" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 98

Body

[
  {
    "project_id": 1,
    "description": "Cool Project"
  },
  {
    "project_id": 2,
    "description": "Expensive Project"
  }
]
GET

/api/v1.0/descriptions

Query Single Project Description

Parameters

Name Description type
task_template_id

ID of Task Template if belongs to one

integer

project_id

ID of Project if belongs to one

integer

Request

Route

GET /api/v1.0/descriptions?project_id=1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

project_id=1

cURL

curl "https://secure.runrun.it/api/v1.0/descriptions?project_id=1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 45

Body

{
  "project_id": 1,
  "description": "Cool Project"
}
GET

/api/v1.0/descriptions

Query Single Task Template Description

Parameters

Name Description type
task_template_id

ID of Task Template if belongs to one

integer

project_id

ID of Project if belongs to one

integer

Request

Route

GET /api/v1.0/descriptions?task_template_id=15

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_template_id=15

cURL

curl "https://secure.runrun.it/api/v1.0/descriptions?task_template_id=15" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 52

Body

{
  "task_template_id": 15,
  "description": "Awesome Task"
}
PUT

/api/v1.0/descriptions

Update Project Description

Parameters

Name Description type
description[description] required

The text of the description

text

Request

Route

PUT /api/v1.0/descriptions

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "description": {
    "project_id": 1,
    "description": "Another Awesome Project Description"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/descriptions" -d '{"description":{"project_id":1,"description":"Another Awesome Project Description"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 68

Body

{
  "project_id": 1,
  "description": "Another Awesome Project Description"
}
PUT

/api/v1.0/descriptions

Update Task Template Description

Parameters

Name Description type
description[description] required

The text of the description

text

Request

Route

PUT /api/v1.0/descriptions

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "description": {
    "task_template_id": 16,
    "description": "Another Awesome Project Description"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/descriptions" -d '{"description":{"task_template_id":16,"description":"Another Awesome Project Description"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 75

Body

{
  "task_template_id": 16,
  "description": "Another Awesome Project Description"
}

Documents

GET

/api/v1.0/tasks/:task_id/documents

List all documents uploaded to a task

Only includes files which have been successfully uploaded. Any files still in the process of being uploaded will not be returned

Request

Route

GET /api/v1.0/tasks/26/documents

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/26/documents" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 210

Body

[
  {
    "id": 1,
    "data_file_name": "arquivo.txt",
    "data_file_size": 10,
    "data_content_type": "text/plain",
    "data_updated_at": "2016-04-21T10:26:15-03:00",
    "uploader_id": null,
    "uploader_name": "João da Silva",
    "transfered": true
  }
]
GET

/api/v1.0/documents/:id

Show a document

Request

Route

GET /api/v1.0/documents/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/documents/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of document integer
data_file_name Name of the document string
data_file_size Size in bytes integer
data_content_type MIME type of file string
data_updated_at When the file was uploaded datetime
uploader_id ID of user who uploaded the file string
uploader_name Name of user who uploaded the file string
transfered Whether the file has be successfully uploaded to the cloud boolean

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 212

Body

{
  "id": 1,
  "data_file_name": "arquivo.txt",
  "data_file_size": 10,
  "data_content_type": "text/plain",
  "data_updated_at": "2016-04-21T10:26:17-03:00",
  "uploader_id": "coyote-126",
  "uploader_name": "Coyote 126",
  "transfered": true
}
DELETE

/api/v1.0/documents/:id

Destroy a document

Deleting a document is only possible by the original creator and may only be an option for a limited amount of time. Deleting a document will also delete the file from the cloud storage. It is NOT recoverable.

Request

Route

DELETE /api/v1.0/documents/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/documents/1" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/documents/download_zip

Download multiple documents as zip

This endpoint will generate a temporary key and redirect you to the download service's URL.

Parameters

Name Description
ids

List of document's ids to download

Request

Route

GET /api/v1.0/documents/download_zip?ids=1%2C2%2C3

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

ids=1,2,3

cURL

curl "https://secure.runrun.it/api/v1.0/documents/download_zip?ids=1%2C2%2C3" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

302

Headers

Content-Type: text/html; charset=utf-8
Content-Length: 174

Body

<html><body>You are being <a href="https://runrunit-zipper-stg.herokuapp.com?ref=9ba6e046-4249-4a12-b23e-29410e1e1c05&amp;downloadas=anexos.zip">redirected</a>.</body></html>

Enterprises

GET

/api/v1.0/enterprises/:id

Show details for requesting user's enterprise

Request

Route

GET /api/v1.0/enterprises/acme-74

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/enterprises/acme-74" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of enterprise string
name Name of enterprise string
phone Enterprise phone string
company_size Enterprise size string
company_sector Enterprise sector string
attachments_sum Total size of all stored documents in bytes float
remaining_attachment_space Total space remaining for documents in bytes float
logo_url Logo of enterprise string
alt_id Constant size ID (internal use only) string
oid Constant size ID (internal use only) string
support_phone Call this number to contact Runrun.it string
trial_days_left Days left to the date of trial period end, if it's a trial plan date
disabled_reason Why account is disabled string
currency_symbol Currency symbol (ISO 4217) string
created_at Enterprise creation date datetime
master_user_id ID of the account creator string
using_temporary_edition Is enterprise using a temporary edition in subscription?
temporary_edition_expiration Date when the temporary edition will expire datetime
plan[id] ID of plan integer
plan[name_pt] Plan name in Portuguese string
plan[name_en] Plan name in English string
plan[max_storage] Total available size for documents in bytes float
plan[max_users] Total number of users which can be active integer
plan[is_free] Is a free plan? boolean
plan[is_trial] Is a trial plan? boolean
plan[can_use_mobile] Can use mobile? boolean

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 645

Body

{
  "id": "acme-74",
  "name": "Acme 74",
  "phone": null,
  "company_size": null,
  "company_sector": "technology",
  "attachments_sum": 0.0,
  "remaining_attachment_space": 524288000.0,
  "logo_url": "/logos/small/missing.png",
  "alt_id": "749b1df688ab218775948c9a9acfd854",
  "oid": "49537adb9",
  "support_phone": "+1 (239) 288-2420",
  "trial_days_left": null,
  "disabled_reason": null,
  "currency_symbol": "USD",
  "created_at": "2016-04-21T10:26:28-03:00",
  "master_user_id": null,
  "using_temporary_edition": true,
  "temporary_edition_expiration": null,
  "plan": {
    "id": 1,
    "name_pt": "Plano 5",
    "name_en": "Plan 5",
    "max_storage": 524288000.0,
    "max_users": 5,
    "is_free": true,
    "is_trial": false,
    "can_use_mobile": false
  }
}
GET

/api/v1.0/enterprises/:id

Show details for requesting user's enterprise

Request

Route

GET /api/v1.0/enterprises/acme-74

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/enterprises/acme-74" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of enterprise string
name Name of enterprise string
phone Enterprise phone string
company_size Enterprise size string
company_sector Enterprise sector string
attachments_sum Total size of all stored documents in bytes float
remaining_attachment_space Total space remaining for documents in bytes float
logo_url Logo of enterprise string
alt_id Constant size ID (internal use only) string
oid Constant size ID (internal use only) string
support_phone Call this number to contact Runrun.it string
trial_days_left Days left to the date of trial period end, if it's a trial plan date
disabled_reason Why account is disabled string
currency_symbol Currency symbol (ISO 4217) string
created_at Enterprise creation date datetime
master_user_id ID of the account creator string
using_temporary_edition Is enterprise using a temporary edition in subscription?
temporary_edition_expiration Date when the temporary edition will expire datetime
plan[id] ID of plan integer
plan[name_pt] Plan name in Portuguese string
plan[name_en] Plan name in English string
plan[max_storage] Total available size for documents in bytes float
plan[max_users] Total number of users which can be active integer
plan[is_free] Is a free plan? boolean
plan[is_trial] Is a trial plan? boolean
plan[can_use_mobile] Can use mobile? boolean

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 645

Body

{
  "id": "acme-74",
  "name": "Acme 74",
  "phone": null,
  "company_size": null,
  "company_sector": "technology",
  "attachments_sum": 0.0,
  "remaining_attachment_space": 524288000.0,
  "logo_url": "/logos/small/missing.png",
  "alt_id": "749b1df688ab218775948c9a9acfd854",
  "oid": "49537adb9",
  "support_phone": "+1 (239) 288-2420",
  "trial_days_left": null,
  "disabled_reason": null,
  "currency_symbol": "USD",
  "created_at": "2016-04-21T10:26:28-03:00",
  "master_user_id": null,
  "using_temporary_edition": true,
  "temporary_edition_expiration": null,
  "plan": {
    "id": 1,
    "name_pt": "Plano 5",
    "name_en": "Plan 5",
    "max_storage": 524288000.0,
    "max_users": 5,
    "is_free": true,
    "is_trial": false,
    "can_use_mobile": false
  }
}
PUT

/api/v1.0/enterprises/:id

Update enterprise

Parameters

Name Description type
enterprise[id] required

ID of enterprise

string

Request

Route

PUT /api/v1.0/enterprises/acme-75

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "enterprise": {
    "name": "New name"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/enterprises/acme-75" -d '{"enterprise":{"name":"New name"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 646

Body

{
  "id": "acme-75",
  "name": "New name",
  "phone": null,
  "company_size": null,
  "company_sector": "technology",
  "attachments_sum": 0.0,
  "remaining_attachment_space": 524288000.0,
  "logo_url": "/logos/small/missing.png",
  "alt_id": "275c8195531324d071bea724025801c1",
  "oid": "49537adb9",
  "support_phone": "+1 (239) 288-2420",
  "trial_days_left": null,
  "disabled_reason": null,
  "currency_symbol": "USD",
  "created_at": "2016-04-21T10:26:30-03:00",
  "master_user_id": null,
  "using_temporary_edition": true,
  "temporary_edition_expiration": null,
  "plan": {
    "id": 1,
    "name_pt": "Plano 5",
    "name_en": "Plan 5",
    "max_storage": 524288000.0,
    "max_users": 5,
    "is_free": true,
    "is_trial": false,
    "can_use_mobile": false
  }
}

Estimates

GET

/api/v1.0/tasks/:task_id/estimates

Show all the estimatives for a task.

"Show the all the estimatives for a task."

Request

Route

GET /api/v1.0/tasks/1/estimates

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/1/estimates" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 219

Body

[
  {
    "id": 1,
    "task_id": 1,
    "work_seconds": 3600,
    "workflow_element_id": null,
    "created_at": "2016-04-21T10:26:33-03:00"
  },
  {
    "id": 2,
    "task_id": 1,
    "work_seconds": 7200,
    "workflow_element_id": null,
    "created_at": "2016-04-21T10:26:34-03:00"
  }
]
POST

/api/v1.0/tasks/:task_id/estimates

Create a estimative for a task.

"Create a estimate for a task."

Request

Route

POST /api/v1.0/tasks/1/estimates

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "estimate": {
    "task_id": 1,
    "work_seconds": "9000"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/1/estimates" -d '{"estimate":{"task_id":1,"work_seconds":"9000"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 108

Body

{
  "id": 2,
  "task_id": 1,
  "work_seconds": 9000,
  "workflow_element_id": null,
  "created_at": "2016-04-21T10:26:37-03:00"
}

Manual Work Periods

GET

/api/v1.0/manual_work_periods

List all manual work periods

List all manual work periods. If a user_id and/or task_id is supplied, only work periods for the given user and/or task will be returned. from and before can be used to specify a date window, in this resource, the time and timezone if provided, will be ignored. The default period is 1 month if not specified.

Parameters

Name Description type
manual_work_period[task_id]

ID of related task

integer

manual_work_period[user_id]

ID of user who did the work

string

manual_work_period[from]
manual_work_period[before]

Request

Route

GET /api/v1.0/manual_work_periods?task_id=31

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=31

cURL

curl "https://secure.runrun.it/api/v1.0/manual_work_periods?task_id=31" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 117

Body

[
  {
    "id": 1,
    "task_id": 31,
    "seconds": 1000,
    "date_to_apply": "2016-04-21",
    "worker_name": "Coyote 139",
    "user_id": "coyote-139"
  }
]
GET

/api/v1.0/manual_work_periods/:id

Show a Manual Work Period

Request

Route

GET /api/v1.0/manual_work_periods/1?task_id=32

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=32

cURL

curl "https://secure.runrun.it/api/v1.0/manual_work_periods/1?task_id=32" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID integer
task_id ID of related task integer
seconds Time added in seconds integer
date_to_apply Date time was worked date
worker_name Name of user who did the work string
user_id ID of user who did the work string

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 115

Body

{
  "id": 1,
  "task_id": 32,
  "seconds": 1000,
  "date_to_apply": "2016-04-21",
  "worker_name": "Coyote 141",
  "user_id": "coyote-141"
}
POST

/api/v1.0/manual_work_periods

Create a Manual Work Period

Create a record that additional time was worked on a given task, by a given user, on a specific day.

Parameters

Name Description type
manual_work_period[task_id] required

ID of related task

integer

manual_work_period[user_id] required

ID of user who did the work

string

manual_work_period[date_to_apply] required

Date time was worked

date

manual_work_period[seconds] required

Time added in seconds

integer

Request

Route

POST /api/v1.0/manual_work_periods

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "manual_work_period": {
    "date_to_apply": "2016-04-21",
    "seconds": 3600,
    "task_id": 33,
    "user_id": 1
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/manual_work_periods" -d '{"manual_work_period":{"date_to_apply":"2016-04-21","seconds":3600,"task_id":33,"user_id":1}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 115

Body

{
  "id": 1,
  "task_id": 33,
  "seconds": 3600,
  "date_to_apply": "2016-04-21",
  "worker_name": "Coyote 143",
  "user_id": "coyote-143"
}
PUT

/api/v1.0/manual_work_periods/:id

Update a Manual Work Period

After creation the only updateable field is seconds. In general, it is better to delete and create a new Manual Work Period rather than update an existing one.

Parameters

Name Description type
manual_work_period[seconds] required

Time added in seconds

integer

Request

Route

PUT /api/v1.0/manual_work_periods/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 34,
  "manual_work_periods": {
    "seconds": 2000
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/manual_work_periods/1" -d '{"task_id":34,"manual_work_periods":{"seconds":2000}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 115

Body

{
  "id": 1,
  "task_id": 34,
  "seconds": 2000,
  "date_to_apply": "2016-04-21",
  "worker_name": "Coyote 145",
  "user_id": "coyote-145"
}
DELETE

/api/v1.0/manual_work_periods/:id

Destroy a Manual Work Period

Request

Route

DELETE /api/v1.0/manual_work_periods/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 35
}

cURL

curl "https://secure.runrun.it/api/v1.0/manual_work_periods/1" -d '{"task_id":35}' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Holidays

GET

/api/v1.0/off_days

List all Holidays

Request

Route

GET /api/v1.0/off_days

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/off_days" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 117

Body

[
  {
    "id": 1,
    "day": "2016-04-22",
    "description": "Developer Day"
  },
  {
    "id": 2,
    "day": "2016-04-23",
    "description": "Ice Cream Day"
  }
]
GET

/api/v1.0/off_days/:id

Show a Holiday

Request

Route

GET /api/v1.0/off_days/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/off_days/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of the holiday integer
day Date the holiday occurs on date
description Name/description of holiday string

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 58

Body

{
  "id": 1,
  "day": "2016-04-24",
  "description": "City holiday 1"
}
POST

/api/v1.0/off_days

Create a Holiday

Create a holiday. Holidays occurring in the past cannot be created (i.e. holidays where day is before today). Only account admininstrators can create holidays.

Parameters

Name Description type
off_day[day] required

Date the holiday occurs on

date

off_day[description] required

Name/description of holiday

string

Request

Route

POST /api/v1.0/off_days

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "off_day": {
    "day": "2016-04-25",
    "description": "City holiday 2"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/off_days" -d '{"off_day":{"day":"2016-04-25","description":"City holiday 2"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 58

Body

{
  "id": 1,
  "day": "2016-04-25",
  "description": "City holiday 2"
}
PUT

/api/v1.0/off_days/:id

Update a Holiday

Update a holiday. Updating the day value is best done as a destroy followed by a create. Only account administrators can perform this action.

Parameters

Name Description type
off_days[description]

Name/description of holiday

string

Request

Route

PUT /api/v1.0/off_days/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "off_day": {
    "description": "Developer Day"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/off_days/1" -d '{"off_day":{"description":"Developer Day"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 57

Body

{
  "id": 1,
  "day": "2016-04-26",
  "description": "Developer Day"
}
DELETE

/api/v1.0/off_days/:id

Destroy a Holiday

Destroy a holiday. Only account administrators can perform this action.

Request

Route

DELETE /api/v1.0/off_days/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/off_days/1" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Partners

GET

/api/v1.0/users/:user_id/partners

List all partners of user

Return a list of all partners of user. Partners of a user are users that the user can assign tasks to.

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

GET /api/v1.0/users/coyote-176/partners

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-176/partners" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id User's ID string
name User's full name string
email User's email string
avatar_url User's chosen profile photo url
avatar_large_url User's chosen profile photo url
super_compact_view *internal usage* boolean
compact_side_menu *internal usage* boolean
is_master User is an administrator boolean
is_manager User is a manager boolean
can_create_client_project_and_task_types User has permission to create client, projects and task types boolean
time_zone IANA Time Zone Database zone name string
position Job position in company string
on_vacation User currently on vacation boolean
birthday User's birthday date
phone User phone string
gender User gender string
marital_status User marital status string
in_company_since Joining date in company date
is_certified Whether the user has passed Runrun.it certification boolean
language User preference language string
oid Constant size ID (internal use only) string
see_archived_clients_and_projects Admin decides either to see or not archived clients and projects boolean
budget_manager Can edit project extra costs boolean
Shift[weekday] Day of the week. Starting with Sunday = 0 integer
Shift[work_day] This day of the week is a working day for user boolean
Shift[shift_end] User leaves from work. Format HH:MM:SS time
Shift[shift_start] User arrives to work. Format HH:MM:SS time
Shift[lunch_start] User leaves for lunch. Format HH:MM:SS time
Shift[lunch_end] User returns from lunch. Format HH:MM:SS time

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1554

Body

[
  {
    "id": "coyote-176",
    "name": "Coyote 176",
    "email": "coyote163@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "49537adb9",
    "see_archived_clients_and_projects": null,
    "budget_manager": false,
    "shifts": [
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  }
]
POST

/api/v1.0/users/:user_id/partners

Adds a partner to a user

Adds the user represented by partner_id as partner of the user_id

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

POST /api/v1.0/users/coyote-174/partners

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "partner_id": "coyote-175"
}

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-174/partners" -d '{"partner_id":"coyote-175"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1

Body

 
DELETE

/api/v1.0/users/:user_id/partners/:id

Destroy a partner of a user

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

DELETE /api/v1.0/users/coyote-176/partners/coyote-177

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-176/partners/coyote-177" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Posts

GET

/api/v1.0/posts/unseen_activities

Get unseen post activities

This endpoint will return a data representation for each bulletin board containing the ID of the team, and the number of unread items. The only exception is the enterprise board where the id string: "enterprise".

Request

Route

GET /api/v1.0/posts/unseen_activities

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/posts/unseen_activities" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of item integer
count Amount of unread items integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 31

Body

[
  {
    "id": "enterprise",
    "count": 0
  }
]
GET

/api/v1.0/posts/enterprise

Get all posts for a enterprise

Request

Route

GET /api/v1.0/posts/enterprise

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/posts/enterprise" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id Id of the comment integer
user_id Id of the comment creator string
is_system_message Flag saying if it is a system comment boolean
text The actual text of the comment text
commenter_name The name of the creator string
children_count Amount of replies in this comment integer
commentable_id [Deprecated] The commentable id string
commentable_type [Deprecated] To which resource type does this comment belongs string
created_at Datetime the comment has been made datetime
love_count Amount of users that loved this comment integer
task_id Id of task which the comment belong to string
comment_id Id of comment which the comment belong to integer
team_id Id of team which the comment belong to integer
enterprise_id Id of enterprise which the comment belong to string
document_id Id of referenced document (used by system messages) integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 345

Body

[
  {
    "id": 1,
    "user_id": "coyote-179",
    "is_system_message": false,
    "text": "A enterprise post",
    "commenter_name": "Coyote 179",
    "children_count": 0,
    "commentable_id": "acme-111",
    "commentable_type": "Enterprise",
    "created_at": "2016-04-21T10:27:47-03:00",
    "love_count": 0,
    "task_id": null,
    "comment_id": null,
    "team_id": null,
    "enterprise_id": "acme-111",
    "document_id": null
  }
]
POST

/api/v1.0/posts/enterprise

Create a new post for a enterprise

Parameters

Name Description type
text required

The text you want to post

text

Request

Route

POST /api/v1.0/posts/enterprise

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "text": "A message"
}

cURL

curl "https://secure.runrun.it/api/v1.0/posts/enterprise" -d '{"text":"A message"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 335

Body

{
  "id": 1,
  "user_id": "coyote-181",
  "is_system_message": false,
  "text": "A message",
  "commenter_name": "Coyote 181",
  "children_count": 0,
  "commentable_id": "acme-112",
  "commentable_type": "Enterprise",
  "created_at": "2016-04-21T10:27:49-03:00",
  "love_count": 0,
  "task_id": null,
  "comment_id": null,
  "team_id": null,
  "enterprise_id": "acme-112",
  "document_id": null
}
GET

/api/v1.0/posts/teams/:team_id

Get all posts for a team

Parameters

Name Description type
team_id required

The desired team_id

integer

text required

The text you want to post

text

Request

Route

GET /api/v1.0/posts/teams/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/posts/teams/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id Id of the comment integer
user_id Id of the comment creator string
is_system_message Flag saying if it is a system comment boolean
text The actual text of the comment text
commenter_name The name of the creator string
children_count Amount of replies in this comment integer
commentable_id [Deprecated] The commentable id string
commentable_type [Deprecated] To which resource type does this comment belongs string
created_at Datetime the comment has been made datetime
love_count Amount of users that loved this comment integer
task_id Id of task which the comment belong to string
comment_id Id of comment which the comment belong to integer
team_id Id of team which the comment belong to integer
enterprise_id Id of enterprise which the comment belong to string
document_id Id of referenced document (used by system messages) integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 315

Body

[
  {
    "id": 1,
    "user_id": "coyote-182",
    "is_system_message": false,
    "text": "A team post",
    "commenter_name": "Coyote 182",
    "children_count": 0,
    "commentable_id": 1,
    "commentable_type": "Team",
    "created_at": "2016-04-21T10:27:51-03:00",
    "love_count": 0,
    "task_id": null,
    "comment_id": null,
    "team_id": 1,
    "enterprise_id": null,
    "document_id": null
  }
]
POST

/api/v1.0/posts/teams/:team_id

Create a new post for a team

Parameters

Name Description type
team_id required

The desired team_id

integer

text required

The text you want to post

text

Request

Route

POST /api/v1.0/posts/teams/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "text": "A message"
}

cURL

curl "https://secure.runrun.it/api/v1.0/posts/teams/1" -d '{"text":"A message"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id Id of the comment integer
user_id Id of the comment creator string
is_system_message Flag saying if it is a system comment boolean
text The actual text of the comment text
commenter_name The name of the creator string
children_count Amount of replies in this comment integer
commentable_id [Deprecated] The commentable id string
commentable_type [Deprecated] To which resource type does this comment belongs string
created_at Datetime the comment has been made datetime
love_count Amount of users that loved this comment integer
task_id Id of task which the comment belong to string
comment_id Id of comment which the comment belong to integer
team_id Id of team which the comment belong to integer
enterprise_id Id of enterprise which the comment belong to string
document_id Id of referenced document (used by system messages) integer

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 311

Body

{
  "id": 1,
  "user_id": "coyote-185",
  "is_system_message": false,
  "text": "A message",
  "commenter_name": "Coyote 185",
  "children_count": 0,
  "commentable_id": 1,
  "commentable_type": "Team",
  "created_at": "2016-04-21T10:27:54-03:00",
  "love_count": 0,
  "task_id": null,
  "comment_id": null,
  "team_id": 1,
  "enterprise_id": null,
  "document_id": null
}

Prerequisites

GET

/api/v1.0/tasks/:task_id/prerequisites

List all task prerequisites from a task

Parameters

Name Description type
task_id required

ID of the task

integer

Request

Route

GET /api/v1.0/tasks/36/prerequisites

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/36/prerequisites" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 731

Body

[
  {
    "id": 37,
    "uid": 37,
    "_permission_": true,
    "title": "Bla",
    "is_working_on": false,
    "responsible_id": "coyote-186",
    "user_id": "coyote-188",
    "type_id": 7,
    "project_id": 2,
    "desired_date": null,
    "desired_date_with_time": null,
    "estimated_start_date": null,
    "estimated_delivery_date": null,
    "close_date": null,
    "priority": 2,
    "task_state_id": null,
    "was_reopened": false,
    "is_closed": false,
    "on_going": false,
    "team_id": null,
    "tag_list": "",
    "estimated_delivery_date_updated": false,
    "queue_position": 2,
    "scheduled_start_time": null,
    "created_at": "2016-04-21T10:27:57-03:00",
    "start_date": null,
    "current_estimate_seconds": 3600,
    "current_worked_time": 0,
    "current_evaluator_id": null,
    "approved": null,
    "follower_ids": [

    ],
    "workflow_id": null,
    "repetition_rule_id": null,
    "checklist_id": null
  }
]
POST

/api/v1.0/tasks/:task_id/prerequisites

Add a task prerequisite to a task

Parameters

Name Description type
task_id required

ID of the task

integer

Request

Route

POST /api/v1.0/tasks/38/prerequisites

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "prerequisite": {
    "id": 39
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/38/prerequisites" -d '{"prerequisite":{"id":39}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 729

Body

{
  "id": 39,
  "uid": 39,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-189",
  "user_id": "coyote-191",
  "type_id": 7,
  "project_id": 2,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": null,
  "close_date": null,
  "priority": 2,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": false,
  "queue_position": 2,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:28:02-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
DELETE

/api/v1.0/tasks/:task_id/prerequisites/:id

Remove a task prerequisite from a task

Parameters

Name Description type
task_id required

ID of the task

integer

id required

ID of the task prerequisite

integer

Request

Route

DELETE /api/v1.0/tasks/42/prerequisites/43

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/42/prerequisites/43" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/task_templates/:task_template_id/prerequisites

List all task template prerequisites from a task template

Parameters

Name Description type
task_template_id required

ID of the task template

integer

Request

Route

GET /api/v1.0/task_templates/17/prerequisites

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/17/prerequisites" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 250

Body

[
  {
    "id": 18,
    "title": "Task Template",
    "responsible_id": "coyote-200",
    "user_id": "coyote-200",
    "type_id": 7,
    "queue_position": 1,
    "project_template_id": 1,
    "team_id": null,
    "tag_list": "",
    "created_at": "2016-04-21T10:28:15-03:00",
    "follower_ids": [

    ],
    "workflow_id": null
  }
]
POST

/api/v1.0/task_templates/:task_template_id/prerequisites

Add a task template prerequisite to a task template

Parameters

Name Description type
task_template_id required

ID of the task template

integer

Request

Route

POST /api/v1.0/task_templates/19/prerequisites

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "prerequisite": {
    "id": 20
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/19/prerequisites" -d '{"prerequisite":{"id":20}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 251

Body

{
  "id": 20,
  "title": "Task Template",
  "responsible_id": "coyote-203",
  "user_id": "coyote-203",
  "type_id": 7,
  "queue_position": null,
  "project_template_id": 1,
  "team_id": null,
  "tag_list": "",
  "created_at": "2016-04-21T10:28:19-03:00",
  "follower_ids": [

  ],
  "workflow_id": null
}
DELETE

/api/v1.0/task_templates/:task_template_id/prerequisites/:id

Remove a task template prerequisite from a task template

Parameters

Name Description type
task_template_id required

ID of the task template

integer

id required

ID of the task template prerequisite

integer

Request

Route

DELETE /api/v1.0/task_templates/23/prerequisites/24

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_templates/23/prerequisites/24" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

ProjectExtraCost

GET

/api/v1.0/projects/:project_id/extra_costs

List all extra costs of a project

Request

Route

GET /api/v1.0/projects/1/extra_costs

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1/extra_costs" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 113

Body

[
  {
    "id": 1,
    "description": "Cost 1",
    "date": "2016-04-21",
    "amount": "1000.0",
    "project_id": 1,
    "author_name": "Coyote 210"
  }
]
GET

/api/v1.0/projects/:project_id/extra_costs/:id

Show a extra cost of a project

Request

Route

GET /api/v1.0/projects/1/extra_costs/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1/extra_costs/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of project extra cost integer
description Description about the project extra cost string
date When project extra cost was created date
amount Project extra cost value decimal
project_id Project extra cost associated project ID integer
author_name User's name that created the project extra cost string
author_avatar_url User's avatar that created the project extra cost string

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 213

Body

{
  "id": 1,
  "description": "Cost 2",
  "date": "2016-06-10",
  "amount": "1000.0",
  "project_id": 1,
  "author_name": "Coyote 216",
  "author_avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png"
}
POST

/api/v1.0/projects/:project_id/extra_costs

Create a new Project Extra Cost

Parameters

Name Description type
project_extra_cost[description] required

Description about the project extra cost

string

project_extra_cost[date] required

When project extra cost was created

date

project_extra_cost[amount] required

Project extra cost value

decimal

Request

Route

POST /api/v1.0/projects/1/extra_costs

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_extra_cost": {
    "amount": "1000.0",
    "date": "2016-04-21",
    "description": "Cost 3"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1/extra_costs" -d '{"project_extra_cost":{"amount":"1000.0","date":"2016-04-21","description":"Cost 3"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 111

Body

{
  "id": 1,
  "description": "Cost 3",
  "date": "2016-04-21",
  "amount": "1000.0",
  "project_id": 1,
  "author_name": "Coyote 215"
}

Project Groups

GET

/api/v1.0/clients/:client_id/project_groups

List all Project Groups

Request

Route

GET /api/v1.0/clients/1/project_groups

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/project_groups" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 154

Body

[
  {
    "id": 1,
    "name": "Sem grupo",
    "is_default": true,
    "client_id": 1,
    "project_sub_groups": [
      {
        "id": 1,
        "name": "Sem subgrupo",
        "is_default": true,
        "project_group_id": 1
      }
    ]
  }
]
GET

/api/v1.0/clients/:client_id/project_groups/:id

Show a Project Group

Request

Route

GET /api/v1.0/clients/1/project_groups/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/project_groups/2" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 159

Body

{
  "id": 2,
  "name": "Project Group 1",
  "is_default": false,
  "client_id": 1,
  "project_sub_groups": [
    {
      "id": 2,
      "name": "Sem subgrupo",
      "is_default": true,
      "project_group_id": 2
    }
  ]
}
POST

/api/v1.0/clients/:client_id/project_groups

Create a Project Group

When creating a project group the name must be unique among clients belonging to the same enterprise.

Parameters

Name Description type
name required

Name of project group

string

is_default required

Project group is default for that client?

boolean

Request

Route

POST /api/v1.0/clients/1/project_groups

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_group": {
    "is_default": false,
    "name": "Project Group 2"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/project_groups" -d '{"project_group":{"is_default":false,"name":"Project Group 2"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 159

Body

{
  "id": 2,
  "name": "Project Group 2",
  "is_default": false,
  "client_id": 1,
  "project_sub_groups": [
    {
      "id": 2,
      "name": "Sem subgrupo",
      "is_default": true,
      "project_group_id": 2
    }
  ]
}
PUT

/api/v1.0/clients/:client_id/project_groups/:id

Update a Project Group

When updating a project group the name must be unique among clients belonging to the same enterprise.

Request

Route

PUT /api/v1.0/clients/1/project_groups/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_group": {
    "name": "New Name"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/project_groups/2" -d '{"project_group":{"name":"New Name"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 152

Body

{
  "id": 2,
  "name": "New Name",
  "is_default": false,
  "client_id": 1,
  "project_sub_groups": [
    {
      "id": 2,
      "name": "Sem subgrupo",
      "is_default": true,
      "project_group_id": 2
    }
  ]
}
DELETE

/api/v1.0/clients/:client_id/project_groups/:id

Destroy a Project Group

Request

Route

DELETE /api/v1.0/clients/1/project_groups/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/project_groups/2" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Project Sub Groups

GET

/api/v1.0/project_groups/:project_group_id/project_sub_groups

List all Project Sub Groups

Request

Route

GET /api/v1.0/project_groups/2/project_sub_groups

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_groups/2/project_sub_groups" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 71

Body

[
  {
    "id": 2,
    "name": "Sem subgrupo",
    "is_default": true,
    "project_group_id": 2
  }
]
GET

/api/v1.0/project_groups/:project_group_id/project_sub_groups/:id

Show a Project Sub Group

Request

Route

GET /api/v1.0/project_groups/2/project_sub_groups/3

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_groups/2/project_sub_groups/3" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 77

Body

{
  "id": 3,
  "name": "Project Sub Group 1",
  "is_default": false,
  "project_group_id": 2
}
POST

/api/v1.0/project_groups/:project_group_id/project_sub_groups

Create a Project Sub Group

When creating a project sub group the name must be unique among project groups belonging to the same client.

Parameters

Name Description type
name required

Name of project group

string

is_default required

Project group is default for that client?

boolean

Request

Route

POST /api/v1.0/project_groups/2/project_sub_groups

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_sub_group": {
    "is_default": false,
    "name": "Project Sub Group 2"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_groups/2/project_sub_groups" -d '{"project_sub_group":{"is_default":false,"name":"Project Sub Group 2"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 77

Body

{
  "id": 3,
  "name": "Project Sub Group 2",
  "is_default": false,
  "project_group_id": 2
}
PUT

/api/v1.0/project_groups/:project_group_id/project_sub_groups/:id

Update a Project Sub Group

When updating a project sub group the name must be unique among project groups belonging to the same client.

Request

Route

PUT /api/v1.0/project_groups/2/project_sub_groups/3

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_sub_group": {
    "name": "New Name"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_groups/2/project_sub_groups/3" -d '{"project_sub_group":{"name":"New Name"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 66

Body

{
  "id": 3,
  "name": "New Name",
  "is_default": false,
  "project_group_id": 2
}
DELETE

/api/v1.0/project_groups/:project_group_id/project_sub_groups/:id

Destroy a Project Sub Group

Request

Route

DELETE /api/v1.0/project_groups/2/project_sub_groups/3

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_groups/2/project_sub_groups/3" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Project Templates

GET

/api/v1.0/project_templates

List all Project Templates

Request

Route

GET /api/v1.0/project_templates

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2

Body

[

]
GET

/api/v1.0/project_templates/:id

Show a Project Template

Request

Route

GET /api/v1.0/project_templates/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 42

Body

{
  "id": 1,
  "name": "Test project template 32"
}
POST

/api/v1.0/project_templates/

Create a Project Template

When creating a project template the name must be unique among projects belonging to the same client.

Parameters

Name Description type
name required

Name of project template

string

Request

Route

POST /api/v1.0/project_templates/

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_template": {
    "name": "Test project template 33"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/" -d '{"project_template":{"name":"Test project template 33"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 42

Body

{
  "id": 1,
  "name": "Test project template 33"
}
PUT

/api/v1.0/project_templates/:id

Update a Project Template

When updating a project template the name must be unique among projects belonging to the same client.

Request

Route

PUT /api/v1.0/project_templates/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project_template": {
    "name": "New Name"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1" -d '{"project_template":{"name":"New Name"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 26

Body

{
  "id": 1,
  "name": "New Name"
}
DELETE

/api/v1.0/project_templates/:id

Destroy a Project Template

Request

Route

DELETE /api/v1.0/project_templates/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Projects

GET

/api/v1.0/projects

List all projects

Request

Route

GET /api/v1.0/projects

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 2

Body

[

]
GET

/api/v1.0/projects/:id

Show a Project

Request

Route

GET /api/v1.0/projects/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of project integer
name Name of project string
is_active Is the project active? boolean
client_id ID of project client integer
project_group_id ID of project group integer
project_sub_group_id ID of project sub group integer
budgeted_cost Budgeted cost of the project decimal
desired_date Requested complete by date and time datetime
client_id ID of client this project belongs to integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 152

Body

{
  "id": 1,
  "name": "Test project 55",
  "is_active": true,
  "client_id": 1,
  "project_group_id": 1,
  "project_sub_group_id": 1,
  "budgeted_cost": "0.0",
  "desired_date": null
}
POST

/api/v1.0/projects/

Create a Project

When creating a project the name must be unique among projects belonging to the same client.

Parameters

Name Description type
projects[name] required

Name of project

string

projects[client_id] required

Client this project will belong to

integer

projects[is_active] required

Project will be active to be used

boolean

Request

Route

POST /api/v1.0/projects/

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "project": {
    "client_id": 1,
    "is_active": true,
    "name": "Test project 54"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/projects/" -d '{"project":{"client_id":1,"is_active":true,"name":"Test project 54"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 110

Body

{
  "id": 1,
  "name": "Test project 54",
  "is_active": true,
  "client_id": 1,
  "project_group_id": 1,
  "project_sub_group_id": 1
}
GET

/api/v1.0/projects/:id/summary

Summary of project

  • Start date (the first time a project task was started)
  • Close date (the last task closed date, if project is closed, or the last task estimated close date from project tasks)
  • Is closed? (if all project tasks are closed)
  • Summary of task projects grouped by status and types. Grouping by type shows up to four most frequent types. The remaining types are grouped under "others" (id: 0).

Parameters

Name Description type
id required

ID of project

integer

Request

Route

GET /api/v1.0/projects/1/summary

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1/summary" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 522

Body

{
  "start_date": "2015-04-02T18:00:00Z",
  "close_date": "2015-04-03T18:00:00Z",
  "is_closed": false,
  "tasks": {
    "closed": {
      "amount": 21,
      "worked_time": 317520,
      "types": [
        {
          "id": 11,
          "amount": 6
        },
        {
          "id": 10,
          "amount": 5
        },
        {
          "id": 9,
          "amount": 4
        },
        {
          "id": 8,
          "amount": 3
        },
        {
          "id": 0,
          "amount": 3
        }
      ]
    },
    "working_on": {
      "amount": 2,
      "worked_time": 5040,
      "types": [
        {
          "id": 14,
          "amount": 1
        },
        {
          "id": 15,
          "amount": 1
        }
      ]
    },
    "queued": {
      "amount": 2,
      "worked_time": 41400,
      "types": [
        {
          "id": 12,
          "amount": 1
        },
        {
          "id": 13,
          "amount": 1
        }
      ]
    }
  },
  "work_time": {
    "worked_and_delivered": 317520,
    "worked": 46440,
    "pending": 3600
  }
}
GET

/api/v1.0/projects/:id/involved_users

List users involved in a project

Involved users:

  • responsible
  • owners
  • followers

Parameters

Name Description type
id required

ID of project

integer

Request

Route

GET /api/v1.0/projects/1/involved_users

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/projects/1/involved_users" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1531

Body

[
  {
    "id": "coyote-242",
    "name": "Coyote 242",
    "email": "coyote229@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "49537adb9",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  }
]

Tags

GET

/api/v1.0/tags

Query tags

Parameters

Name Description type default
term required

Search term for tag name. For a given term will be return a list of tags that match fully or partially with tag name. The term MUST be at least 3 characters.

string

limit

Number of record to return. The value must be between 1 and 100.

integer

100

Request

Route

GET /api/v1.0/tags?term=tag

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

term=tag

cURL

curl "https://secure.runrun.it/api/v1.0/tags?term=tag" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 70

Body

[
  {
    "id": 3,
    "name": "tag3"
  },
  {
    "id": 2,
    "name": "tag2"
  },
  {
    "id": 1,
    "name": "tag1"
  }
]

Task Description

GET

/api/v1.0/tasks/:task_id/description

Show the task description

Show the task description.

Request

Route

GET /api/v1.0/tasks/1/description

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/1/description" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 53

Body

{
  "id": 1,
  "_permission_": true,
  "description": "Awesome!"
}
PUT

/api/v1.0/tasks/:task_id/description

Update the task description

Update a task description.

Parameters

Name Description type
description required

Longer description of task scope

text

_permission_

Requestor has full-view access

boolean

Request

Route

PUT /api/v1.0/tasks/1/description

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_description": {
    "created_at": null,
    "description": "Gorgeous!",
    "id": null,
    "task_id": 1,
    "updated_at": null
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/1/description" -d '{"task_description":{"created_at":null,"description":"Gorgeous!","id":null,"task_id":1,"updated_at":null}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 54

Body

{
  "id": 1,
  "_permission_": true,
  "description": "Gorgeous!"
}

Task States

GET

/api/v1.0/task_states

List all Task States

Request

Route

GET /api/v1.0/task_states

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_states" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 213

Body

[
  {
    "id": 1,
    "name": "Trabalhando",
    "is_working_on": true,
    "is_delivered": false
  },
  {
    "id": 2,
    "name": "Entregue",
    "is_working_on": false,
    "is_delivered": true
  },
  {
    "id": 3,
    "name": "Avaliando",
    "is_working_on": false,
    "is_delivered": false
  }
]
GET

/api/v1.0/task_states/:id

Show a Task State

Request

Route

GET /api/v1.0/task_states/4

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_states/4" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of Task State integer
name Display name of Task State string
is_working_on Is system state for working on boolean
is_delivered Is system state for delivered boolean

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 73

Body

{
  "id": 4,
  "name": "Task State 1",
  "is_working_on": false,
  "is_delivered": false
}
POST

/api/v1.0/task_states

Create a Task State

Create a task state. The is_working_on and is_delivered fields are reserved for use by the system and cannot be set. Only account administrators can perform this action.

Parameters

Name Description type
task_state[name] required

Display name of Task State

string

Request

Route

POST /api/v1.0/task_states

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_state": {
    "name": "Task State 2"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/task_states" -d '{"task_state":{"name":"Task State 2"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 73

Body

{
  "id": 4,
  "name": "Task State 2",
  "is_working_on": false,
  "is_delivered": false
}
PUT

/api/v1.0/task_states/:id

Update a Task State

Update a task state. Only account administrators can perform this action.

Parameters

Name Description type
task_states[name]

Display name of Task State

string

Request

Route

PUT /api/v1.0/task_states/4

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_state": {
    "name": "Release pending"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/task_states/4" -d '{"task_state":{"name":"Release pending"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 76

Body

{
  "id": 4,
  "name": "Release pending",
  "is_working_on": false,
  "is_delivered": false
}
DELETE

/api/v1.0/task_states/:id

Destroy a Task State

Destroy a task state. Only account administrators can perform this action.

Request

Route

DELETE /api/v1.0/task_states/4

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/task_states/4" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Task Templates

GET

/api/v1.0/project_templates/:project_template_id/task_templates

List all Task Templates of this Project Template

Request

Route

GET /api/v1.0/project_templates/1/task_templates

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1/task_templates" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 505

Body

[
  {
    "id": 28,
    "title": "Task Template",
    "responsible_id": "coyote-271",
    "user_id": "coyote-271",
    "type_id": 7,
    "queue_position": null,
    "project_template_id": 1,
    "team_id": null,
    "tag_list": "",
    "created_at": "2016-04-21T10:30:19-03:00",
    "follower_ids": [

    ],
    "workflow_id": null
  },
  {
    "id": 27,
    "title": "Task Template",
    "responsible_id": "coyote-271",
    "user_id": "coyote-271",
    "type_id": 6,
    "queue_position": null,
    "project_template_id": 1,
    "team_id": null,
    "tag_list": "",
    "created_at": "2016-04-21T10:30:19-03:00",
    "follower_ids": [

    ],
    "workflow_id": null
  }
]
GET

/api/v1.0/project_templates/:project_template_id/task_templates/:id

Show a Task Template

Request

Route

GET /api/v1.0/project_templates/1/task_templates/29

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1/task_templates/29" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 251

Body

{
  "id": 29,
  "title": "Task Template",
  "responsible_id": "coyote-272",
  "user_id": "coyote-272",
  "type_id": 6,
  "queue_position": null,
  "project_template_id": 1,
  "team_id": null,
  "tag_list": "",
  "created_at": "2016-04-21T10:30:21-03:00",
  "follower_ids": [

  ],
  "workflow_id": null
}
POST

/api/v1.0/project_templates/:project_template_id/task_templates

Create a Task Template

Parameters

Name Description type
title required

Name of task template

string

responsible_id required

ID of user responsible for this task template

string

type_id required

ID of task template type

integer

team_id required

ID of team task template is assigned to

integer

tag_list

Tags for task (separated by commas)

string

Request

Route

POST /api/v1.0/project_templates/1/task_templates

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_template": {
    "responsible_id": "coyote-273",
    "team_id": null,
    "title": "Task Template",
    "type_id": 6
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1/task_templates" -d '{"task_template":{"responsible_id":"coyote-273","team_id":null,"title":"Task Template","type_id":6}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 247

Body

{
  "id": 1,
  "title": "Task Template",
  "responsible_id": "coyote-273",
  "user_id": "coyote-273",
  "type_id": 6,
  "queue_position": 1,
  "project_template_id": 1,
  "team_id": null,
  "tag_list": "",
  "created_at": "2016-04-21T10:30:23-03:00",
  "follower_ids": [

  ],
  "workflow_id": null
}
PUT

/api/v1.0/project_templates/:project_template_id/task_templates/:id

Update a Task Template

Request

Route

PUT /api/v1.0/project_templates/1/task_templates/31

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_template": {
    "title": "New Title",
    "responsible_id": "coyote-275",
    "type_id": 6,
    "team_id": 1
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1/task_templates/31" -d '{"task_template":{"title":"New Title","responsible_id":"coyote-275","type_id":6,"team_id":1}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 244

Body

{
  "id": 31,
  "title": "New Title",
  "responsible_id": "coyote-275",
  "user_id": "coyote-277",
  "type_id": 6,
  "queue_position": null,
  "project_template_id": 1,
  "team_id": 1,
  "tag_list": "",
  "created_at": "2016-04-21T10:30:27-03:00",
  "follower_ids": [

  ],
  "workflow_id": null
}
DELETE

/api/v1.0/project_templates/:project_template_id/task_templates/:id

Destroy a Task Template

Request

Route

DELETE /api/v1.0/project_templates/1/task_templates/32

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/project_templates/1/task_templates/32" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Task Followers

GET

/api/v1.0/tasks/:task_id/followers

List all followers

Responds with an array of users following the task. The format of each user is the same as the User endpoint.

Request

Route

GET /api/v1.0/tasks/73/followers

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/73/followers" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1555

Body

[
  {
    "id": "coyote-279",
    "name": "Coyote 279",
    "email": "coyote266@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
    "super_compact_view": true,
    "compact_side_menu": null,
    "is_master": true,
    "is_manager": false,
    "can_create_client_project_and_task_types": true,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "49537adb9",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  }
]
POST

/api/v1.0/tasks/:task_id/followers

Create a Task Follower

Parameters

Name Description type
id required

ID of user to add as follower

string

Request

Route

POST /api/v1.0/tasks/74/followers

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "id": "coyote-281"
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/74/followers" -d '{"id":"coyote-281"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1529

Body

{
  "id": "coyote-281",
  "name": "Coyote 281",
  "email": "coyote268@acme.foo",
  "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_3.png",
  "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_3.png",
  "compact_side_menu": null,
  "is_master": false,
  "is_manager": false,
  "can_create_client_project_and_task_types": false,
  "time_zone": "America/Sao_Paulo",
  "position": null,
  "on_vacation": false,
  "birthday": null,
  "phone": null,
  "gender": null,
  "marital_status": null,
  "in_company_since": null,
  "is_certified": false,
  "language": "pt-BR",
  "oid": "92a6f5b72",
  "see_archived_clients_and_projects": null,
  "shifts": [
    {
      "weekday": 6,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 5,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 4,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 3,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 2,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 1,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 0,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    }
  ]
}
DELETE

/api/v1.0/tasks/:task_id/followers/:id

Remove a Task Follower

Request

Route

DELETE /api/v1.0/tasks/75/followers/coyote-283

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/75/followers/coyote-283" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Task Workflows

GET

/api/v1.0/workflows

Show a Workflow

Parameters

Name Description type
task_id required

ID of the task the workflow belongs to

integer

Request

Route

GET /api/v1.0/workflows?task_id=76

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=76

cURL

curl "https://secure.runrun.it/api/v1.0/workflows?task_id=76" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 76

Body

{
  "id": 1,
  "task_id": 76,
  "current_workflow_element_id": 1,
  "is_last_element": true
}
POST

/api/v1.0/workflows

Create a Workflow

The workflow is eligible to be created if:

  • the task is not closed
  • the task is not on going
  • the task does not have a workflow

Parameters

Name Description type
task_id required

ID of the task the workflow belongs to

integer

Request

Route

POST /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 77
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_id":77}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 76

Body

{
  "id": 1,
  "task_id": 77,
  "current_workflow_element_id": 1,
  "is_last_element": true
}
DELETE

/api/v1.0/workflows

Destroy a workflow

Parameters

Name Description type
task_id required

ID of the task the workflow belongs to

integer

Request

Route

DELETE /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 79
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_id":79}' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Tasks

GET

/api/v1.0/tasks

Query tasks

Returns a paginated list of tasks that the user has permission to see. The number of tasks returned are limited by limit per page and are sorted based on sort and sortDir. Use the following Parameters to narrow and customize your query.

Parameters

Name Description type default
ids

IDs of tasks, separated by comma

string

user_id

ID of user who created this task

string

responsible_id

ID of user responsible for this task

string

follower_id

ID of user following the task

string

project_id

ID of the project the task belongs to

integer

is_closed

Task is delivered

boolean

false

is_working_on

Responsible is currently working on this task

boolean

sort

Sort strategy. Must be one of the following: uid, title, created_at, desired_date, queue_position, estimated_delivery_date, close_date, user, responsible, client, type and task_state

string

closed_date if ìs_closed=true; otherwise queue_position

sortDir

Sort direction. Must be asc or desc

string

desc if ìs_closed=true; otherwise asc

page

The page that will be displayed. Must be equal or greater than 1

integer

1

limit

The number of objects to return per page. The value must be between 1 and 100

integer

100

bypass_status_default

Set as true to bypass the default value of is_closed param

boolean

false

Request

Route

GET /api/v1.0/tasks?responsible_id=coyote-292&sort=close_date&sortDir=desc&is_closed=true&project_id=1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

responsible_id=coyote-292
sort=close_date
sortDir=desc
is_closed=true
project_id=1

cURL

curl "https://secure.runrun.it/api/v1.0/tasks?responsible_id=coyote-292&sort=close_date&sortDir=desc&is_closed=true&project_id=1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1530

Body

[
  {
    "id": 81,
    "uid": 81,
    "_permission_": true,
    "title": "Improve Task API",
    "is_working_on": false,
    "responsible_id": "coyote-292",
    "user_id": "coyote-294",
    "type_id": 7,
    "project_id": 1,
    "desired_date": null,
    "desired_date_with_time": null,
    "estimated_start_date": null,
    "estimated_delivery_date": null,
    "close_date": "2016-04-20T10:30:52-03:00",
    "priority": 1,
    "task_state_id": null,
    "was_reopened": false,
    "is_closed": true,
    "on_going": false,
    "team_id": null,
    "tag_list": "",
    "estimated_delivery_date_updated": false,
    "queue_position": 1,
    "scheduled_start_time": null,
    "created_at": "2016-04-21T10:30:53-03:00",
    "start_date": null,
    "current_estimate_seconds": 3600,
    "current_worked_time": 0,
    "current_evaluator_id": null,
    "approved": null,
    "follower_ids": [

    ],
    "workflow_id": null,
    "repetition_rule_id": null,
    "checklist_id": null
  },
  {
    "id": 80,
    "uid": 80,
    "_permission_": true,
    "title": "Create Task API",
    "is_working_on": false,
    "responsible_id": "coyote-292",
    "user_id": "coyote-293",
    "type_id": 6,
    "project_id": 1,
    "desired_date": null,
    "desired_date_with_time": null,
    "estimated_start_date": null,
    "estimated_delivery_date": null,
    "close_date": "2016-04-19T10:30:52-03:00",
    "priority": 1,
    "task_state_id": null,
    "was_reopened": false,
    "is_closed": true,
    "on_going": false,
    "team_id": null,
    "tag_list": "",
    "estimated_delivery_date_updated": false,
    "queue_position": 1,
    "scheduled_start_time": null,
    "created_at": "2016-04-21T10:30:52-03:00",
    "start_date": null,
    "current_estimate_seconds": 3600,
    "current_worked_time": 0,
    "current_evaluator_id": null,
    "approved": null,
    "follower_ids": [

    ],
    "workflow_id": null,
    "repetition_rule_id": null,
    "checklist_id": null
  }
]
GET

/api/v1.0/tasks/:id

Show a Task

Request

Route

GET /api/v1.0/tasks/82

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/82" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of task integer
uid [Deprecated, please use 'id' field]. ID of task integer
title Name of task string
_permission_ Requestor has full-view access boolean
is_working_on Responsible is currently working on this task boolean
responsible_id ID of user responsible for this task string
user_id ID of user who created this task string
type_id ID of task type integer
project_id ID of the project the task belongs to integer
desired_date [Deprecated, please use `desired_date_with_time` field] Requested complete by date datetime
desired_date_with_time Requested complete by date and time datetime
estimated_start_date When the system estimates the task will be started datetime
estimated_delivery_date When the system estimates the task will be delivered datetime
close_date When the task was delivered datetime
priority Priority on responsible user's task list integer
task_state_id ID of task state integer
was_reopened Task has been reopened after being delivered boolean
is_closed Task is delivered boolean
on_going Task is an on-going task boolean
team_id ID of team task is assigned to integer
tag_list Tags for task (separated by commas) string
estimated_delivery_date_updated Estimates have been updated after potential change boolean
queue_position 1-based index of position on responsible user's task list integer
scheduled_start_time When task was scheduled to start datetime
created_at Time task was created datetime
start_date First time task was being worked on datetime
current_estimate_seconds Current estimated effort (in seconds) integer
current_worked_time Current worked time (in seconds) integer
current_evaluator_id ID of current evaluator for this task string
approved Task is approved? boolean
follower_ids IDs of users following this task array
workflow_id ID of associated workflow (if any) integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 772

Body

{
  "id": 82,
  "uid": 82,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-300",
  "user_id": "coyote-301",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": null,
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": false,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:01-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null,
  "unseen_since": "2016-04-21T10:31:01-03:00"
}
POST

/api/v1.0/tasks

Create a Task

Create a task. The user field will be set to the user on whose behalf the API request is issued.

Parameters

Name Description type
task[title] required

Name of task

string

task[on_going] required

Task is an on-going task

boolean

task[responsible_id] required

ID of user responsible for this task

string

task[team_id] required

ID of team task is assigned to

integer

task[type_id] required

ID of task type

integer

task[project_id] required

ID of the project the task belongs to

integer

task[scheduled_start_time] required

When task was scheduled to start

datetime

task[desired_date] required

[Deprecated, please use desired_date_with_time field] Requested complete by date

datetime

task[desired_date_with_time]

Requested complete by date and time

datetime

task[tag_list]

Tags for task (separated by commas)

string

task[workflow_id]

ID of workflow to connect to this task

task[preloaded_prereqs]

IDs of pre-requisite tasks

array

task[follower_ids]

IDs of users to follow this task

array

task[document_ids]

IDs of Document records to attach

array

Request

Route

POST /api/v1.0/tasks

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task": {
    "desired_date": null,
    "on_going": false,
    "project_id": 1,
    "responsible_id": "coyote-303",
    "scheduled_start_time": null,
    "team_id": null,
    "title": "Bla",
    "type_id": 6
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks" -d '{"task":{"desired_date":null,"on_going":false,"project_id":1,"responsible_id":"coyote-303","scheduled_start_time":null,"team_id":null,"title":"Bla","type_id":6}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 727

Body

{
  "id": 1,
  "uid": 1,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-303",
  "user_id": "coyote-303",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": null,
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": false,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:04-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/play

Play a Task

Indicate that a task is being worked on, if the responsible is currently working on a task it will be paused.

The task is eligible to be started if:

  • it's not already being working on
  • it's not closed
  • it does not have any open prerequisite tasks

Parameters

Name Description type
id

ID of task

integer

Request

Route

POST /api/v1.0/tasks/89/play

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/89/play" -d '' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 770

Body

{
  "id": 89,
  "uid": 89,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": true,
  "responsible_id": "coyote-316",
  "user_id": "coyote-317",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": "2016-04-21T11:31:30-03:00",
  "close_date": null,
  "priority": 1,
  "task_state_id": 1,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": true,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:28-03:00",
  "start_date": "2016-04-21T10:31:29-03:00",
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/pause

Pause a Task

Pause the work on a task.

The task is eligible to be paused if:

  • it's currently being working on

Parameters

Name Description type
id

ID of task

integer

Request

Route

POST /api/v1.0/tasks/90/pause

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/90/pause" -d '' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 729

Body

{
  "id": 90,
  "uid": 90,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-318",
  "user_id": "coyote-319",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": null,
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": false,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:32-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/close

Close a Task

Deliver a task.

The task is eligible to be delivered if:

  • it's not already closed
  • it does not have any open prerequisite tasks

Parameters

Name Description type
id

ID of task

integer

Request

Route

POST /api/v1.0/tasks/91/close

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/91/close" -d '' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 777

Body

{
  "id": 91,
  "uid": 91,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-320",
  "user_id": "coyote-321",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": null,
  "estimated_delivery_date": null,
  "close_date": "2016-04-21T10:31:36-03:00",
  "priority": null,
  "task_state_id": 2,
  "was_reopened": false,
  "is_closed": true,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": false,
  "queue_position": null,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:36-03:00",
  "start_date": "2016-04-21T10:31:36-03:00",
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/transfer

Transfer a Task

Transfer the task responsibility to another user. The task's team is related with the responsible. On change the responsibility, it's possible to set a task team that the new responsible belongs

The task is eligible to be transferred if:

  • it's not already closed

The task is authorized to be transferred if:

  • the new responsible is a partner of the original responsible
  • the new responsible is authorized to see the task's type
  • the new responsible is authorized to see the client of the task's project

Parameters

Name Description type
id

ID of task

integer

responsible_id required

ID of user responsible for this task

string

team_id

ID of team task is assigned to

integer

Request

Route

POST /api/v1.0/tasks/92/transfer

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "responsible_id": "coyote-325"
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/92/transfer" -d '{"responsible_id":"coyote-325"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 787

Body

{
  "id": 92,
  "uid": 92,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-325",
  "user_id": "coyote-324",
  "type_id": 11,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": "2016-04-21T10:31:43-03:00",
  "estimated_delivery_date": "2016-04-21T11:31:43-03:00",
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": true,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:42-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [
    "coyote-323"
  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/reopen

Reopen a Task

Reopen a closed task.

IMPORTANT!!: If the task is prerequisite directly or indirectly in any task that has already been delivered or is under development, it is necessary to pause or reopen these tasks. You can set the parameter "reopen_or_pause_descendant_tasks" to automatically pause or reopen the necessary tasks. To complete this operation with success it's necessary that the current user is allowed to reopen and pause all these tasks.

The task is eligible to be reopened if:

  • it's closed
  • it's not a prerequisite of working on or closed tasks

Parameters

Name Description type
id required

ID of task

integer

reopen_or_pause_descendant_tasks

Force pause/reopen all descendant tasks

boolean

Request

Route

POST /api/v1.0/tasks/93/reopen

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/93/reopen" -d '' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 773

Body

{
  "id": 93,
  "uid": 93,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-326",
  "user_id": "coyote-327",
  "type_id": 6,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": "2016-04-21T10:31:49-03:00",
  "estimated_delivery_date": "2016-04-21T10:31:50-03:00",
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": true,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": true,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:47-03:00",
  "start_date": null,
  "current_estimate_seconds": null,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
POST

/api/v1.0/tasks/:id/reprioritize

Reprioritize a Task

Parameters

Name Description type
id required

ID of task

integer

priority required

The new priority on responsible user's task list

integer

Request

Route

POST /api/v1.0/tasks/97/reprioritize

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "priority": 2
}

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/97/reprioritize" -d '{"priority":2}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 775

Body

{
  "id": 97,
  "uid": 97,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-328",
  "user_id": "coyote-328",
  "type_id": 14,
  "project_id": 4,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": "2016-04-21T11:31:53-03:00",
  "estimated_delivery_date": "2016-04-21T13:31:53-03:00",
  "close_date": null,
  "priority": 2,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": true,
  "queue_position": 2,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:31:52-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [

  ],
  "workflow_id": null,
  "repetition_rule_id": null,
  "checklist_id": null
}
GET

/api/v1.0/tasks/unseen_activities

List unseen activities of a task

List not seen activities of a task by the current user

Parameters

Name Description type
task_ids required

List of task ids separated by comma ','

array of integers

Request

Route

GET /api/v1.0/tasks/unseen_activities?task_ids=3003%2C1337

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_ids=3003,1337

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/unseen_activities?task_ids=3003%2C1337" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
task_id ID of the related task integer
has_unread_comments True if the current user has unread comments on this task boolean

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 91

Body

[
  {
    "task_id": 1337,
    "has_unread_comments": false
  },
  {
    "task_id": 3003,
    "has_unread_comments": false
  }
]
POST

/api/v1.0/tasks/:id/complete_workflow_step

Complete a workflow step

Parameters

Name Description type
id

ID of task

integer

Request

Route

POST /api/v1.0/tasks/99/complete_workflow_step

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/tasks/99/complete_workflow_step" -d '' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 784

Body

{
  "id": 99,
  "uid": 99,
  "_permission_": true,
  "title": "Bla",
  "is_working_on": false,
  "responsible_id": "coyote-334",
  "user_id": "coyote-333",
  "type_id": 11,
  "project_id": 1,
  "desired_date": null,
  "desired_date_with_time": null,
  "estimated_start_date": "2016-04-21T10:32:02-03:00",
  "estimated_delivery_date": "2016-04-21T11:32:02-03:00",
  "close_date": null,
  "priority": 1,
  "task_state_id": null,
  "was_reopened": false,
  "is_closed": false,
  "on_going": false,
  "team_id": null,
  "tag_list": "",
  "estimated_delivery_date_updated": true,
  "queue_position": 1,
  "scheduled_start_time": null,
  "created_at": "2016-04-21T10:32:00-03:00",
  "start_date": null,
  "current_estimate_seconds": 3600,
  "current_worked_time": 0,
  "current_evaluator_id": null,
  "approved": null,
  "follower_ids": [
    "coyote-333"
  ],
  "workflow_id": 1,
  "repetition_rule_id": null,
  "checklist_id": null
}

Team Authorizations

GET

/api/v1.0/types/:type_id/team_authorizations

List all team authorizations of a type

List all teams authorizations of a type that the current_user can view"

Request

Route

GET /api/v1.0/types/6/team_authorizations

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/types/6/team_authorizations" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 97

Body

[
  {
    "id": 21,
    "all_users": true,
    "team_id": 1,
    "team_authorizable_id": 6,
    "team_authorizable_type": "Type"
  }
]
POST

/api/v1.0/types/:type_id/team_authorizations

Create a team authorization of a type

Parameters

Name Description type
team_authorization[all_users]

Authorize all teams?

boolean

team_authorization[team_id]

Team ID

integer

Request

Route

POST /api/v1.0/types/6/team_authorizations

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "team_authorization": {
    "all_users": false,
    "team_id": 1
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/types/6/team_authorizations" -d '{"team_authorization":{"all_users":false,"team_id":1}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 95

Body

{
  "id": 6,
  "all_users": false,
  "team_id": 1,
  "team_authorizable_id": 6,
  "team_authorizable_type": "Type"
}
DELETE

/api/v1.0/types/:type_id/team_authorizations/:id

Destroy a team authorization of a type

Parameters

Name Description type
id required

ID of Team Authorization

integer

Request

Route

DELETE /api/v1.0/types/6/team_authorizations/21

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/types/6/team_authorizations/21" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/clients/:client_id/team_authorizations

List all team authorizations of a client

List all teams authorizations of a client that the current_user can view"

Request

Route

GET /api/v1.0/clients/1/team_authorizations

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/team_authorizations" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 199

Body

[
  {
    "id": 22,
    "all_users": true,
    "team_id": 1,
    "team_authorizable_id": 1,
    "team_authorizable_type": "Client"
  },
  {
    "id": 6,
    "all_users": true,
    "team_id": null,
    "team_authorizable_id": 1,
    "team_authorizable_type": "Client"
  }
]
POST

/api/v1.0/clients/:client_id/team_authorizations

Create a team authorization of a client

Parameters

Name Description type
team_authorization[all_users]

Authorize all teams?

boolean

team_authorization[team_id]

Team ID

integer

Request

Route

POST /api/v1.0/clients/1/team_authorizations

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "team_authorization": {
    "all_users": false,
    "team_id": 1
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/team_authorizations" -d '{"team_authorization":{"all_users":false,"team_id":1}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 97

Body

{
  "id": 7,
  "all_users": false,
  "team_id": 1,
  "team_authorizable_id": 1,
  "team_authorizable_type": "Client"
}
DELETE

/api/v1.0/clients/:client_id/team_authorizations/:id

Destroy a team authorization of a client

Parameters

Name Description type
id required

ID of Team Authorization

integer

Request

Route

DELETE /api/v1.0/clients/1/team_authorizations/22

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/clients/1/team_authorizations/22" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Teams

GET

/api/v1.0/teams

List all teams

List all teams that the current user can view.

Request

Route

GET /api/v1.0/teams

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/teams" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 113

Body

[
  {
    "id": 1,
    "name": "Team1",
    "master_user_id": "coyote-357",
    "master_user_name": "Coyote 357",
    "user_ids": [
      "coyote-357"
    ]
  }
]
GET

/api/v1.0/teams/:id

Show a team

Parameters

Name Description type
id required

Id of the team

integer

Request

Route

GET /api/v1.0/teams/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 111

Body

{
  "id": 1,
  "name": "Team1",
  "master_user_id": "coyote-358",
  "master_user_name": "Coyote 358",
  "user_ids": [
    "coyote-358"
  ]
}
POST

/api/v1.0/teams

Create a team

Create a new team record with a master user.

Parameters

Name Description type
team[name] required

Name of the team

string

team[master_user_id]

Id of the user team leader. Default: current user id

string

Request

Route

POST /api/v1.0/teams

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "team": {
    "name": "Team1",
    "master_user_id": "coyote-359"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/teams" -d '{"team":{"name":"Team1","master_user_id":"coyote-359"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 111

Body

{
  "id": 1,
  "name": "Team1",
  "master_user_id": "coyote-359",
  "master_user_name": "Coyote 359",
  "user_ids": [
    "coyote-359"
  ]
}
PUT

/api/v1.0/teams/:id

Update a team

Update a existing team.

Parameters

Name Description type
id required

Id of the team

integer

team[name]

Name of the team

string

team[master_user_id]

Id of the user team leader. Default: current user id

string

Request

Route

PUT /api/v1.0/teams/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "team": {
    "name": "Team2",
    "master_user_id": "coyote-361"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1" -d '{"team":{"name":"Team2","master_user_id":"coyote-361"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 124

Body

{
  "id": 1,
  "name": "Team2",
  "master_user_id": "coyote-361",
  "master_user_name": "Coyote 361",
  "user_ids": [
    "coyote-361",
    "coyote-360"
  ]
}
DELETE

/api/v1.0/teams/:id

Destroy a team

Parameters

Name Description type
id required

Id of the team

integer

Request

Route

DELETE /api/v1.0/teams/1

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/teams/:id/board_summary

Show the team board summary

Board summary information

Parameters

Name Description type
id required

Id of the team

integer

Request

Route

GET /api/v1.0/teams/1/board_summary

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1/board_summary" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 56

Body

{
  "open_tasks": 0,
  "working_tasks": 0,
  "ratings_average": 0.0
}
GET

/api/v1.0/teams/:id/load

Show the team load

Team load information

Parameters

Name Description type
id required

Id of the team

integer

Request

Route

GET /api/v1.0/teams/1/load

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1/load" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 52

Body

{
  "id": 1,
  "team_average": 0.0,
  "enterprise_average": 0.0
}
POST

/api/v1.0/teams/:id/add_member

Add a user to team

Parameters

Name Description type
team[id] required

Id of the team

integer

user_id required

New team member id

string

team_partnership

Flag to make the new team member and other members, partners

boolean

Request

Route

POST /api/v1.0/teams/1/add_member

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "user_id": "coyote-365"
}

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1/add_member" -d '{"user_id":"coyote-365"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 124

Body

{
  "id": 1,
  "name": "Team1",
  "master_user_id": "coyote-366",
  "master_user_name": "Coyote 366",
  "user_ids": [
    "coyote-366",
    "coyote-365"
  ]
}
POST

/api/v1.0/teams/:id/remove_member

Remove a user from team

Parameters

Name Description type
team[id] required

Id of the team

integer

user_id required

Team member id

string

Request

Route

POST /api/v1.0/teams/1/remove_member

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "user_id": "coyote-367"
}

cURL

curl "https://secure.runrun.it/api/v1.0/teams/1/remove_member" -d '{"user_id":"coyote-367"}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 111

Body

{
  "id": 1,
  "name": "Team1",
  "master_user_id": "coyote-368",
  "master_user_name": "Coyote 368",
  "user_ids": [
    "coyote-368"
  ]
}

Types

GET

/api/v1.0/types

List all task types

List all task types that the current user can view.

Request

Route

GET /api/v1.0/types

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/types" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 544

Body

[
  {
    "id": 5,
    "name": "Criação",
    "is_visible": true,
    "standard_effort": "08:00",
    "avg_delivery": 0
  },
  {
    "id": 4,
    "name": "Desenvolvimento",
    "is_visible": true,
    "standard_effort": "08:00",
    "avg_delivery": 0
  },
  {
    "id": 3,
    "name": "Orçamento",
    "is_visible": true,
    "standard_effort": "04:00",
    "avg_delivery": 0
  },
  {
    "id": 2,
    "name": "Pesquisa",
    "is_visible": true,
    "standard_effort": "04:00",
    "avg_delivery": 0
  },
  {
    "id": 1,
    "name": "Planejamento",
    "is_visible": true,
    "standard_effort": "08:00",
    "avg_delivery": 0
  },
  {
    "id": 6,
    "name": "TaskType1",
    "is_visible": true,
    "standard_effort": "01:00",
    "avg_delivery": 0
  }
]
GET

/api/v1.0/types/:id

Show a task type

Parameters

Name Description type
id required

Id of the type

integer

Request

Route

GET /api/v1.0/types/6

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/types/6" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 88

Body

{
  "id": 6,
  "name": "TaskType1",
  "is_visible": true,
  "standard_effort": "01:00",
  "avg_delivery": 0
}
POST

/api/v1.0/types

Create a task type

Create a new task type record.

Parameters

Name Description type
type[name] required

Type name

string

type[is_visible]

Is the type visible to be chosen? Default: true

boolean

type[standard_effort]

Default effort to complete a task of this type. Default: '02:00'

string

Request

Route

POST /api/v1.0/types

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "type": {
    "name": "TaskType1",
    "is_visible": true,
    "standard_effort": "03:00"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/types" -d '{"type":{"name":"TaskType1","is_visible":true,"standard_effort":"03:00"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 88

Body

{
  "id": 6,
  "name": "TaskType1",
  "is_visible": true,
  "standard_effort": "03:00",
  "avg_delivery": 0
}
PUT

/api/v1.0/types/:id

Update a task type

Update a existing task type.

Parameters

Name Description type
id required

Id of the type

integer

type[name]

Type name

string

type[is_visible]

Is the type visible to be chosen? Default: true

boolean

type[standard_effort]

Default effort to complete a task of this type. Default: '02:00'

string

Request

Route

PUT /api/v1.0/types/6

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "type": {
    "name": "TaskType2",
    "is_visible": false,
    "standard_effort": "04:00"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/types/6" -d '{"type":{"name":"TaskType2","is_visible":false,"standard_effort":"04:00"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 89

Body

{
  "id": 6,
  "name": "TaskType2",
  "is_visible": false,
  "standard_effort": "04:00",
  "avg_delivery": 0
}

User Statistics

GET

/api/v1.0/user_statistics/:id

Get user's RR-Rating®

Get a user's RR-Rating® by id

Request

Route

GET /api/v1.0/user_statistics/coyote-373

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/user_statistics/coyote-373" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
total User's RR-Rating integer
created_at Calculated as of datetime

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 54

Body

{
  "total": 341,
  "created_at": "2016-04-21T10:33:12-03:00"
}

Users

GET

/api/v1.0/users

List all Users

List all enterprise users based on the priviligies of the user_token owner.

Permission JSON attribute Response
Flagged as Administrator on Runrun.it is_master: true return a list of all users
Not flagged as Administrator on Runrun.it is_master: false return a list of teammates

Request

Route

GET /api/v1.0/users

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id User's ID string
name User's full name string
email User's email string
avatar_url User's chosen profile photo url
avatar_large_url User's chosen profile photo url
super_compact_view *internal usage* boolean
compact_side_menu *internal usage* boolean
is_master User is an administrator boolean
is_manager User is a manager boolean
can_create_client_project_and_task_types User has permission to create client, projects and task types boolean
time_zone IANA Time Zone Database zone name string
position Job position in company string
on_vacation User currently on vacation boolean
birthday User's birthday date
phone User phone string
gender User gender string
marital_status User marital status string
in_company_since Joining date in company date
is_certified Whether the user has passed Runrun.it certification boolean
language User preference language string
oid Constant size ID (internal use only) string
see_archived_clients_and_projects Admin decides either to see or not archived clients and projects boolean
budget_manager Can edit project extra costs boolean
Shift[weekday] Day of the week. Starting with Sunday = 0 integer
Shift[work_day] This day of the week is a working day for user boolean
Shift[shift_end] User leaves from work. Format HH:MM:SS time
Shift[shift_start] User arrives to work. Format HH:MM:SS time
Shift[lunch_start] User leaves for lunch. Format HH:MM:SS time
Shift[lunch_end] User returns from lunch. Format HH:MM:SS time

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 3131

Body

[
  {
    "id": "coyote-379",
    "name": "Coyote 379",
    "email": "coyote366@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "49537adb9",
    "see_archived_clients_and_projects": null,
    "budget_manager": false,
    "shifts": [
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  },
  {
    "id": "coyote-380",
    "name": "Coyote 380",
    "email": "coyote367@acme.foo",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_3.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_3.png",
    "super_compact_view": true,
    "compact_side_menu": null,
    "is_master": true,
    "is_manager": false,
    "can_create_client_project_and_task_types": true,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "92a6f5b72",
    "see_archived_clients_and_projects": null,
    "budget_manager": false,
    "shifts": [
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      },
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "19:00:00",
        "shift_start": "10:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "13:00:00"
      }
    ]
  }
]
GET

/api/v1.0/users/:user_id

Get a user by id

Get a user by id

Parameters

Name Description type
user_id required

User's ID

string

Request

Route

GET /api/v1.0/users/coyote-381

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/users/coyote-381" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id User's ID string
name User's full name string
email User's email string
avatar_url User's chosen profile photo url
avatar_large_url User's chosen profile photo url
super_compact_view *internal usage* boolean
compact_side_menu *internal usage* boolean
is_master User is an administrator boolean
is_manager User is a manager boolean
can_create_client_project_and_task_types User has permission to create client, projects and task types boolean
time_zone IANA Time Zone Database zone name string
position Job position in company string
on_vacation User currently on vacation boolean
birthday User's birthday date
phone User phone string
gender User gender string
marital_status User marital status string
in_company_since Joining date in company date
is_certified Whether the user has passed Runrun.it certification boolean
language User preference language string
oid Constant size ID (internal use only) string
see_archived_clients_and_projects Admin decides either to see or not archived clients and projects boolean
budget_manager Can edit project extra costs boolean
Shift[weekday] Day of the week. Starting with Sunday = 0 integer
Shift[work_day] This day of the week is a working day for user boolean
Shift[shift_end] User leaves from work. Format HH:MM:SS time
Shift[shift_start] User arrives to work. Format HH:MM:SS time
Shift[lunch_start] User leaves for lunch. Format HH:MM:SS time
Shift[lunch_end] User returns from lunch. Format HH:MM:SS time

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1552

Body

{
  "id": "coyote-381",
  "name": "Coyote 381",
  "email": "coyote368@acme.foo",
  "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
  "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
  "compact_side_menu": null,
  "is_master": false,
  "is_manager": false,
  "can_create_client_project_and_task_types": false,
  "time_zone": "America/Sao_Paulo",
  "position": null,
  "on_vacation": false,
  "birthday": null,
  "phone": null,
  "gender": null,
  "marital_status": null,
  "in_company_since": null,
  "is_certified": false,
  "language": "pt-BR",
  "oid": "49537adb9",
  "see_archived_clients_and_projects": null,
  "budget_manager": false,
  "shifts": [
    {
      "weekday": 0,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 1,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 2,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 3,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 4,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 5,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 6,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    }
  ]
}
POST

/api/v1.0/users

Create a user

Create a user on an existing account. Upon creation a temporary password will be created and sent to the new user by email. Any locale settings (language, time zone, etc.) will be the same as the user issuing the API call. If the account has reached the maximum number of users a 403 Forbidden will be returned. The make_my_partner and make_everybody_mutual_partners flags are a convenience for when you may wish to assign tasks to the new user immediately (the same can be accomplished with the Partners API calls).

Parameters

Name Description type
user[name] required

User's full name

string

user[email] required

User's email

string

make_my_partner

Flag to make the new user a partner of the creating user

boolean

make_everybody_mutual_partners

Flag to make the new user a mutual partner of everybody in enterprise. If not set, defaults to enterprise's configuration

boolean

Request

Route

POST /api/v1.0/users

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "user": {
    "name": "Jon Smith",
    "email": "john@smith.com"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/users" -d '{"user":{"name":"Jon Smith","email":"john@smith.com"}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1575

Body

{
  "id": "jon-smith",
  "name": "Jon Smith",
  "email": "john@smith.com",
  "avatar_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-247/jon-smith/2a60a3576380268a0dec6a3c1b1aae78mini.png",
  "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-247/jon-smith/2a60a3576380268a0dec6a3c1b1aae78regular.png",
  "compact_side_menu": null,
  "is_master": false,
  "is_manager": false,
  "can_create_client_project_and_task_types": false,
  "time_zone": "America/Sao_Paulo",
  "position": null,
  "on_vacation": false,
  "birthday": null,
  "phone": null,
  "gender": null,
  "marital_status": null,
  "in_company_since": null,
  "is_certified": false,
  "language": "pt-BR",
  "oid": "92a6f5b72",
  "see_archived_clients_and_projects": null,
  "shifts": [
    {
      "weekday": 6,
      "work_day": false,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 5,
      "work_day": true,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 4,
      "work_day": true,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 3,
      "work_day": true,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 2,
      "work_day": true,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 1,
      "work_day": true,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    },
    {
      "weekday": 0,
      "work_day": false,
      "shift_end": "17:00:00",
      "shift_start": "09:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "12:30:00"
    }
  ]
}
PUT

/api/v1.0/users/:id

Update a user

Update a user

Parameters

Name Description type
user[id] required

User's ID

string

Request

Route

PUT /api/v1.0/users/jon-smith

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "user": {
    "name": "Steve Jobs"
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/users/jon-smith" -d '{"user":{"name":"Steve Jobs"}}' -X PUT \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 1526

Body

{
  "id": "jon-smith",
  "name": "Steve Jobs",
  "email": "coyote375@acme.foo",
  "avatar_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/mini_2.png",
  "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/defaults/avatars/defaults/user/regular_2.png",
  "compact_side_menu": null,
  "is_master": true,
  "is_manager": false,
  "can_create_client_project_and_task_types": true,
  "time_zone": "America/Sao_Paulo",
  "position": null,
  "on_vacation": false,
  "birthday": null,
  "phone": null,
  "gender": null,
  "marital_status": null,
  "in_company_since": null,
  "is_certified": false,
  "language": "pt-BR",
  "oid": "49537adb9",
  "see_archived_clients_and_projects": null,
  "shifts": [
    {
      "weekday": 6,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 5,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 4,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 3,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 2,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 1,
      "work_day": true,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    },
    {
      "weekday": 0,
      "work_day": false,
      "shift_end": "19:00:00",
      "shift_start": "10:00:00",
      "lunch_start": "12:00:00",
      "lunch_end": "13:00:00"
    }
  ]
}
POST

/api/v1.0/users/import

Import users

Create a collection of users. Upon creation a temporary password will be created and sent to each new user by email. Any locale settings (language, time zone, etc.) will be the same as the user issuing the API call. If the account has reached the maximum number of users, only the first users will be created and returned.

Parameters

Name Description type
users

Array of users with 'name' and 'email'

array

make_my_partners

Flag to make imported users as partners of the creating user

boolean

make_my_demanders

Flag to make imported users as demanders of the creating user

boolean

mutual_partners

Flag to make imported users mutual partners

boolean

team_id

Team ID. If present, all imported users will be added in the team

boolean

Request

Route

POST /api/v1.0/users/import

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "users": [
    {
      "name": "User 1",
      "email": "user1@email.com"
    },
    {
      "name": "User 2",
      "email": "user2@email.com"
    },
    {
      "name": "User 3",
      "email": "user3@email.com"
    },
    {
      "name": "User 4",
      "email": "user4@email.com"
    }
  ]
}

cURL

curl "https://secure.runrun.it/api/v1.0/users/import" -d '{"users":[{"name":"User 1","email":"user1@email.com"},{"name":"User 2","email":"user2@email.com"},{"name":"User 3","email":"user3@email.com"},{"name":"User 4","email":"user4@email.com"}]}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 6263

Body

[
  {
    "id": "user-1",
    "name": "User 1",
    "email": "user1@email.com",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-1/9644462e743a25d2373e436c087319b3mini.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-1/9644462e743a25d2373e436c087319b3regular.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "92a6f5b72",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      }
    ]
  },
  {
    "id": "user-2",
    "name": "User 2",
    "email": "user2@email.com",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-2/47eaaae8c1b68ea072c8fed964d54e8cmini.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-2/47eaaae8c1b68ea072c8fed964d54e8cregular.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "dbfa7092b",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      }
    ]
  },
  {
    "id": "user-3",
    "name": "User 3",
    "email": "user3@email.com",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-3/aaf740806cafa111af5342effb433e9amini.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-3/aaf740806cafa111af5342effb433e9aregular.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "1254deb6e4",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      }
    ]
  },
  {
    "id": "user-4",
    "name": "User 4",
    "email": "user4@email.com",
    "avatar_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-4/fd28596c45fd1be9d6f0c9c90698917cmini.png",
    "avatar_large_url": "https://s3.amazonaws.com/runrunit_dev/avatars/acme-256/user-4/fd28596c45fd1be9d6f0c9c90698917cregular.png",
    "compact_side_menu": null,
    "is_master": false,
    "is_manager": false,
    "can_create_client_project_and_task_types": false,
    "time_zone": "America/Sao_Paulo",
    "position": null,
    "on_vacation": false,
    "birthday": null,
    "phone": null,
    "gender": null,
    "marital_status": null,
    "in_company_since": null,
    "is_certified": false,
    "language": "pt-BR",
    "oid": "16ea16649d",
    "see_archived_clients_and_projects": null,
    "shifts": [
      {
        "weekday": 6,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 5,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 4,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 3,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 2,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 1,
        "work_day": true,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      },
      {
        "weekday": 0,
        "work_day": false,
        "shift_end": "17:00:00",
        "shift_start": "09:00:00",
        "lunch_start": "12:00:00",
        "lunch_end": "12:30:00"
      }
    ]
  }
]

Work Periods

GET

/api/v1.0/work_periods

List all work periods

List all work periods. If a user_id or task_id is supplied, only work periods for the given user and/or task will be returned. starting_from, starting_before, ending_from and ending_before can be used to specify a date window. The default period is 1 month if not specified.

Parameters

Name Description type
work_period[task_id]

ID of task

integer

work_period[user_id]

ID of user who did the work

integer

work_period[starting_from]
work_period[starting_before]
work_period[ending_from]
work_period[ending_before]

Request

Route

GET /api/v1.0/work_periods?task_id=10531

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=10531

cURL

curl "https://secure.runrun.it/api/v1.0/work_periods?task_id=10531" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 115

Body

[
  {
    "id": 1,
    "task_id": 10531,
    "start": "2014-01-08T15:00:00-02:00",
    "end": null,
    "user_id": "coyote-394",
    "worked_time": 3600
  }
]
GET

/api/v1.0/work_periods/:id

Show a Work Period

Request

Route

GET /api/v1.0/work_periods/1?task_id=10531

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=10531

cURL

curl "https://secure.runrun.it/api/v1.0/work_periods/1?task_id=10531" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Response Fields

Name Description type
id ID of timesheet integer
task_id ID of task integer
start Date time that user start working on the task datetime
end Date time that user stop working on the task datetime
user_id ID of user who did the work integer
worked_time Amount of time that user worked on the task in seconds integer

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 136

Body

{
  "id": 1,
  "task_id": 10531,
  "start": "2014-01-08T15:00:00-02:00",
  "end": "2014-01-08T16:00:00-02:00",
  "user_id": "coyote-396",
  "worked_time": 3600
}

Workflow Elements

GET

/api/v1.0/workflows/:workflow_id/workflow_elements

List workflow elements

Parameters

Name Description type
workflow_id required

ID of workflow

integer

Request

Route

GET /api/v1.0/workflows/1/workflow_elements

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/workflows/1/workflow_elements" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 310

Body

[
  {
    "id": 1,
    "workflow_id": 1,
    "order": 1,
    "current": true,
    "completed": false,
    "completed_at": null,
    "started_at": "2016-04-21T10:34:35-03:00",
    "team_id": null,
    "user_id": "coyote-398"
  },
  {
    "id": 2,
    "workflow_id": 1,
    "order": 1,
    "current": false,
    "completed": false,
    "completed_at": null,
    "started_at": null,
    "team_id": 1,
    "user_id": "coyote-399"
  }
]
GET

/api/v1.0/workflows/:workflow_id/workflow_elements/:id

Show a workflow element

Parameters

Name Description type
id required

ID of workflow element

integer

workflow_id required

ID of workflow

integer

Request

Route

GET /api/v1.0/workflows/1/workflow_elements/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/workflows/1/workflow_elements/2" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 141

Body

{
  "id": 2,
  "workflow_id": 1,
  "order": 2,
  "current": false,
  "completed": false,
  "completed_at": null,
  "started_at": null,
  "team_id": 1,
  "user_id": "coyote-403"
}
POST

/api/v1.0/workflows/:workflow_id/workflow_elements

Create a workflow element

Parameters

Name Description type
workflow_id required

ID of workflow

integer

user_id required

User ID

string

team_id

Team ID of the user

integer

order

Order of the element on workflow

integer

Request

Route

POST /api/v1.0/workflows/1/workflow_elements

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "workflow_element": {
    "user_id": "coyote-407",
    "team_id": 1,
    "order": 2
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows/1/workflow_elements" -d '{"workflow_element":{"user_id":"coyote-407","team_id":1,"order":2}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 141

Body

{
  "id": 2,
  "workflow_id": 1,
  "order": 2,
  "current": false,
  "completed": false,
  "completed_at": null,
  "started_at": null,
  "team_id": 1,
  "user_id": "coyote-407"
}
POST

/api/v1.0/workflows/:workflow_id/workflow_elements/:id/reorder

Reorder a workflow element

Parameters

Name Description type
id required

ID of workflow element

integer

workflow_id required

ID of workflow

integer

order

Order of the element on workflow

integer

Request

Route

POST /api/v1.0/workflows/1/workflow_elements/3/reorder

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "order": 2
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows/1/workflow_elements/3/reorder" -d '{"order":2}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 141

Body

{
  "id": 3,
  "workflow_id": 1,
  "order": 2,
  "current": false,
  "completed": false,
  "completed_at": null,
  "started_at": null,
  "team_id": 1,
  "user_id": "coyote-414"
}
DELETE

/api/v1.0/workflows/:workflow_id/workflow_elements/:id

Destroy a workflow element

Parameters

Name Description type
id required

ID of workflow element

integer

workflow_id required

ID of workflow

integer

Request

Route

DELETE /api/v1.0/workflows/1/workflow_elements/2

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

cURL

curl "https://secure.runrun.it/api/v1.0/workflows/1/workflow_elements/2" -d '' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

Workflows

GET

/api/v1.0/workflows

Show a task workflow

Parameters

Name Description
task_id required

ID of the task the workflow belongs to

Request

Route

GET /api/v1.0/workflows?task_id=109

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_id=109

cURL

curl "https://secure.runrun.it/api/v1.0/workflows?task_id=109" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 77

Body

{
  "id": 1,
  "task_id": 109,
  "current_workflow_element_id": 1,
  "is_last_element": true
}
POST

/api/v1.0/workflows

Create a task workflow

Parameters

Name Description
task_id required

ID of the task the workflow will be associated

Request

Route

POST /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 110,
  "workflow": {
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_id":110,"workflow":{}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 77

Body

{
  "id": 1,
  "task_id": 110,
  "current_workflow_element_id": 1,
  "is_last_element": true
}
DELETE

/api/v1.0/workflows

Destroy task workflow

Parameters

Name Description
task_id required

ID of the task the workflow belongs to

Request

Route

DELETE /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_id": 112
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_id":112}' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers

GET

/api/v1.0/workflows

Show a task_template workflow

Parameters

Name Description
task_template_id required

ID of the task_template the workflow belongs to

Request

Route

GET /api/v1.0/workflows?task_template_id=33

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Query Parameters

task_template_id=33

cURL

curl "https://secure.runrun.it/api/v1.0/workflows?task_template_id=33" -X GET \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

200

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 88

Body

{
  "id": 1,
  "task_template_id": 33,
  "current_workflow_element_id": null,
  "is_last_element": true
}
POST

/api/v1.0/workflows

Create a task_template workflow

Parameters

Name Description
task_template_id required

ID of the task_template the workflow will be associated

Request

Route

POST /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_template_id": 34,
  "workflow": {
  }
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_template_id":34,"workflow":{}}' -X POST \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

201

Headers

Content-Type: application/json; charset=utf-8
Content-Length: 88

Body

{
  "id": 1,
  "task_template_id": 34,
  "current_workflow_element_id": null,
  "is_last_element": true
}
DELETE

/api/v1.0/workflows

Destroy task_template workflow

Parameters

Name Description
task_template_id required

ID of the task_template the workflow belongs to

Request

Route

DELETE /api/v1.0/workflows

Headers

App-Key: 1a219437eab893dc115509bb85e06d77
User-Token: 9flMUzLxQtxohKGZjU5
Content-Type: application/json
Host: example.org

Body

{
  "task_template_id": 36
}

cURL

curl "https://secure.runrun.it/api/v1.0/workflows" -d '{"task_template_id":36}' -X DELETE \
	-H "App-Key: 1a219437eab893dc115509bb85e06d77" \
	-H "User-Token: 9flMUzLxQtxohKGZjU5" \
	-H "Content-Type: application/json"

Response

Simulated Response

Status

204

Headers