AgileApps Support Wiki Pre Release

Difference between revisions of "REST API:index Resource"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
Manage __resourceName__ (record)s using the [[REST API]].
Manage index metadata for an Object using the [[REST API]].


:''Learn more:'' REST API [[REST API#Conventions and Considerations|Conventions and Considerations]].
:''Learn more:'' REST API [[REST API#Conventions and Considerations|Conventions and Considerations]].
===Requirements===
:* Requirement #1
:* Requirement #2


===Permissions===
===Permissions===
Line 13: Line 9:
{{permissions|Manage Develop Features|use this resource.}}
{{permissions|Manage Develop Features|use this resource.}}


===List All __resourceName__ (Record)s===
===List All index (Record)s===
("Get" if complete records are returned. "List" if partial data is returned, requiring a second read to get a complete set of data. This comes before the GET, because typically it's called first to get the ID used in a specific-record GET.)
("Get" if complete records are returned. "List" if partial data is returned, requiring a second read to get a complete set of data. This comes before the GET, because typically it's called first to get the ID used in a specific-record GET.)


;Method:GET
;Method:GET
   
   
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__</nowiki></tt>  
;URI:<tt><nowiki>https://{domain}/networking/rest/index</nowiki></tt>  
:Return all fields
:Return all fields
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__?{query_parameters}</nowiki></tt>  
;URI:<tt><nowiki>https://{domain}/networking/rest/index?{query_parameters}</nowiki></tt>  


{{Query Parameters|
{{Query Parameters|
Line 32: Line 28:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <__resourceName__>
     <index>
         <id>...</id>
         <id>...</id>
         <field>data</field>
         <field>data</field>
         ...
         ...
     </__resourceName__>
     </index>


     <__resourceName__>
     <index>
         ...
         ...
     </__resourceName__>
     </index>


     ...
     ...
Line 54: Line 50:
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Get a __resourceName__ Record===
===Get a index Record===
;Method:GET
;Method:GET
   
   
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__/{recordId}</nowiki></tt>
;URI:<tt><nowiki>https://{domain}/networking/rest/index/{recordId}</nowiki></tt>
:Return all fields
:Return all fields
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__/{recordId}?{query_parameters}</nowiki></tt>  
;URI:<tt><nowiki>https://{domain}/networking/rest/index/{recordId}?{query_parameters}</nowiki></tt>  
{{Query Parameters|
{{Query Parameters|
:Introductory sentence, if any
:Introductory sentence, if any
Line 70: Line 66:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <__resourceName__>
     <index>
         <id>...</id>
         <id>...</id>
         <field>data</field>
         <field>data</field>
         ...
         ...
     </__resourceName__>
     </index>


     <message>
     <message>
Line 85: Line 81:
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Add a __resourceName__ Record===
===Add a index Record===


;Method:POST
;Method:POST
   
   
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__</nowiki></tt>  
;URI:<tt><nowiki>https://{domain}/networking/rest/index</nowiki></tt>  


;Request:
;Request:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <__resourceName__>
     <index>
         <field>data</field>
         <field>data</field>
         ...
         ...
     </__resourceName__>
     </index>
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
Line 107: Line 103:
         <code>0</code>
         <code>0</code>
         <description>Success</description>
         <description>Success</description>
         <id>...</id>  <!-- ID of the newly created __resourceName__ -->
         <id>...</id>  <!-- ID of the newly created index -->
     </message>
     </message>
</platform>
</platform>
Line 114: Line 110:
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Update a __resourceName__ Record===
===Update a index Record===
;Method:PUT
;Method:PUT
   
   
;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__/{recordId}</nowiki></tt>  
;URI:<tt><nowiki>https://{domain}/networking/rest/index/{recordId}</nowiki></tt>  


;Request:
;Request:
:<syntaxhighlight lang="xml" enclose="div">
:<syntaxhighlight lang="xml" enclose="div">
<platform>
<platform>
     <__resourceName__>
     <index>
         <id>{recordId}</id>
         <id>{recordId}</id>
         ...
         ...
     </__resourceName__>
     </index>
</platform>
</platform>
</syntaxhighlight>
</syntaxhighlight>
Line 141: Line 137:
:See also: [[REST API:Error Codes]]
:See also: [[REST API:Error Codes]]


===Delete a __resourceName__ Record ===
===Delete a index Record ===


;Method:DELETE
;Method:DELETE


;URI:<tt><nowiki>https://{domain}/networking/rest/__resourceName__/{recordId}</nowiki></tt>
;URI:<tt><nowiki>https://{domain}/networking/rest/index/{recordId}</nowiki></tt>


;Response:
;Response:

Revision as of 20:27, 15 February 2012

Manage index metadata for an Object using the REST API.

Learn more: REST API Conventions and Considerations.

Permissions

__TBD: Are the permission(s) right?__ -- check Administrative Permissions for a list of possibilities

Lock-tiny.gif

Users that have the Access Control/User Management permission can use this resource. 

Lock-tiny.gif

Users that have the Manage Develop Features permission can use this resource. 

List All index (Record)s

("Get" if complete records are returned. "List" if partial data is returned, requiring a second read to get a complete set of data. This comes before the GET, because typically it's called first to get the ID used in a specific-record GET.)

Method
GET
URI
https://{domain}/networking/rest/index
Return all fields
URI
https://{domain}/networking/rest/index?{query_parameters}
Query Parameters
Introductory sentence, if any
  • parameter1 - Description
  • parameter2
  • If TRUE, ...
  • If FALSE, ...
For more information, see: Specifying Query Parameters in REST APIs
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

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

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Get a index Record

Method
GET
URI
https://{domain}/networking/rest/index/{recordId}
Return all fields
URI
https://{domain}/networking/rest/index/{recordId}?{query_parameters}
Query Parameters
Introductory sentence, if any
  • parameter1 - Description
  • parameter2
  • If true, ...
  • If false, ... (default)
For more information, see: Specifying Query Parameters in REST APIs
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <index>
       <id>...</id>
       <field>data</field>
        ...
   </index>
   <message>
       0
       <description>Success</description>
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Add a index Record

Method
POST
URI
https://{domain}/networking/rest/index
Request
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <index>
       <field>data</field>
        ...
   </index>

</platform> </syntaxhighlight>

Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>
       <id>...</id>   
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Update a index Record

Method
PUT
URI
https://{domain}/networking/rest/index/{recordId}
Request
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <index>
       <id>{recordId}</id>
        ...
   </index>

</platform> </syntaxhighlight>

Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Delete a index Record

Method
DELETE
URI
https://{domain}/networking/rest/index/{recordId}
Response
<syntaxhighlight lang="xml" enclose="div">

<platform>

   <message>
       0
       <description>Success</description>
   </message>

</platform> </syntaxhighlight>

See also: REST API:Error Codes

Fields

Note: Unless otherwise indicated, the attribute for a field is "Editable on Add or Update".
Name Type Attribute Required on Add Description Additional Information
id String Read Only Record Id
name String Checkmark.gif
description String
... ... ... ... ... ...
tag String Read Only description AddlInfo
tag String description AddlInfo
tag String Checkmark.gif description AddlInfo
tag String Writable on Add only Checkmark.gif description AddlInfo
... ... ... ... ... ...
... ... ... ... ... ...
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