Difference between revisions of "REST API:application Resource"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - '<tt><nowiki>https://{domain}/networking' to '<tt>{{platformURL}}')
 
(7 intermediate revisions by one other user not shown)
Line 2: Line 2:


:''Learn more:'' REST API [[REST API#Conventions and Considerations|Conventions and Considerations]].
:''Learn more:'' REST API [[REST API#Conventions and Considerations|Conventions and Considerations]].
{{warn|This resource is '''''provisional'''''.}}


===List Available Applications ===
===List Available Applications ===
Return a list of applications, with a link for each.
Return a list of applications with a link for each.


;Method:GET
;Method:GET
   
   
;URI:<tt>{{platformURL}}/rest/application</nowiki></tt>  
;URI:<tt>{{platformURL}}/rest/application</tt>  


;Response:
;Response:
Line 16: Line 14:
<platform>
<platform>
     <application
     <application
         uri="https://{domain}/networking/rest/application/{app_id}"
         uri="https://{{domain}}/networking/rest/application/{app_id}"
         displayValue="Campaign Manager">{application_id}</application>
         displayValue="Campaign Manager">{application_id}</application>
     <application  
     <application  
         uri="https://{domain}/networking/rest/application/app_id"  
         uri="https://{{domain}}/networking/rest/application/app_id"  
         displayValue="OfficeSpace">{app_id}</application>
         displayValue="OfficeSpace">{app_id}</application>
     <application  
     <application  
         uri="https://{domain}/networking/rest/application/{app_id}"  
         uri="https://{{domain}}/networking/rest/application/{app_id}"  
         displayValue="Sales Force Automation">{app_id}</application>
         displayValue="Sales Force Automation">{app_id}</application>
     <application  
     <application  
         uri="https://{domain}/networking/rest/application/{app_id}"  
         uri="https://{{domain}}/networking/rest/application/{app_id}"  
         displayValue="Support Case Manager">{app_id}</application>
         displayValue="Support Case Manager">{app_id}</application>


Line 54: Line 52:
;Method:GET
;Method:GET
   
   
;URI:<tt>{{platformURL}}/rest/application/{app_id}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/application/{app_id}</tt>


;Response:
;Response:
Line 63: Line 61:
     <id>1555611998otb488826636</id>
     <id>1555611998otb488826636</id>
     <title>Support Case Manager</title>
     <title>Support Case Manager</title>
    <caseObjectId>cases</caseObjectId>
     ...
     ...
     <tabs>     
     <tabs>     
         <id type=""  
         <id type=""  
           uri="https://{domain}/networking/rest/objectconfiguration/case"  
           uri="https://{{domain}}/networking/rest/objectconfiguration/case"  
           displayValue="Cases">{component_id}</id>
           displayValue="Cases">{component_id}</id>
         <title>Cases</title>
         <title>Cases</title>
Line 77: Line 76:
     <tabs>
     <tabs>
         <id type=""  
         <id type=""  
           uri="https://{domain}/networking/rest/objectconfiguration/dashboard"
           uri="https://{{domain}}/networking/rest/objectconfiguration/dashboard"
           displayValue="Home">dashboard</id>
           displayValue="Home">dashboard</id>
         <title>Home</title>
         <title>Home</title>
Line 88: Line 87:
     <containers>
     <containers>
         <id type=""  
         <id type=""  
             uri="https://{domain}/networking/rest/container/{container_id}"  
             uri="https://{{domain}}/networking/rest/container/{container_id}"  
             displayValue="">{container_id}</id>
             displayValue="">{container_id}</id>
         <column>0</column>
         <column>0</column>
Line 126: Line 125:


:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]
;Application Fields:
:{| border="1" cellpadding="5" cellspacing="0"
! Name !! Type !! Description !! Additional Information
|-
| id || String || Application ID ||
|-
| title || String || Title of the application displayed in the page header ||
|-
| caseObjectId || String || ID of the root object for a case-management application. ||
* "cases" for [[ServiceDesk]]
* ID of the root object for other [[DCM apps]]
* Empty for a [[Database Application]]
|}


;Tab Fields:
;Tab Fields:
Line 167: Line 180:
;Method:GET
;Method:GET
   
   
;URI:<tt>{{platformURL}}/rest/objectconfiguration/{component_id}</nowiki></tt>  
;URI:<tt>{{platformURL}}/rest/objectconfiguration/{component_id}</tt>  


;Response:
;Response:
Line 180: Line 193:
         <views>                    <!-- One for each available view -->
         <views>                    <!-- One for each available view -->
             <id type=""  
             <id type=""  
                 uri="https://{domain}/networking/rest/record/view/{view_id}"  
                 uri="https://{{domain}}/networking/rest/record/view/{view_id}"  
                 displayValue="All Cases">{view_id}</id>
                 displayValue="All Cases">{view_id}</id>
             <canCreate>false</canCreate>
             <canCreate>false</canCreate>
Line 229: Line 242:


;Method:GET
;Method:GET
{{TBD|Not currently working}}
 
;URI:<tt>{{platformURL}}/rest/record/view/{view_id}</nowiki></tt>
;URI:<tt>{{platformURL}}/rest/record/view/{view_id}</tt>


;Response:
;Response:

Latest revision as of 09:07, 27 June 2024

Access applications and their views using the REST API.

Learn more: REST API Conventions and Considerations.

List Available Applications

Return a list of applications with a link for each.

Method
GET
URI
https://{yourDomain}/networking/rest/application
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <application
       uri="https://{yourDomain}/networking/rest/application/{app_id}"
       displayValue="Campaign Manager">{application_id}</application>
   <application 
       uri="https://{yourDomain}/networking/rest/application/app_id" 
       displayValue="OfficeSpace">{app_id}</application>
   <application 
       uri="https://{yourDomain}/networking/rest/application/{app_id}" 
       displayValue="Sales Force Automation">{app_id}</application>
   <application 
       uri="https://{yourDomain}/networking/rest/application/{app_id}" 
       displayValue="Support Case Manager">{app_id}</application>
   <message>
     0
     <description>Success</description>
   </message>
   <recordCount>4</recordCount>   

</platform> </syntaxhighlight>

See also: REST API:Error Codes
Fields
Name Type Description Additional Information
application String application identifier
uri attribute A link to the application Use the link in a browser to go to the application
displayValue attribute Name displayed in the GUI

List an Application's Display Components

Get a list of tab components and widget containers for the application. Each component has a link to an objectconfiguration resource for that component.

Method
GET
URI
https://{yourDomain}/networking/rest/application/{app_id}
Response
Here's part of the response you get when querying the Support Case Manager application:
<syntaxhighlight lang="xml" enclose="div">

<platform>

 <application>
   <id>1555611998otb488826636</id>
   <title>Support Case Manager</title>
   <caseObjectId>cases</caseObjectId>
    ...
   <tabs>    
       <id type="" 
         uri="https://{yourDomain}/networking/rest/objectconfiguration/case" 
         displayValue="Cases">{component_id}</id>
       <title>Cases</title>
       <type>object</type>
       <subtype/>
       <displayStyle/>
       <closable>true</closable>
   </tabs>
     ...
   <tabs>
       <id type="" 
         uri="https://{yourDomain}/networking/rest/objectconfiguration/dashboard"
         displayValue="Home">dashboard</id>
       <title>Home</title>
       <type>dashboard</type>
       <subtype/>
       <displayStyle>inline</displayStyle>
       <closable>true</closable>
   </tabs>
   ...
   <containers>
       <id type="" 
           uri="https://{yourDomain}/networking/rest/container/{container_id}" 
           displayValue="">{container_id}</id>
       <column>0</column>
       <collapsed>true</collapsed>
       <showTitle>false</showTitle>
       <showBorder>false</showBorder>
       <width>200</width>
       <height>0</height>
       <widgets>
           <id type="URL" 
               uri="http://www.linkedin.com/companyInsider?data&companyName=..."
               displayValue=""/>
           <title>LinkedIn Widget</title>
           <collapsed>false</collapsed>
           <showTitle>true</showTitle>
           <showBorder>false</showBorder>
           <height>0</height>
           <displayStyle>iframe</displayStyle>
           <rowNumber>0</rowNumber>
           <colNumber>0</colNumber>
       </widgets>
       <orientation>left</orientation>
       <canUpdate>false</canUpdate>
       <canDelete>false</canDelete>
       <canCreate>false</canCreate>
   </containers>
    ...
 </application>
 
 <message>
     0
     <description>Success</description>
 </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes
Application Fields
Name Type Description Additional Information
id String Application ID
title String Title of the application displayed in the page header
caseObjectId String ID of the root object for a case-management application.
Tab Fields
Name Type Description Additional Information
id String Component identifier
uri attribute Component link Use the link to get the views available in a tab component, or the widgets displayed in a dashboard component
displayValue attribute The text displayed on the tab
Container Fields
Name Type Description Additional Information
id String Component identifier
uri attribute Component link The link accesses the same information that is visible here.
displayValue attribute Container title Typically empty
Widget Fields
Name Type Description Additional Information
tag String description
URI attribute Widget link
title String Widget name

List Views and Configuration Information for a Component

Get a list of available views and other information for a component (display object):

  • For a dashboard, the list of widgets displayed on the page is returned.
  • For other tabs, the list of available views is returned.
Method
GET
URI
https://{yourDomain}/networking/rest/objectconfiguration/{component_id}
Response
Here's part of the information returned when querying the "cases" component from the listing above:
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <objectDisplayConfiguration>
       <objectId>CASE</objectId>
       <viewId>CASE</viewId>
       <style>panel</style>
       <views>                    
           <id type="" 
               uri="https://{yourDomain}/networking/rest/record/view/{view_id}" 
               displayValue="All Cases">{view_id}</id>
           <canCreate>false</canCreate>
           <canUpdate>false</canUpdate>
           <canDelete>true</canDelete>
           <default>false</default>
           <viewCategoryName>Standard Views</viewCategoryName>
       </views>
    ...
    
       <actions>                  
           <title>New Case</title>
           <name>new_record</name>
           <isEnabled>true</isEnabled>
           <isGroupAction>false</isGroupAction>
           <isRecordAction>false</isRecordAction>
           <isRecordsSelectionRequired>false</isRecordsSelectionRequired>
       </actions>
       <objectHelpURL>http://{help_server}/{version}/index.php?title=Objects
       </objectHelpURL>
   </objectDisplayConfiguration>
   <message>
       0
       <description>Success</description>
   </message>    

</platform> </syntaxhighlight>

See also: REST API:Error Codes
View Fields
Name Type Description Additional Information
id String View identifier
uri attribute View link Use the link to get the list of records displayed in the view
displayValue attribute View title

List Records Displayed in a View

For a home page widget, get the information displayed in the widget.

For a list view, get the records displayed in the view. The record identifier can then be used to get the record using the REST record Resource.

Method
GET
URI
https://{yourDomain}/networking/rest/record/view/{view_id}
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <__resourceName__>
       <id>...</id>
       <field>data</field>
        ...
   </__resourceName__>
   <__resourceName__>
        ...
   </__resourceName__>
    ...
   <message>
       0
       <description>Success</description>
   </message>
   <recordCount>N</recordCount>      

</platform> </syntaxhighlight>

See also: REST API:Error Codes
Fields
Name Type Description Additional Information
tag String description AddlInfo
attr attribute description AddlInfo