REST API V2.0

From LongJump Support Wiki

REST API V2.0
Jump to: navigation, search

The REST API V2.0 is an HTTP interface between the LongJump Platform and third-party applications. With the REST API, XML messages can be exchanged over HTTP to integrate enterprise applications with the platform. The REST API exposes objects, files, actions and transactions for integration with external (third-party) enterprise applications.

For information on earlier versions of the LongJump Platform REST API, see REST API V1.0.


REST Resources

The following Resources are available:

Administration Resources
loginPerforms a Login action
logoutPerforms a Logout action
companyInfoAccess Company Information
passwordPolicyAccess Password Policy
userAccess User Records
teamAccess Team Records
roleAccess Role Records
userTeamAccess User Team Records
Data Management Resources
recordAccess a Record in an Object
bulkPerforms a mass data import
workflowActionRetrieves the metadata of a Workflow action
Customize Resources
objectAccess Object metadata, including System-Generated Objects
fieldRetrieves Field metadata
formRetrieves the metadata of a Form Layout
viewPresents a View (a list of selected records in an object); All of the APIs related to a view operate on the metadata of the view
Develop Resources
repositoryRepresents the metadata of Metadata Repository settings and provides an interface to invoke the Read from Repository and Write to Repository actions
classAccess a Class; a Class must be defined in order to use this exec resource
Service Provider Resources
licenseRetrieve Platform License Information
tenantAccess a Tenant


Community Resources
communityActions related to Community Tenancy

Considerations

  • 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 direct one-to-one mapping with the UI
  • Data I/O for the REST API can be in multiple formats
  • 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
REST API calls can be mapped to simple CRUD operations in databases (excluding login/logout)
  • CRUD and HTTP Methods: For developers familiar with the CRUD model (Create, Read/Select, Update, Delete) for database functionality, the REST API uses HTTP protocol request methods (GET, POST, UPDATE and DELETE).
CRUD Action HTTP Method
CreatePOST
Read/SelectGET
UpdatePUT
DeleteDELETE

Conventions

The following conventions apply:

  • All GET methods can accept arguments through queryStrings
  • All POST/PUT methods can accept arguments through JSON and XML
  • REST API calls require an Object Identifier or a Record Identifier in the URI and/or XML
  • In the URI, the following conventions are used:
{object} - represents any Object or System-Generated Object
{objectId} - represents an an Object Identifier in a System-Generated Object
{objectName} - represents an an Object Identifier in an Object
{recordId} - that represents a Record
{viewId} - represents a view identifier
{mode} - represents the type of action, and can be any of: add, update, edit or view
{sessionId} - represents a Session Identifier, which is required for all API calls (except Login)
{domainname} - represents the Service Domain, specified in Service Provider Settings
?alt=xml or ?alt=json - data interchange format, specify values: JSON or XML
  • All methods return standard HTTP Codes
  • For example 404 not found, if an incorrect URL was used to obtain a resource or if there was error on the server, either because of the user input or due to some failure on the server side
  • Error Messages
In addition to the standard HTTP return code, response from the server for any method (GET/POST/PUT/DELETE) is accompanied by a message section, which contains:
code
Integer; success or failure code
  • A Return value of 0 means a successful call
  • Any negative value (<0) indicates an error
description
String; detailed information
  • For POST requests, a resourceId is created, which can be a positive integer or a GUID, depending upon the type of resource created
Personal tools
Categories