Skip to content
richardthombs edited this page Oct 14, 2014 · 19 revisions

The Projects API gives access to TeamHaven's Project Management functionality.

List of projects

GET /api/projects

Enumerates a list of the Projects which the user has access to. Only active projects which have not been archived are returned.

Project details

GET /api/projects/:id

Retrieves the Project with the specified Project ID.

Create new project

POST /api/projects

Request

{
  Name: "My project",
  Description: "This is a demo project",
  Reference: "ABC123",
}

Response

TODO

Get project settings

GET /api/projects/:id/settings

Response

{
  Name: 'My project',
  Description: 'This is a demo project',
  Reference: 'ABC123',
  Contact:
  {
    UserID: 12,
    DisplayName: 'Richard Thombs',
    Username: 'richard',
    Attributes:
    {
      Email: 'richard@teamhaven.com',
      Telephone: '+1 949 555 1234'
    }
  },
  Margins:
  {
    Preview: 7,
    Critical: 3,
    Expiry: 3
  },
  CollectorPermissions:
  {
    UpdateCalls: true,
    CreateCalls: true,
    CreateTargets: true
  }
  Mobile:
  {
    GroupByTargetAttributeID: 12,
    RetainCompletedCalls: true,
    CheckinsEnabled: true
  }
  Mapping:
  {
    DefaultCountry: 'GB'
  },
  Theme:
  {
    AccentForegroundColor: '#ffffff',
    AccentBackgroundColor: '#0081c6',
    AccentBorderColor: '#004476',
    Logo: '/api/projects/1/logo'
  }
    
}

Update project settings

PUT /api/projects/:id/settings

Request

The request can contain all or part of the same JSON structure as the GET response. If an element is not specified, then it is not changed.

Clone this wiki locally