REST API:team Resource
From LongJump Support Wiki
Revision as of 01:20, 1 June 2013 by imported>Aeric (→Access Permissions)
Performs actions on Team records via the REST API
Access Permissions
Users that have the User Management permission can use the team Resource in the REST API
Get a Team Record
Retrieves a single Team record
- Method
- GET
- URI
- https://na.longjump.com/networking/rest/team/{recordId}
- Response
<platform> <team> <id>1</id> <name>Our Team</name> <description/> <date_created>2010-11-12T13:14:15Z</date_created> <created_id type="USER" uri="https://{domain}/networking/rest/user/3" displayValue="System">3</created_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <modified_id type="USER" uri="https://{domain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</modified_id> <parent_team_id type="TEAM" uri="https://{domain}/networking/rest/team/1" displayValue="My Team">1</parent_team_id> </team> <message> <code>0</code> <description>Success</description> </message> </platform>
Add a Team Record
Adds a team record
- Method
- POST
- URI
- https://na.longjump.com/networking/rest/team/
- Request
<platform> <team> <name>Our Team</name> <parent_team_id>1341044864</parent_team_id> </team> </platform>
- Response
<platform> <message> <code>0</code> <description>Success</description> <id>18184374</id> </message> </platform>
Dynamic Search
Provides a dynamic search based on fields, number of records, offset, sort column, sort order or criteria
- Method
- GET
- URI
- https://na.longjump.com/networking/rest/team?{query_parameters}
- Sample Search
- ?fieldList=name,id & filter=name contains 'smith' & sortby='id'
- (Field names are in the Fields section.)
- Query Parameters
- fieldList - A comma-separated list of field names to retrieve
- The asterisk (*) wildcard specifies all fields
- Use the REST API:field Resource to get a complete list of fields
- Field lists for database views need to specify the object's alias, as well as the field name.
- filter - Filtering criteria to filter the records
- For more examples, see Filter Expressions in REST APIs and the REST API Examples.)
- pageSize - Number of records to retrieve from the result set in order to make a "page".
- page - Number of the logical page in a database result set. The first page is page "zero" (0).
- Page zero is returned by default, so appending &pageSize=1 to your query returns a single record.
- getTotalRecordCount returns the number of total records.
Causes the following structure to be returned, where N is the total number of records:
<platform> ... <message> <code>0</code> <description>Success</description> </message> <!-- added by the query param --> <totalRecordCount>N</totalRecordCount> </platform>
- sortBy - Field name for primary sort
Ex: &sortBy=name - sortOrder - Sort order of the primary field, either "asc" or "desc" (ascending or descending)
Ex: &sortOrder="desc" - sortBy2 - Field name for secondary sort
- sortOrder2 - Sort order of the second field, either "asc" or "desc" (ascending or descending)
- sortBy - Field name for primary sort
- For more information, see: Specifying Query Parameters in REST APIs
- Response
<platform> <record> <id>1</id> <created_id type="" uri="https://{domain}/networking/rest/user/3" displayValue=" System">3</created_id> <modified_id type="" uri="https://{domain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</modified_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <object_id>TEAM</object_id> <name>Our Team</name> <date_created>2010-11-12T13:14:15Z</date_created> </record> <record> <id>888961917</id> <created_id type="" uri="https://{domain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</created_id> <modified_id type="" uri="https://{domain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</modified_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <object_id>TEAM</object_id> <name>Our Team</name> <date_created>2010-11-12T13:14:15Z</date_created> </record> <message> <code>0</code> <description>Success</description> </message> <recordCount>2</recordCount> </platform>
Update a Team Record
- Method
- PUT
- URI
- https://na.longjump.com/networking/rest/team/{recordId}
- Request
<platform> <team> <name>Our Team</name> <parent_team_id>123423412</parent_team_id> </team> </platform>
- Response
<platform> <message> <code>0</code> <description>Success</description> <id>18184374</id> </message> </platform>
Delete a Team Record
Deletes a Team record
- Method
- DELETE
- URI
- https://na.longjump.com/networking/rest/team/{recordId}
- Response
<platform> <message> <code>0</code> <description>Success</description> </message> </platform>
Fields
Name Type Attribute Required During Add Description Additional Information id Integer Read Only Record Id name String Writable on Add only Team Name description String Editable on Add/Update Team description parent_team_id Integer Editable on Add/Update Parent date_modified Date Read Only UTC Format date_created Date Read Only UTC Format created_id Lookup Read Only User ID modified_id Lookup Read Only User ID