Project Group

Freckle is now Noko! Learn how to migrate your apps here

List project groups

GET /project_groups/

Parameters

name
Optional string
Only project groups containing this string in their name will be returned.
Example: name=Sprockets
project_ids
Optional string
A comma-separated list of project IDs to filter by.
Example: project_ids=1,2,3

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/project_groups?page=2>; rel="next",
 <https://api.nokotime.com/v2/project_groups?page=5>; rel="last"
[
  {
    "id": 3768,
    "name": "Sprockets, Inc.",
    "projects": [
      {
        "id": 37396,
        "name": "Gear GmbH",
        "billing_increment": 10,
        "enabled": true,
        "billable": true,
        "color": "#ff9898",
        "url": "https://api.nokotime.com/v2/projects/37396"
      }
    ],
    "url": "https://api.nokotime.com/v2/project_groups/3768",
    "entries_url": "https://api.nokotime.com/v2/project_groups/3768/entries/",
    "invoices_url": "https://api.nokotime.com/v2/project_groups/3768/invoices/",
    "projects_url": "https://api.nokotime.com/v2/project_groups/3768/projects/",
    "created_at": "2012-01-09T08:33:29Z",
    "updated_at": "2012-01-09T08:33:29Z",
    "add_projects_url": "https://api.nokotime.com/v2/project_groups/3768/add_projects",
    "remove_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_projects",
    "remove_all_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_all_projects"
  }
]

Create a project group

POST /project_groups/

Inputs

name
Required string
The name of the project group.
project_ids
Required array of integers
The IDs of the projects to include in this project group.
projects that are assigned to an existing project group will be reassigned to this project group.
{
  "name": "Sprockets, Inc.",
  "projects": [
    1,
    2,
    3
  ]
}

Response

Status: 201 Created
Location: https://api.nokotime.com/v2/project_groups/1
{
  "id": 3768,
  "name": "Sprockets, Inc.",
  "projects": [
    {
      "id": 37396,
      "name": "Gear GmbH",
      "billing_increment": 10,
      "enabled": true,
      "billable": true,
      "color": "#ff9898",
      "url": "https://api.nokotime.com/v2/projects/37396"
    }
  ],
  "url": "https://api.nokotime.com/v2/project_groups/3768",
  "entries_url": "https://api.nokotime.com/v2/project_groups/3768/entries/",
  "invoices_url": "https://api.nokotime.com/v2/project_groups/3768/invoices/",
  "projects_url": "https://api.nokotime.com/v2/project_groups/3768/projects/",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z",
  "add_projects_url": "https://api.nokotime.com/v2/project_groups/3768/add_projects",
  "remove_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_projects",
  "remove_all_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_all_projects"
}

Get a project group

GET /project_groups/:id

Response

Status: 200 OK
{
  "id": 3768,
  "name": "Sprockets, Inc.",
  "projects": [
    {
      "id": 37396,
      "name": "Gear GmbH",
      "billing_increment": 10,
      "enabled": true,
      "billable": true,
      "color": "#ff9898",
      "url": "https://api.nokotime.com/v2/projects/37396"
    }
  ],
  "url": "https://api.nokotime.com/v2/project_groups/3768",
  "entries_url": "https://api.nokotime.com/v2/project_groups/3768/entries/",
  "invoices_url": "https://api.nokotime.com/v2/project_groups/3768/invoices/",
  "projects_url": "https://api.nokotime.com/v2/project_groups/3768/projects/",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z",
  "add_projects_url": "https://api.nokotime.com/v2/project_groups/3768/add_projects",
  "remove_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_projects",
  "remove_all_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_all_projects"
}

Edit a project group

PUT /project_groups/:id/

Inputs

name
Optional string
The name of the project group
{
  "name": "Sprockets, Inc."
}

Response

