Projects API Calls


Create Project

POST /projects.json

This call will create a single project.

Request

{
    "project": {
      "name": "New Project",
      "description": "A demo project",
      "startDate": "",
      "endDate": "",
      "companyId": "999",
      "newCompany": "",
      "category-id": "0",
      "harvest-timers-enabled":"true",
      "tags": "tag1,tag2,tag3",
      "replyByEmailEnabled": "true",
      "privacyEnabled": "true"
    }
}

See Projects PUT/POST in Data Reference


Update Project

PUT /projects/{project_id}.json

Modifies a single project.

Request

{
    "project": {
      "name": "New Project",
      "description": "A demo project",
      "startDate": "",
      "endDate": "",
      "companyId": "999",
      "newCompany": "",
      "status": "inactive",
      "category-id": "0",
      "harvest-timers-enabled":"true",
      "tags": "tag1,tag2,tag3",
      "replyByEmailEnabled": "true",
      "privacyEnabled": "true",
      "use-tasks":"1",
      "use-messages":"1",
      "use-time":"1",
      "use-riskregister":"1",
      "use-billing":"1",
      "use-milestones":"1",
      "use-files":"1",
      "use-notebook":"1",
      "use-links":"1"
      "defaultPrivacy": "open"
    }
}

Response

Returns HTTP status code 200 on success.

See Projects PUT/POST in Data Reference


Delete Project

DELETE /projects/{id}.json

Strangely enough, the call will delete the project.

Response

Returns HTTP status code 200 on success.


Retrieve All Projects

Call: GET /projects.json

Retrieves all accessible projects. Default returns your active projects. 

Response

{
    "STATUS": "OK",
    "projects": [
        {
            "company": {
                "name": "Demo 1 Company",
                "is-owner": "1",
                "id": "999"
            },
            "starred": false,
            "name": "Demo Project",
            "show-announcement": false,
            "announcement": "",
            "description": "",
            "status": "active",
            "isProjectAdmin": false,
            "created-on": "2013-12-04T19:11:44Z",
            "category": {
                "name": "",
                "id": ""
            },
            "start-page": "projectoverview",
            "startDate": "20131204",
            "logo": "http://demo1company.teamwork.com/images/logo.jpg",
            "notifyeveryone": false,
            "id": "999",
            "last-changed-on": "2014-03-18T11:20:49Z",
            "endDate": "20140313",
            "harvest-timers-enabled":"true"
        }
    ]
}

Return projects by status

By default we send back only active projects. You can pass a status option to retrieve projects filtered by status (ALL, ACTIVE, ARCHIVED, CURRENT, LATE, COMPLETED)

An example:

  • GET /projects.json?status=ALL
  • GET /projects.json?status=ARCHIVED

Return only updated projects

You can optionally append a date to the call to return only those projects recently updated. This is very useful if you are implementing local caching as you won't have to recheck everything therefore making your applicaton much faster.

You can pass in a date and/or a date with a time using the variables updatedAfterDate and updatedAfterTime.

An example:

  • GET /projects.json?updatedAfterDate=20100603
  • GET /projects.json?updatedAfterDate=20100603&updatedAfterTime=15:21

Sorting results

You can pass orderby=name or orderby=companyName or orderby=lastActivityDate.

eg. GET /projects.json?orderby=lastActivityDate

Return only projects created after a certain point in time

You can optionally append a date to the call to return only those projects created after a certain point in time. You can pass in a date and/or a date with a time using the variables createdAfterDate and createdAfterTime.

An example:

  • GET /projects.json?createdAfterDate=20100603
  • GET /projects.json?createdAfterDate=20100603&createdAfterTime=15:21

Return only projects in a certain category

You can pass a category ID so that you can return a list of Projects in a certain category only.

An example

  • GET /projects.json?catId=12345

Additional Parameters:

  • You can pass includePeople=true as an optional parameter to get an array of ID's of all people associated with each project included in the response under the field people

Pagination:

