Difference between revisions of "REST API: applicationTabs"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
This API allows you to customize the '''Application Tabs''' settings available in '''My Settings''' on your profile page. This allows you to customize the object tabs you want to see in the screen when you log into a particular application.
This API allows you to customize the '''Application Tabs''' settings available in '''My Settings''' on your profile page. This allows you to customize the object tabs you want to see in the screen when you log into a particular application.


===Add a User for Delegation===
===Update Application Tab===
Allows you to add users to the Delegated users list.  
Allows you to update the objects in the Application Tab.  
;Method:POST
;Method:PUT
;URI:<tt>https://{yourDomain}/networking/rest/delegation/</tt>
;URI:<tt>https://{yourDomain}/networking/rest/user/applicationtabs</tt>
;Request:
;Request:
:<syntaxhighlight lang="html4strict" enclose="div">
:<syntaxhighlight lang="html4strict" enclose="div">
<platform>
<root>
<delegation>
  <platform>
<active>false</active>
      <user>
<applicationId>08455b174ee14b26859c44c60f2ceb7b</applicationId>
        <application>servicedesk</application>
<createdId>
        <workspacepreference>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
            <element>cases</element>
<displayValue>Fix Fix2</displayValue>
            <element>reports</element>
<type>USER</type>
        </workspacepreference>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
      </user>
</createdId>
  </platform>
<dateCreated>2018-07-26T00:46:41.000Z</dateCreated>
</root>
<dateModified>2018-07-26T06:09:09.000Z</dateModified>
<delegateAccessProfile>false</delegateAccessProfile>
<delegatee>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
<displayValue>Fix Fix2</displayValue>
<type>USER</type>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
</delegatee>
<id>ee35804e4c2942b999d8b5521e786fd7</id>
<modifiedId>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
<displayValue>Fix Fix2</displayValue>
<type>USER</type>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
</modifiedId>
<prinicpalUser>
<content>792a8e8725104cb58e5d337ea730f59b</content>
<displayValue>Fit fit</displayValue>
<type>USER</type>
<uri>https://localhost/networking/rest/user/792a8e8725104cb58e5d337ea730f59b</uri>
</prinicpalUser>
<roleId>
<content>18d2099643e64deab4a174dc113a5174</content>
<displayValue>Agent</displayValue>
<type>ROLE</type>
<uri>https://localhost/networking/rest/role/18d2099643e64deab4a174dc113a5174</uri>
</roleId>
<roleId>
<content>c7b03526a90c44cdbbfdaa4e5564c6a9</content>
<displayValue>Manager</displayValue>
<type>ROLE</type>
<uri>https://localhost/networking/rest/role/c7b03526a90c44cdbbfdaa4e5564c6a9</uri>
</roleId>
</delegation>
</platform>
</syntaxhighlight>
</syntaxhighlight>
;Response:
;Response:
:<syntaxhighlight lang="html4strict" enclose="div">
:<syntaxhighlight lang="html4strict" enclose="div">
<platform>
<root>
<message>
  <platform>
<code>0</code>
      <message>
<description>Success</description>
        <code>1</code>
<id>&lt;delegationId&gt;</id>
        <description>Application tabs updated successfully</description>
</message>
      </message>
</platform>
  </platform>
</root>
</syntaxhighlight>
</syntaxhighlight>
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Retrieve the Delegated Users list===
===Get the Application Tabs===
Retrieves the list of delegated users.
Retrieves the list of objects for Application Tab.
;Method:GET
;Method:GET
 
;URI:<tt>https://{yourDomain}/networking/rest/user/applicationtabs</tt>
;URI:<tt>https://{yourDomain}/networking/rest/delegation/<delegationId></tt>
;Response:
;Response:
:<syntaxhighlight lang="html4strict" enclose="div">
:<syntaxhighlight lang="html4strict" enclose="div">
<platform>
<root>
<delegation>
  <platform>
<active>false</active>
      <message>
<applicationId>08455b174ee14b26859c44c60f2ceb7b</applicationId>
        <code>0</code>