Status: 200 OK
{
  "id": 3768,
  "name": "Sprockets, Inc.",
  "projects": [
    {
      "id": 37396,
      "name": "Gear GmbH",
      "billing_increment": 10,
      "enabled": true,
      "billable": true,
      "color": "#ff9898",
      "url": "https://api.nokotime.com/v2/projects/37396"
    }
  ],
  "url": "https://api.nokotime.com/v2/project_groups/3768",
  "entries_url": "https://api.nokotime.com/v2/project_groups/3768/entries/",
  "invoices_url": "https://api.nokotime.com/v2/project_groups/3768/invoices/",
  "projects_url": "https://api.nokotime.com/v2/project_groups/3768/projects/",
  "created_at": "2012-01-09T08:33:29Z",
  "updated_at": "2012-01-09T08:33:29Z",
  "add_projects_url": "https://api.nokotime.com/v2/project_groups/3768/add_projects",
  "remove_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_projects",
  "remove_all_projects_url": "https://api.nokotime.com/v2/project_groups/3768/remove_all_projects"
}

Get the entries for projects in a project group

GET /project_groups/:id/entries

Parameters

You can use the parameters specified in the Entry API’s List Action to further limit the results

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/project_groups/:id/entries?page=2>; rel="next",
 <https://api.nokotime.com/v2/project_groups/:id/entries?page=5>; rel="last"
[
  {
    "id": 1,
    "date": "2012-01-09",
    "user": {
      "id": 5538,
      "email": "john.test@test.com",
      "first_name": "John",
      "last_name": "Test",
      "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
      "url": "https://api.nokotime.com/v2/users/5538"
    },
    "billable": true,
    "minutes": 60,
    "description": "noko",
    "project": {
      "id": 37396,
      "name": "Gear GmbH",
      "billing_increment": 10,
      "enabled": true,
      "billable": true,
      "color": "#ff9898",
      "url": "https://api.nokotime.com/v2/projects/37396"
    },
    "tags": [
      {
        "id": 249397,
        "name": "noko",
        "billable": true,
        "formatted_name": "#noko",
        "url": "https://api.nokotime.com/v2/tags/249397"
      }
    ],
    "source_url": "http://someapp.com/special/url/",
    "invoiced_at": "2012-01-10T08:33:29Z",
    "invoice": {
      "id": 12345678,
      "reference": "AA001",
      "invoice_date": "2013-07-09",
      "state": "unpaid",
      "total_amount": 189.33,
      "url": "https://api.nokotime.com/v2/invoices/12345678"
    },
    "import": {
      "id": 8910,
      "url": "https://api.nokotime.com/v2/imports/8910"
    },
    "approved_at": "2012-01-10T08:33:29Z",
    "approved_by": {
      "id": 5538,
      "email": "john.test@test.com",
      "first_name": "John",
      "last_name": "Test",
      "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
      "url": "https://api.nokotime.com/v2/users/5538"
    },
    "url": "https://api.nokotime.com/v2/entries/1711626",
    "invoiced_outside_of_noko_url": "https://api.nokotime.com/v2/entries/1711626/marked_as_invoiced",
    "approved_url": "https://api.nokotime.com/v2/entries/1711626/approved",
    "unapproved_url": "https://api.nokotime.com/v2/entries/1711626/unapproved",
    "created_at": "2012-01-09T08:33:29Z",
    "updated_at": "2012-01-09T08:33:29Z"
  }
]

Get the projects in a project group

GET /project_groups/:id/projects

Parameters

You can use the parameters specified in the Project API’s List Action to further limit the results

Response

Status: 200 OK
Link: <https://api.nokotime.com/v2/project_groups/:id/projects?page=2>; rel="next",
 <https://api.nokotime.com/v2/project_groups/:id/projects?page=5>; rel="last"
