Difference between revisions of "REST API:team Resource"
From AgileApps Support Wiki
imported>Aeric |
imported>Aeric |
||
(3 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
<date_created>2010-11-12T13:14:15Z</date_created> | <date_created>2010-11-12T13:14:15Z</date_created> | ||
<created_id type="USER" | <created_id type="USER" | ||
uri="https://{domain}/networking/rest/user/3" | uri="https://{{domain}}/networking/rest/user/3" | ||
displayValue="System">3</created_id> | displayValue="System">3</created_id> | ||
<date_modified>2010-11-12T13:14:15Z</date_modified> | <date_modified>2010-11-12T13:14:15Z</date_modified> | ||
<modified_id type="USER" | <modified_id type="USER" | ||
uri="https://{domain}/networking/rest/user/1424089492" | uri="https://{{domain}}/networking/rest/user/1424089492" | ||
displayValue="Admin">1424089492</modified_id> | displayValue="Admin">1424089492</modified_id> | ||
<parent_team_id type="TEAM" | <parent_team_id type="TEAM" | ||
uri="https://{domain}/networking/rest/team/1" | uri="https://{{domain}}/networking/rest/team/1" | ||
displayValue="My Team">1</parent_team_id> | displayValue="My Team">1</parent_team_id> | ||
</team> | </team> | ||
Line 47: | Line 47: | ||
<platform> | <platform> | ||
<team> | <team> | ||
<name>Our Team</name> | <name>Our Team</name> | ||
<parent_team_id>1341044864</parent_team_id> | <parent_team_id>1341044864</parent_team_id> | ||
<description>POST Team1</description> | |||
<email>s11@r.com</email> | |||
</team> | </team> | ||
</platform> | </platform> | ||
Line 72: | Line 74: | ||
:;Sample Search: | :;Sample Search: | ||
::<tt><nowiki>?fieldList=name,id & filter=name contains 'smith' & sortby='id'</nowiki></tt> | ::<tt><nowiki>?fieldList=name,id&filter=name contains 'smith' & sortby='id'</nowiki></tt> | ||
:: (Field names are in the [[#Fields|Fields]] section.) | :: (Field names are in the [[#Fields|Fields]] section.) | ||
Line 83: | Line 85: | ||
<id>1</id> | <id>1</id> | ||
<created_id type="" | <created_id type="" | ||
uri="https://{domain}/networking/rest/user/3" | uri="https://{{domain}}/networking/rest/user/3" | ||
displayValue=" System">3</created_id> | displayValue=" System">3</created_id> | ||
<modified_id type="" | <modified_id type="" | ||
uri="https://{domain}/networking/rest/user/1424089492" | uri="https://{{domain}}/networking/rest/user/1424089492" | ||
displayValue="Admin">1424089492</modified_id> | displayValue="Admin">1424089492</modified_id> | ||
<date_modified>2010-11-12T13:14:15Z</date_modified> | <date_modified>2010-11-12T13:14:15Z</date_modified> | ||
Line 97: | Line 99: | ||
<id>888961917</id> | <id>888961917</id> | ||
<created_id type="" | <created_id type="" | ||
uri="https://{domain}/networking/rest/user/1424089492" | uri="https://{{domain}}/networking/rest/user/1424089492" | ||
displayValue="Admin">1424089492</created_id> | displayValue="Admin">1424089492</created_id> | ||
<modified_id type="" | <modified_id type="" | ||
uri="https://{domain}/networking/rest/user/1424089492" | uri="https://{{domain}}/networking/rest/user/1424089492" | ||
displayValue="Admin">1424089492</modified_id> | displayValue="Admin">1424089492</modified_id> | ||
<date_modified>2010-11-12T13:14:15Z</date_modified> | <date_modified>2010-11-12T13:14:15Z</date_modified> | ||
Line 125: | Line 127: | ||
<team> | <team> | ||
<name>Our Team</name> | <name>Our Team</name> | ||
<parent_team_id>123423412</parent_team_id> | <parent_team_id>123423412</parent_team_id> | ||
<description>POST Team1</description> | |||
<email>s11@r.com</email> | |||
</team> | </team> | ||
</platform> | </platform> | ||
Line 172: | Line 176: | ||
|- | |- | ||
|parent_team_id||Integer||align="center"|Editable on Add/Update|| ||Parent || | |parent_team_id||Integer||align="center"|Editable on Add/Update|| ||Parent || | ||
|- | |||
|email||String||align="center"|Editable on Add/Update|| ||This is the team email address used for communicating the task assignments. || | |||
|- | |- | ||
|date_modified||Date||align="center"|Read Only|| || ||[[UTC Format]] | |date_modified||Date||align="center"|Read Only|| || ||[[UTC Format]] |
Latest revision as of 09:12, 24 July 2018
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://{yourDomain}/networking/rest/team/{recordId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<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://{yourDomain}/networking/rest/user/3" displayValue="System">3</created_id> <date_modified>2010-11-12T13:14:15Z</date_modified> <modified_id type="USER" uri="https://{yourDomain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</modified_id> <parent_team_id type="TEAM" uri="https://{yourDomain}/networking/rest/team/1" displayValue="My Team">1</parent_team_id> </team>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
Add a Team Record
Adds a team record
- Method
- POST
- URI
- https://{yourDomain}/networking/rest/team/
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<team> <name>Our Team</name> <parent_team_id>1341044864</parent_team_id> <description>POST Team1</description> <email>s11@r.com</email> </team>
</platform> </syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
<id>18184374</id>
</message>
</platform> </syntaxhighlight>
Dynamic Search
Provides a dynamic search based on fields, number of records, offset, sort column, sort order or criteria
- Method
- GET
- URI
- https://{yourDomain}/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
- {fieldname} specifies an individual field (e.g. name)
- (Use the REST API:field Resource to get a complete list of fields.)
- For a Composite Object, specify {alias}.{fieldname} to select a related-record field, where the alias is defined in the Object Relationships.
- For a Database View, specify {alias}.{fieldname}, where the object alias is defined in the Database View.
- alias.* specifies all fields in the aliased object.
- 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:
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<status>
<packageDeploy>
...
</packageDeploy>
</status>
<message>
0
<description>Success</description>
</message>
<totalRecordCount>N</totalRecordCount>
</platform> </syntaxhighlight>
- 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
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<record> <id>1</id> <created_id type="" uri="https://{yourDomain}/networking/rest/user/3" displayValue=" System">3</created_id> <modified_id type="" uri="https://{yourDomain}/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://{yourDomain}/networking/rest/user/1424089492" displayValue="Admin">1424089492</created_id> <modified_id type="" uri="https://{yourDomain}/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>
0
<description>Success</description>
</message>
<recordCount>2</recordCount> </platform> </syntaxhighlight>
Update a Team Record
- Method
- PUT
- URI
- https://{yourDomain}/networking/rest/team/{recordId}
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<team> <name>Our Team</name> <parent_team_id>123423412</parent_team_id> <description>POST Team1</description> <email>s11@r.com</email> </team>
</platform> </syntaxhighlight>
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
<id>18184374</id>
</message>
</platform> </syntaxhighlight>
Delete a Team Record
Deletes a Team record
- Method
- DELETE
- URI
- https://{yourDomain}/networking/rest/team/{recordId}
- Response
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
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 email String Editable on Add/Update This is the team email address used for communicating the task assignments. 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