REST API:object Resource

REST API:object Resource

From LongJump Support Wiki

REST API:object Resource
Jump to: navigation, search

The object resource lets you access and modify object metadata (the data that defines object types).

File:warn.png

Warning: Information on this page is Provisional.

Contents

Retrieve an Object

Identifies and retrieves metadata for the specified object.

Access Permissions

File:Lock-tiny.gif

Users that have the Customize Objects permission can manage Objects 
Method
GET
URI
https://na.longjump.com/networking/rest/object/{objectName}
Response
Metadata structure of the Object identified by the Object Type Identifier

Retrieve all Objects

Retrieve all Objects

Method
GET
URI
https://na.longjump.com/networking/rest/object
Query Parameters
  • appId - Retrieve object metadata for the specified application, only.
Example: https://yourDomain/rest/object?appId=28473662nkry99az
To get an application ID:
  1. Click [My Applications]
    A list of applications is displayed.
  2. Launch the application of interest
  3. Get the ID from the end of the URL: ...&app_id=28473662nkry99az
For more information, see: Specifying Query Parameters in REST APIs
Response
Metadata structure of the Object identified by the Object Type Identifier

Add an Object

Adds an object.

Considerations
  • Object names:
  • Must start with an alphabetic character.
  • May contain only alphanumeric (a-z A-Z 0-9) and underscores (_).
  • May not contain spaces or other characters.
  • Must be 32 characters or less.
  • When objects are added using REST APIs, they do not have a corresponding data-entry Form that would allow them to be accessed and updated in the GUI. Such forms must be defined using the GUI.
Method
POST
URI
https://na.longjump.com/networking/rest/object
Request
<platform>
    <object>
        <objectName>AddObjectViaREST</objectName>
        <displayTitle>AddObjectViaRESTApi</displayTitle>
        <singluarDisplayTitle>AddObjectViaRESTApi</singluarDisplayTitle>
        <canTrackActivities>true</canTrackActivities>
        <canTrackNotes>true</canTrackNotes>
        <isActive>true</isActive>
        <isEnabledAsATab>true</isEnabledAsATab>
        <custHelpUrl>www.example.com</custHelpUrl>
        <allowReports>true</allowReports>
        <allowSearch>true</allowSearch>
        <extendedObjectMetaData>REST add</extendedObjectMetaData>
        <description>Adding an Object through REST API</description>
    </object>
</platform>
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
        <id>34813dcd768740ad91dc4f168023a9cc</id>
    </message>
</platform>
See also: REST API:Error Codes

Update an Object

File:notepad.png

Note: When fields are added to an object using REST APIs, they do not appear in Object Forms. To appear there, they must be specified using the GUI.

Method
PUT
URI
https://na.longjump.com/networking/rest/object/{objectName}
Request
<platform>
    <object>
        <objectName>AddObjectViaREST</objectName>
        <displayTitle>AddObjectViaRESTApi</displayTitle>
        <singluarDisplayTitle>AddObjectViaRESTApi</singluarDisplayTitle>
        <canTrackActivities>true</canTrackActivities>
        <canTrackNotes>true</canTrackNotes>
        <isActive>true</isActive>
        <isEnabledAsATab>true</isEnabledAsATab>
        <custHelpUrl>www.example.com</custHelpUrl>
        <allowReports>true</allowReports>
        <allowSearch>true</allowSearch>
        <extendedObjectMetaData>Updating a  Object through REST API</extendedObjectMetaData>
        <description>Updating a  Object through REST API</description>
    </object>
</platform>
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<platform>
    <message>
        <code>0</code>
        <description>Success</description>
    </message>
</platform>
See also: REST API:Error Codes

Delete an Object

Deletes an object and the metadata that defines it.

Method
DELETE
URI
https://na.longjump.com/networking/rest/object/{objectName}
Response
<platform>
    <message>
        <code>0</code>
        <description>Success</description>        
    </message>
</platform>
See also: REST API:Error Codes

Fields

Note: In this object, Boolean fields accept only 1 or 0 (not TRUE/FALSE).

NameTypeAttributesRequired During AddDescriptionAdditional Information
objectNameStringEditable on Add/UpdateObject name
displayTitleStringEditable on Add/UpdateDisplay title
singluarDisplayTitleStringEditable on Add/UpdateDisplay title - Singular form
canTrackActivitiesBooleanEditable on Add/UpdateFlag to track activities
canTrackNotesBooleanEditable on Add/UpdateFlag to track notes and attachments
isActiveBooleanEditable on Add/UpdateFlag to set object as active/inactive
isEnabledAsATabBooleanEditable on Add/UpdateFlag to enable object as a tab in the UI
custHelpUrlStringEditable on Add/UpdateCustom help URL
allowReportsBooleanEditable on Add/UpdateFlag to allow reporting on object
allowSearchBooleanEditable on Add/UpdateFlag to allow searching of object
extendedObjectMetaDataStringEditable on Add/UpdateObject metadata
descriptionStringEditable on Add/UpdateObject description
Personal tools