[
  {
    "id": 37396,
    "name": "Gear GmbH",
    "billing_increment": 10,
    "enabled": true,
    "billable": true,
    "color": "#ff9898",
    "url": "https://api.nokotime.com/v2/projects/37396",
    "group": {
      "id": 3768,
      "name": "Sprockets, Inc.",
      "url": "https://api.nokotime.com/v2/project_groups/3768"
    },
    "minutes": 180,
    "billable_minutes": 120,
    "unbillable_minutes": 60,
    "invoiced_minutes": 120,
    "remaining_minutes": 630,
    "budgeted_minutes": 750,
    "import": {
      "id": 8910,
      "url": "https://api.nokotime.com/v2/imports/8910"
    },
    "invoices": [
      {
        "id": 12345678,
        "reference": "AA001",
        "invoice_date": "2013-07-09",
        "state": "unpaid",
        "total_amount": 189.33,
        "url": "https://api.nokotime.com/v2/invoices/12345678"
      }
    ],
    "participants": [
      {
        "id": 5538,
        "email": "john.test@test.com",
        "first_name": "John",
        "last_name": "Test",
        "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
        "url": "https://api.nokotime.com/v2/users/5538"
      }
    ],
    "entries": 0,
    "entries_url": "https://api.nokotime.com/v2/projects/37396/entries",
    "expenses": 0,
    "expenses_url": "https://api.nokotime.com/v2/projects/37396/expenses",
    "created_at": "2012-01-09T08:33:29Z",
    "updated_at": "2012-01-09T08:33:29Z",
    "merge_url": "https://api.nokotime.com/v2/projects/37396/merge",
    "archive_url": "https://api.nokotime.com/v2/projects/37396/archive",
    "unarchive_url": "https://api.nokotime.com/v2/projects/37396/unarchive"
  }
]

Add projects to a project group

POST /project_groups/:id/add_projects

Input

project_ids
Required array of integers
The IDs of the projects to add to the project group. Any projects that are already associated with another project group will be ignored and will not affect the Response.

Response

Status: 200 OK
[
  {
    "id": 37396,
    "name": "Gear GmbH",
    "billing_increment": 10,
    "enabled": true,
    "billable": true,
    "color": "#ff9898",
    "url": "https://api.nokotime.com/v2/projects/37396",
    "group": {
      "id": 3768,
      "name": "Sprockets, Inc.",
      "url": "https://api.nokotime.com/v2/project_groups/3768"
    },
    "minutes": 180,
    "billable_minutes": 120,
    "unbillable_minutes": 60,
    "invoiced_minutes": 120,
    "remaining_minutes": 630,
    "budgeted_minutes": 750,
    "import": {
      "id": 8910,
      "url": "https://api.nokotime.com/v2/imports/8910"
    },
    "invoices": [
      {
        "id": 12345678,
        "reference": "AA001",
        "invoice_date": "2013-07-09",
        "state": "unpaid",
        "total_amount": 189.33,
        "url": "https://api.nokotime.com/v2/invoices/12345678"
      }
    ],
    "participants": [
      {
        "id": 5538,
        "email": "john.test@test.com",
        "first_name": "John",
        "last_name": "Test",
        "profile_image_url": "https://api.nokotime.com/images/avatars/0000/0001/avatar.jpg",
        "url": "https://api.nokotime.com/v2/users/5538"
      }
    ],
    "entries": 0,
    "entries_url": "https://api.nokotime.com/v2/projects/37396/entries",
    "expenses": 0,
    "expenses_url": "https://api.nokotime.com/v2/projects/37396/expenses",
    "created_at": "2012-01-09T08:33:29Z",
    "updated_at": "2012-01-09T08:33:29Z",
    "merge_url": "https://api.nokotime.com/v2/projects/37396/merge",
    "archive_url": "https://api.nokotime.com/v2/projects/37396/archive",
    "unarchive_url": "https://api.nokotime.com/v2/projects/37396/unarchive"
  }
]

Remove projects from project group

PUT /project_groups/:id/remove_projects

Input

project_ids
Required array of integers
The IDs of the projects to remove from the project group. Any projects that are not associated with the project group will be ignored and will not affect the Response.

Response

Status: 204 No Content

Remove all projects from a project group

PUT /project_groups/:id/remove_all_projects

Response

Status: 204 No Content

Delete a project group

When a project group is deleted, the project in the project group are not deleted. Instead, they are not associated with any project group.

DELETE /project_groups/:id/

Response

Status: 204 No Content