Skip to content
Richard Thombs edited this page Feb 24, 2015 · 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.

Get project details & settings

GET /api/projects/:id

Response

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

  ContactUserID: 12,

  PreviewMargin: 7,
  CriticalMargin: 3,
  ExpiryMargin: 3,

  CollectorCanUpdateCalls: true,
  CollectorCanCreateCalls: true,

  MobileGroupingAttributeID: 12,
  RetainCompletedCalls: true,
  CheckinsEnabled: true, // This is always TRUE
  DefaultCountry: 'GB',

  IncludedInPayroll: true
}

Update project details & settings

PUT /api/projects/:id

Create new project

POST /api/projects

Request

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

Project Theme

Get project theme

GET /api/projects/:id/theme

Response

{
    AccentBackgroundColor: '#0081c6',
    AccentForegroundColor: '#ffffff',
    AccentBorderColor: '#008186',
    BoxBackgroundColor: '#ffffff'
}

Update project theme

PUT /api/projects/:id/theme

Reset project theme

DELETE /api/projects/:id/theme

Resets the Project's theme so that the Account's theme is used instead.

Project Pay Rates

Get project pay rates

GET /api/projects/:id/payrates

Update project pay rates

PUT /api/projects/:id/payrates

Project Check-ins

Get Project Check-in settings

GET /api/projects/:id/checkins

Response

{
  CheckinRadius: 50,               // User must be within this distance (in meters) to check-in
  CheckinOutside: false,           // If TRUE, user can check-in when outside the radius
  InaccurateCheckins: false,       // If TRUE, user can check-in if their distance from the Target
                                   // is not accurate (Device inaccurate or Target position inaccurate)
  UnknownLocationCheckins: false   // If TRUE, user can check-in even if their position is unknown
}

Project Security

Get the list of users with access

GET /api/projects/:id/users

Returns the list of Users who have access to the Project.

Set the list of users with access

POST /api/projects/:id/users

This replaces the current set of Users with access with the list provided.

Request

TODO

Note: This API does not affect Collectors, as their access is governed by whether they have been assigned to Calls or Targets in the Project.

Clone this wiki locally