Skip to content
Richard Thombs edited this page Jan 11, 2015 · 25 revisions

The Project Target API provides access to the Target Management functionality of TeamHaven.

Get an existing Target

GET /api/projects/:p/targets/:t[?schema=true]

Get a Target belonging to the specified Project. If schema=true, then the Project Target's Attribute Schema is included in the response.

Create a new Target

POST /api/projects/:p/targets

(Not yet implemented)

Update an existing Target

PUT /api/projects/:p/targets/:t

(Not yet implemented)

Delete an existing Target

DELETE /api/projects/:p/targets/:t

(Not yet implemented)

Target search

GET /api/projects/:p/targets

Returns an array of Targets that match the specified search criteria.

Query String parameters

Target.Name

Only return Targets whose Name matches the specified value. % can be used as a wildcard.

Target.Details

Only return Targets whose Details match the specified value. % can be used as a wildcard.

ProjectTargetAttribute.Name

Only return Targets whose Name Attribute matches the specified value. % can be used as a wildcard. Eg: ProjectTargetAttribute.City=Paris.

Assigned

If true then only return Targets which have been assigned to a User. If false then only return Targets which have not been assigned to a User.

Assign a User to a Target

PUT /api/projects/:p/targets/:t/defaultuser

Assigns the Target to the specified User. The request body must contain the UserID of the user to assign.

Remove a Target assignment

DELETE /api/projects/:p/targets/:t/defaultuser

Deletes the Target's user assignment and returns it to Unassigned status.

Get the User assigned to a Target

GET /api/projects/:p/targets/:t/defaultuser

Gets the User assigned to the specified target.

Clone this wiki locally