<createdId>
        <description>Success</description>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
      </message>
<displayValue>Fix Fix2</displayValue>
      <userApplicationTab>
<type>USER</type>
        <applications>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
            <element>
</createdId>
              <content>2dac0fe6d8614c95838ff6a5ed9d3d65</content>
<dateCreated>2018-07-26T00:46:41.000Z</dateCreated>
              <displayValue>DCM DAP</displayValue>
<dateModified>2018-07-26T06:09:09.000Z</dateModified>
              <uri>https://localhost/networking/rest/application/2dac0fe6d8614c95838ff6a5ed9d3d65</uri>
<delegateAccessProfile>false</delegateAccessProfile>
            </element>
<delegatee>
            <element>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
              <content>b1b845f1dc4c4c82ad161049893d7f4f</content>
<displayValue>Fix Fix2</displayValue>
              <displayValue>DEP01</displayValue>
<type>USER</type>
              <uri>https://localhost/networking/rest/application/b1b845f1dc4c4c82ad161049893d7f4f</uri>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
            </element>
</delegatee>
            <element>
<id>ee35804e4c2942b999d8b5521e786fd7</id>
              <content>1de288ff88f54623a1c5fc2c1729b9f0</content>
<modifiedId>
              <displayValue>Reports test</displayValue>
<content>b2c6fb3b59ba4f9a9c212f20be284df5</content>
              <uri>https://localhost/networking/rest/application/1de288ff88f54623a1c5fc2c1729b9f0</uri>
<displayValue>Fix Fix2</displayValue>
            </element>
<type>USER</type>
            <element>
<uri>https://localhost/networking/rest/user/b2c6fb3b59ba4f9a9c212f20be284df5</uri>
              <content>1</content>
</modifiedId>
              <displayValue>Service Desk</displayValue>
<prinicpalUser>
              <uri>https://localhost/networking/rest/application/1</uri>
<content>792a8e8725104cb58e5d337ea730f59b</content>
            </element>
<displayValue>Fit fit</displayValue>
            <element>
<type>USER</type>
              <content>4a51a9de7fa84a8d9114e7fdb437533d</content>
<uri>https://localhost/networking/rest/user/792a8e8725104cb58e5d337ea730f59b</uri>
              <displayValue>dep test 4</displayValue>
</prinicpalUser>
              <uri>https://localhost/networking/rest/application/4a51a9de7fa84a8d9114e7fdb437533d</uri>
<roleId>
            </element>
<content>18d2099643e64deab4a174dc113a5174</content>
            <element>
<displayValue>Agent</displayValue>
              <content>99621d766bf043e08ad35303050c0044</content>
<type>ROLE</type>
              <displayValue>enRoute</displayValue>
<uri>https://localhost/networking/rest/role/18d2099643e64deab4a174dc113a5174</uri>
              <uri>https://localhost/networking/rest/application/99621d766bf043e08ad35303050c0044</uri>
</roleId>
            </element>
<roleId>
        </applications>
<content>c7b03526a90c44cdbbfdaa4e5564c6a9</content>
        <hiddenTabs>
<displayValue>Manager</displayValue>
            <element>
<type>ROLE</type>
              <displayValue>Tasks - tasks</displayValue>
<uri>https://localhost/networking/rest/role/c7b03526a90c44cdbbfdaa4e5564c6a9</uri>
              <tabid>tasks</tabid>
</roleId>
            </element>
</delegation>
            <element>
<message>
              <displayValue>AllFieldObject</displayValue>
<code>0</code>
              <tabid>5fdd703d561444239d97800a295f6f09</tabid>
<description>Success</description>
            </element>
</message>
            <element>
