Difference between revisions of "REST API/Considerations"

From AgileApps Support Wiki
imported>Aeric
 
imported>Aeric
Line 23: Line 23:


:* Field elements are optional in record updates. If a field is missing, existing data in that field is unaffected. If a field is present, but empty, any existing data in that field is deleted.
:* Field elements are optional in record updates. If a field is missing, existing data in that field is unaffected. If a field is present, but empty, any existing data in that field is deleted.
:* When the database value for a checkbox field is null, the REST API returns 0. (So the value is always <tt>1</tt> (checked) or <tt>0</tt> (unchecked), whether or not the field has been initialized.)
<noinclude>
<noinclude>
[[Category:REST API|11]]
[[Category:REST API|11]]
</noinclude>
</noinclude>

Revision as of 22:41, 12 August 2011

  • All the calls are granular, meaning that each of the REST API calls operate on a single entity
  • Each REST API call is treated as a single transaction
  • In most cases, APIs have a direct one-to-one mapping with the UI
  • Data input and output can be in either in XML or JSON format
  • It is necessary to login to the platform before making a REST API call (and logout afterwards)
  • All REST API calls execute within the context of the User that is logged in. As with all UI actions, this means that any subsequent REST API calls (to access levels, data visibility, team membership, etc.), are governed by the Role Based Access Permissions granted to the User.
  • REST API calls are broadly categorized as Data API or Metadata API (excluding login/logout)
  • Data calls can span multiple objects, for example, the owner field in an object, or Lookups (foreign key relationships) to some other objects
  • The REST API implements the database CRUD model (Create, Read/Select, Update, Delete) using HTTP protocol requests(GET, POST, UPDATE and DELETE).
CRUD Action HTTP Method
Create POST
Read/Select GET
Update PUT
Delete DELETE
  • Field elements are optional in record updates. If a field is missing, existing data in that field is unaffected. If a field is present, but empty, any existing data in that field is deleted.
  • When the database value for a checkbox field is null, the REST API returns 0. (So the value is always 1 (checked) or 0 (unchecked), whether or not the field has been initialized.)