REST API:team Resource

From AgileApps Support Wiki
(Redirected from REST API:Team Resource)

Performs actions on Team records via the REST API

Access Permissions

Lock-tiny.gif

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
  • 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)
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 Checkmark.gif 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