</platform>
              <displayValue>testobj1</displayValue>
              <tabid>6e7d33f131954d05aeaf277b318ed3f6</tabid>
            </element>
        </hiddenTabs>
        <id>1</id>
        <selectedTabs>
            <element>
              <displayValue>Cases - cases</displayValue>
              <tabid>cases</tabid>
            </element>
            <element>
              <displayValue>Accounts</displayValue>
              <tabid>accounts</tabid>
            </element>
            <element>
              <displayValue>Contacts</displayValue>
              <tabid>contacts</tabid>
            </element>
            <element>
              <displayValue>Articles</displayValue>
              <tabid>articles</tabid>
            </element>
            <element>
              <displayValue>Twitter</displayValue>
              <tabid>twitter</tabid>
            </element>
            <element>
              <displayValue>Reports</displayValue>
              <tabid>259</tabid>
            </element>
            <element>
              <displayValue>TTT</displayValue>
              <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
        </selectedTabs>
      </userApplicationTab>
  </platform>
</root>
</syntaxhighlight>
</syntaxhighlight>
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Update the List of Delegated Users===
===Sample PUT Body===
Allows you to update the list of delegated users.
This is a sample for the PUT body.


;Method:PUT
;Method:PUT
;URI:<tt>https://{yourDomain}/networking/rest/delegation/<delegationId></tt>
;URI:<tt>https://localhost/networking/rest/user/applicationTabs</tt>
;Response
;Response
:<syntaxhighlight lang="html4strict" enclose="div">
:<syntaxhighlight lang="html4strict" enclose="div">
<platform>
<root>
<message>
  <platform>
<code>0</code>
      <userApplicationTab>
<description>Success</description>
        <id>1</id>
<id>&lt;delegationId&gt;</id>
        <selectedTabs>
</message>
            <element>
</platform>
              <displayValue>Cases - cases</displayValue>
              <tabid>cases</tabid>
            </element>
            <element>
              <displayValue>Accounts</displayValue>
              <tabid>accounts</tabid>
            </element>
            <element>
              <displayValue>Contacts</displayValue>
              <tabid>contacts</tabid>
            </element>
            <element>
              <displayValue>Articles</displayValue>
              <tabid>articles</tabid>
            </element>
            <element>
              <displayValue>Twitter</displayValue>
              <tabid>twitter</tabid>
            </element>
            <element>
              <displayValue>Reports</displayValue>
              <tabid>259</tabid>
            </element>
            <element>
              <displayValue>TTT</displayValue>
              <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
        </selectedTabs>
      </userApplicationTab>
  </platform>
</root>
</syntaxhighlight>
</syntaxhighlight>
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]




===Delete a Delegated User===
===GET for a Particular Application===
Allows you to delete a delegated user.
Allows you to get the Application Tab for a particular application.
;Method:DELETE
;Method:GET
;URI:<tt>https://{yourDomain}/networking/rest/delegation/<delegationId></tt>
;URI:<tt>https://{yourDomain}/networking/rest/delegation/<delegationId></tt>
;Response:
;Response:
:<syntaxhighlight lang="html4strict" enclose="div">
:<syntaxhighlight lang="html4strict" enclose="div">
<platform>
<root>
<message>
  <platform>
<code>0</code>
      <message>
<description>Success</description>
        <code>0</code>
</message>
        <description>Success</description>
</platform>
      </message>
      <userApplicationTab>
        <hiddenTabs>
            <element>
              <displayValue>Tasks - tasks</displayValue>
              <tabid>tasks</tabid>
            </element>
            <element>
              <displayValue>testobj1</displayValue>
              <tabid>6e7d33f131954d05aeaf277b318ed3f6</tabid>
            </element>
        </hiddenTabs>
        <id>1</id>
        <selectedTabs>
            <element>
              <displayValue>Cases - cases</displayValue>
              <tabid>cases</tabid>
            </element>
            <element>
              <displayValue>Accounts</displayValue>
              <tabid>accounts</tabid>
            </element>
            <element>
              <displayValue>Contacts</displayValue>
              <tabid>contacts</tabid>
            </element>
            <element>
              <displayValue>Articles</displayValue>
              <tabid>articles</tabid>
            </element>
            <element>
              <displayValue>Twitter</displayValue>
              <tabid>twitter</tabid>
            </element>
            <element>
              <displayValue>Reports</displayValue>
              <tabid>259</tabid>
            </element>
            <element>
              <displayValue>AllFieldObject</displayValue>
              <tabid>5fdd703d561444239d97800a295f6f09</tabid>
            </element>
            <element>
              <displayValue>TTT</displayValue>
              <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
        </selectedTabs>
      </userApplicationTab>
  </platform>
