-
Notifications
You must be signed in to change notification settings - Fork 3
Targets API
The Project Target API provides access to the Target Management functionality of TeamHaven.
- Get an existing Target
- Create a new Target
- Update an existing Target
- Delete an existing Target
- Target search
- Assign a User to a Target
- Remove a Target assignment
- Get the User assigned to a 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.
POST /api/projects/:p/targets
(Not yet implemented)
PUT /api/projects/:p/targets/:t
(Not yet implemented)
DELETE /api/projects/:p/targets/:t
(Not yet implemented)
GET /api/projects/:p/targets
Returns an array of Targets that match the specified search criteria.
Only return Targets whose Name matches the specified value. % can be used as a wildcard.
Only return Targets whose Details match the specified value. % can be used as a wildcard.
Only return Targets whose Name Attribute matches the specified value. % can be used as a wildcard. Eg: ProjectTargetAttribute.City=Paris.
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.
The Target Search uses Result Paging semantics, which are controlled through the following Query String parameters:
The number of results to skip before this page of results are returned. The default is 0.
The maximum number of results to return. If there are more results available, then the More flag will be set to true in the JSON response.
The name of a field to sort the results by. The default is Target.Name, but can be the name of any of the searchable properties (Target.Name, Target.Details, Target.TargetID, ProjectTargetAttribute.Name).
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.
DELETE /api/projects/:p/targets/:t/defaultuser
Deletes the Target's user assignment and returns it to Unassigned status.
GET /api/projects/:p/targets/:t/defaultuser
Gets the User assigned to the specified target. If the Target is unassigned, this will return an empty JSON object ({}).