By default we'll send back 500 project records per page. Inspect the Response Headers for the following values:

  • X-Page (The current page being returned)
  • X-Pages (The total number of pages available)
  • X-Records (The total number of items available

You can request a specific page by calling the same API call and adding the parameter &page=n where n is the page you want. e.g: &page=2 for page 2, &page=5 for page 5.

See Projects GET in Data Reference


Retrieve a Single Project

GET /projects/{project_id}.json

Returns a single project identified by its integer ID

Additional Parameters:

  • You can pass includePeople=true as an optional parameter to get an array of ID's of all people associated with the requested project included in the response under the field people

Response

{
    "project": {
        "company": {
            "name": "Demo 1 Company",
            "id": "999"
        },
        "starred": false,
        "name": "demo",
        "show-announcement": false,
        "announcement": "",
        "description": "A demo project",
        "status": "active",
        "created-on": "2014-03-28T15:24:22Z",
        "category": {
            "name": "",
            "id": ""
        },
        "start-page": "projectoverview",
        "logo": "http://demo1company.teamwork.com/images/logo.jpg",
        "startDate": "",
        "notifyeveryone": false,
        "id": "999",
        "last-changed-on": "2014-04-01T14:29:32Z",
        "endDate": "",
        "harvest-timers-enabled":"true"
    },
    "STATUS": "OK"
}

See Projects GET in Data Reference


Retrieve projects assigned to a specific company

This will retrieve all of projects assigned to a particular company

Call: GET /companies/{id}/projects.json

Response

{
    "STATUS": "OK",
    "projects": [
        {
            "company": {
                "name": "Demo 1 Company",
                "is-owner": "1",
                "id": "999"
            },
            "starred": true,
            "name": "demo",
            "show-announcement": false,
            "announcement": "",
            "description": "A demo project",
            "status": "active",
            "isProjectAdmin": true,
            "created-on": "2014-03-28T15:24:22Z",
            "category": {
                "name": "",
                "id": ""
            },
            "start-page": "projectoverview",
            "startDate": "",
            "logo": "http://demo1company.teamwork.com/images/logo.jpg",
            "notifyeveryone": false,
            "id": "999",
            "last-changed-on": "2014-04-01T14:29:32Z",
            "endDate": "",
            "harvest-timers-enabled":"true"
        }
    ]
}

See Projects GET in Data Reference


Retrieve your Starred Projects

Surprisingly, this will retrieve all of your projects, which have been starred!

Call: GET /projects/starred.json

Response

{
    "STATUS": "OK",
    "projects": [
        {
            "company": {
                "name": "Demo 1 Company",
                "is-owner": "1",
                "id": "999"
            },
            "starred": true,
            "name": "demo",
            "show-announcement": false,
            "announcement": "",
            "description": "A demo project",
            "status": "active",
            "isProjectAdmin": true,
            "created-on": "2014-03-28T15:24:22Z",
            "category": {
                "name": "",
                "id": ""
            },
            "start-page": "projectoverview",
            "startDate": "",
            "logo": "http://demo1company.teamwork.com/images/logo.jpg",
            "notifyeveryone": false,
            "id": "999",
            "last-changed-on": "2014-04-01T14:29:32Z",
            "endDate": "",
            "harvest-timers-enabled":"true"
        }
    ]
}

See Projects GET in Data Reference


Star a project

Adds a project to your list of favourite projects.

Request

Call: PUT /projects/{project_id}/star.json

Response

Returns HTTP status code 200 on success.


Unstar a project

Removes a project from your list of favourite projects.

Call: PUT /projects/{project_id}/unstar.json

Response

Returns HTTP status code 200 on success.


Read project Box folder and access

Lets you get the Box folder and Access Level on a particular project

Request

  • GET /projects/{id}/box.json

Response

{
  "box": {
    "folder-access": "alladmins",
    "folder-name": "Photos",
    "enabled": "1",
    "folder-id": "184515525"
  },
  "STATUS": "OK"
}


Set project Box folder and access

Lets you set the Box folder and Access Level on a particular project

Request

  • PUT /projects/{id}/box.json

Parameters

  • folder-access : string : Any one of ownerCompanyAdmins, alladmins, allAdminsAndOwnerCompany, allPeopleOnProject
  • enabled : boolean
  • folder-id : string: A valid Box Folder Resource ID

{
  "box": {
    "folder-access": "alladmins",    
    "enabled": "1",
    "folder-id": "184515525"
  }
}

Response

{
  "STATUS": "OK"
}


Read project Google Drive folder and access

Lets you get the Google Drive folder and Access Level on a particular project

Request

  • GET /projects/{id}/googleDrive.json

Response

{
  "google-drive": {
    "folder-access": "alladmins",
    "folder-name": "Dev Code",
    "enabled": "1",
    "folder-id": "0Bx_F-ZKgUTO-VmNGaElxbENpamM"
  },
  "STATUS": "OK"
}


Set project Google Drive folder and access

Lets you set the Google Drive folder and Access Level on a particular project

Request

  • PUT /projects/{id}/googleDrive.json

Parameters

  • folder-access : string : Any one of ownerCompanyAdmins, alladmins, allAdminsAndOwnerCompany, allPeopleOnProject
  • enabled : boolean
  • folder-id : string: A valid Google Drive Folder Resource ID

{
  "google-drive": {
    "folder-access": "alladmins",    
    "enabled": "1",
    "folder-id": "0Bx_F-ZKgUTO-VmNGaElxbENpamM"
  }
}

Response

{
  "STATUS": "OK"
}


Get Project Rates

Lets you see the hourly rate(s) set for People on a single Project

Request

  • GET /projects/{project_id}/rates.json

Parameters

  • page: integer : The page number to show
  • pageSize: integer: The number of tesults to show per page

Response

{
  "rates": {
    "users": {
      "12345": {
        "source": "direct",
        "rate": "100.00"
      }
    },
    "account-default": "50.00",
    "project-default": "30.00"
  },
  "STATUS": "OK"
}


Set Project Rates

This allows you to set Rates for people on a Project

Request

  • POST to /projects/{project_id}/rates.json

{
	"rates": {
		"users": {
			"12345": {
				"rate": 60
			},
			"12346": {
				"rate": 35
			}
		},
		"project-default": 20
	}
}

Response

{STATUS: "OK"}