</root>
</syntaxhighlight>
</syntaxhighlight>



Revision as of 08:26, 23 August 2018

This API allows you to customize the Application Tabs settings available in My Settings on your profile page. This allows you to customize the object tabs you want to see in the screen when you log into a particular application.

Update Application Tab

Allows you to update the objects in the Application Tab.

Method
PUT
URI
https://{yourDomain}/networking/rest/user/applicationtabs
Request
<root>
   <platform>
      <user>
         <application>servicedesk</application>
         <workspacepreference>
            <element>cases</element>
            <element>reports</element>
         </workspacepreference>
      </user>
   </platform>
</root>
Response
<root>
   <platform>
      <message>
         <code>1</code>
         <description>Application tabs updated successfully</description>
      </message>
   </platform>
</root>
See also: REST API:Error Codes

Get the Application Tabs

Retrieves the list of objects for Application Tab.

Method
GET
URI
https://{yourDomain}/networking/rest/user/applicationtabs
Response
<root>
   <platform>
      <message>
         <code>0</code>
         <description>Success</description>
      </message>
      <userApplicationTab>
         <applications>
            <element>
               <content>2dac0fe6d8614c95838ff6a5ed9d3d65</content>
               <displayValue>DCM DAP</displayValue>
               <uri>https://localhost/networking/rest/application/2dac0fe6d8614c95838ff6a5ed9d3d65</uri>
            </element>
            <element>
               <content>b1b845f1dc4c4c82ad161049893d7f4f</content>
               <displayValue>DEP01</displayValue>
               <uri>https://localhost/networking/rest/application/b1b845f1dc4c4c82ad161049893d7f4f</uri>
            </element>
            <element>
               <content>1de288ff88f54623a1c5fc2c1729b9f0</content>
               <displayValue>Reports test</displayValue>
               <uri>https://localhost/networking/rest/application/1de288ff88f54623a1c5fc2c1729b9f0</uri>
            </element>
            <element>
               <content>1</content>
               <displayValue>Service Desk</displayValue>
               <uri>https://localhost/networking/rest/application/1</uri>
            </element>
            <element>
               <content>4a51a9de7fa84a8d9114e7fdb437533d</content>
               <displayValue>dep test 4</displayValue>
               <uri>https://localhost/networking/rest/application/4a51a9de7fa84a8d9114e7fdb437533d</uri>
            </element>
            <element>
               <content>99621d766bf043e08ad35303050c0044</content>
               <displayValue>enRoute</displayValue>
               <uri>https://localhost/networking/rest/application/99621d766bf043e08ad35303050c0044</uri>
            </element>
         </applications>
         <hiddenTabs>
            <element>
               <displayValue>Tasks - tasks</displayValue>
               <tabid>tasks</tabid>
            </element>
            <element>
               <displayValue>AllFieldObject</displayValue>
               <tabid>5fdd703d561444239d97800a295f6f09</tabid>
            </element>
            <element>
               <displayValue>testobj1</displayValue>
               <tabid>6e7d33f131954d05aeaf277b318ed3f6</tabid>
            </element>
         </hiddenTabs>
         <id>1</id>
         <selectedTabs>
            <element>
               <displayValue>Cases - cases</displayValue>
               <tabid>cases</tabid>
            </element>
            <element>
               <displayValue>Accounts</displayValue>
               <tabid>accounts</tabid>
            </element>
            <element>
               <displayValue>Contacts</displayValue>
               <tabid>contacts</tabid>
            </element>
            <element>
               <displayValue>Articles</displayValue>
               <tabid>articles</tabid>
            </element>
            <element>
               <displayValue>Twitter</displayValue>
               <tabid>twitter</tabid>
            </element>
            <element>
               <displayValue>Reports</displayValue>
               <tabid>259</tabid>
            </element>
            <element>
               <displayValue>TTT</displayValue>
               <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
         </selectedTabs>
      </userApplicationTab>
   </platform>
