REST API:index Resource
From AgileApps Support Wiki
Revision as of 20:26, 15 February 2012 by imported>Aeric
Manage __resourceName__ (record)s using the REST API.
- Learn more: REST API Conventions and Considerations.
Requirements
- Requirement #1
- Requirement #2
Permissions
__TBD: Are the permission(s) right?__ -- check Administrative Permissions for a list of possibilities
- Develop Tools permission must be enabled for the tenant.
Users that have the Access Control/User Management permission can use this resource.
Users that have the Manage Develop Features permission can use this resource.
List All __resourceName__ (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/__resourceName__
- Return all fields
- URI
- https://{domain}/networking/rest/__resourceName__?{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>
<__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
Get a __resourceName__ Record
- Method
- GET
- URI
- https://{domain}/networking/rest/__resourceName__/{recordId}
- Return all fields
- URI
- https://{domain}/networking/rest/__resourceName__/{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>
<__resourceName__> <id>...</id> <field>data</field> ... </__resourceName__>
<message>
0
<description>Success</description>
</message>
</platform> </syntaxhighlight>
- See also: REST API:Error Codes
Add a __resourceName__ Record
- Method
- POST
- URI
- https://{domain}/networking/rest/__resourceName__
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<__resourceName__> <field>data</field> ... </__resourceName__>
</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 __resourceName__ Record
- Method
- PUT
- URI
- https://{domain}/networking/rest/__resourceName__/{recordId}
- Request
- <syntaxhighlight lang="xml" enclose="div">
<platform>
<__resourceName__> <id>{recordId}</id> ... </__resourceName__>
</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 __resourceName__ Record
- Method
- DELETE
- URI
- https://{domain}/networking/rest/__resourceName__/{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 description String ... ... ... ... ... ... tag String Read Only description AddlInfo tag String description AddlInfo tag String description AddlInfo tag String Writable on Add only 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