</root>
See also: REST API:Error Codes

Sample PUT Body

This is a sample for the PUT body.

Method
PUT
URI
https://localhost/networking/rest/user/applicationTabs
Response
<root>
   <platform>
      <userApplicationTab>
         <id>1</id>
         <selectedTabs>
            <element>
               <displayValue>Cases - cases</displayValue>
               <tabid>cases</tabid>
            </element>
            <element>
               <displayValue>Accounts</displayValue>
               <tabid>accounts</tabid>
            </element>
            <element>
               <displayValue>Contacts</displayValue>
               <tabid>contacts</tabid>
            </element>
            <element>
               <displayValue>Articles</displayValue>
               <tabid>articles</tabid>
            </element>
            <element>
               <displayValue>Twitter</displayValue>
               <tabid>twitter</tabid>
            </element>
            <element>
               <displayValue>Reports</displayValue>
               <tabid>259</tabid>
            </element>
            <element>
               <displayValue>TTT</displayValue>
               <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
         </selectedTabs>
      </userApplicationTab>
   </platform>
</root>
See also: REST API:Error Codes


GET for a Particular Application

Allows you to get the Application Tab for a particular application.

Method
GET
URI
https://{yourDomain}/networking/rest/delegation/<delegationId>
Response
<root>
   <platform>
      <message>
         <code>0</code>
         <description>Success</description>
      </message>
      <userApplicationTab>
         <hiddenTabs>
            <element>
               <displayValue>Tasks - tasks</displayValue>
               <tabid>tasks</tabid>
            </element>
            <element>
               <displayValue>testobj1</displayValue>
               <tabid>6e7d33f131954d05aeaf277b318ed3f6</tabid>
            </element>
         </hiddenTabs>
         <id>1</id>
         <selectedTabs>
            <element>
               <displayValue>Cases - cases</displayValue>
               <tabid>cases</tabid>
            </element>
            <element>
               <displayValue>Accounts</displayValue>
               <tabid>accounts</tabid>
            </element>
            <element>
               <displayValue>Contacts</displayValue>
               <tabid>contacts</tabid>
            </element>
            <element>
               <displayValue>Articles</displayValue>
               <tabid>articles</tabid>
            </element>
            <element>
               <displayValue>Twitter</displayValue>
               <tabid>twitter</tabid>
            </element>
            <element>
               <displayValue>Reports</displayValue>
               <tabid>259</tabid>
            </element>
            <element>
               <displayValue>AllFieldObject</displayValue>
               <tabid>5fdd703d561444239d97800a295f6f09</tabid>
            </element>
            <element>
               <displayValue>TTT</displayValue>
               <tabid>0354f7afd6de466ba28cff81c22b526c</tabid>
            </element>
         </selectedTabs>
      </userApplicationTab>
   </platform>
</root>
See also: REST API:Error Codes

Fields

Notes:
  • In this object, Boolean fields accept either 1/0 or TRUE/FALSE
  • Because there are so many fields, and so many of them can be empty, empty fields generally are not returned as part of user data. However, they can still be specified for an update.
  • Role list appears in the API output or considered as input only when the Switch Roles permission is enabled in company information.
  • Role ID value "-1" means ALL Roles.
Name Type Description Additional Information
Active Boolean Indicates if a delegation is active or inactive. TRUE means a delegation is active and FALSE means the delegatee is not shown in the list of delegatees during the run time Become Delegate action.
applicationId String The ID of an application
createdID Lookup This is the user ID bean User ID
dateCreated Date Date of delegation creation or resource creation
dateModified Date Date the delegation role is applied UTC Format
delegateAccessProfile Boolean Allows you to manage the delegation when set to TRUE.
delegatee String User receiving the delegation from a Principal User.
id String The ID for this record
modifiedId Lookup The ID of the record used for updating the resource User ID
principalUser String The user delegating the profile to a Delegate User
roleId String The particular role of the principal user which is delegated to the delegatee