Web API Routes

In this topic Hide

About this page

This page displays details about an RME Web API route that was selected on the Documentation page, and lists the fields available in a grid. You can click field links for specific field details.

To scroll through other routes from this page, click the Previous or Next buttons at the top.

Menu path: RME > System > Documentation > Web API Routes tab

 

Web API route details

For the selected Web API route, fields at the top display the same details that are shown in the grid on the Documentation page, with the addition of the Page Name that corresponds to the Page ID. This helps you to identify where the data will be sourced or populated.

 

Fields tab

The grid on the Fields tab for a selected Web API route contains the following information:

Column

(in alphabetical order)

Description

API Reference

eCode reference the field is linked to, usually for a dropdown field, or primary key reference

Example: For the Country field, the API Reference is CategoryGroup({group_id})/Category({id})

Category Group

If the field is linked to an eCode reference, usually for a dropdown field, the eCode of the category group

Example: For the Country field, the eCode is COUNTRY; the dropdown lists countries for selection

Categories are listed and managed in RME > Setup > Categories. Editing is limited for some system categories.

Data Type

Format of the field that defines the type of response expected for that field, from the following options:

 

Data Type

Description

Examples

Boolean

Value that is either Yes (True) or No (False)

JSON: "Current": true

XML: <Current>true</Current>

ECodeReference

See eCodeReferences below

 

KeyValuePair

Custom field value

 

Nullable Boolean

Value that is either Yes (True) or No (False), nullable

 

Nullable DateTime

Date and time value

Range: between midnight on the 1st January 0001 and just before midnight on December 31, 9999, nullable

JSON: "Start_Date": "2014-12-11",

"Modified_DateTime": "2014-12-11T03:59:24.875",

XML: <Start_Date>2013-12-11</Start_Date>

<Modified_DateTime>2013-12-11T03:59:24.875</Modified_DateTime>

Nullable Decimal

Signed numerical value that allows decimal fractions to be included, nullable

JSON: "Cost": 23.99

XML: <Cost>23.99</Cost>

Nullable Int16

16-bit signed numerical integer in the range of -32,768 <= x <= 32,767, nullable

JSON: "Collection_Year": 2013

XML:<Collection_Year>2013</Collection_Year>

Nullable Int32

32-bit signed numerical integer in the range of -2,147,483,648 <= x <= 2,147,483,647, nullable

JSON: "No_Of_Pages": 468

XML: <No_Of_Pages>468</No_Of_Pages>

Nullable Int64

64-bit signed numerical integer in the range of

-9,223,372,036,854,775,808 <= x <= 9,223,372,036,854,775,807, nullable

JSON: "Unique_ID": 2345578964

XML: <Unique_ID>2345578964</Unique_ID>

String

Sequence of characters with a defined length; text data

See: String references

JSON: "First_Name": "John"

XML: <First_Name>John</First_Name>

 

 

Description

What the field is used for

Field Name

Label for the field as displayed in the RME page or eForm element

Is Read Only?

Whether the field is read only and cannot be edited

Is Required?

Whether a value for the field is mandatory for the database

Note that Access Type field property customisation in Page Views only impacts the front-end user interface; the API Web Routes > Is Required? flag does not change to match. Data received via an API can be populated and saved in RME regardless of whether the Page View Access Type property and the API Is Required? flag match.

Max Length

Total number of characters that can be inserted into the field

 

Export field grid details

To export the Fields grid details, click Export at the top, right of the grid.

 

Field details

To see all the details for a particular field, click the Open icon next to it in the grid. Details display in a popup. In addition to fields included in the Fields grid (in the table above), this level includes Page Field and Page Field Description fields for mapping. These identify the fields used to source or populate data.

For example, for Person Type, the Type field value may be sourced from either Student Types STU019 or Person Types PEP019 depending on the context.

To scroll through other fields for the selected route while remaining in this level, click the Previous or Next buttons in the popup.

 

eCodeReferences

Some resources have a property called “ECode” that is a character string code. This is typically a code used by external systems to easily identify a resource rather than by knowing its unique numerical identifier that is internally system-dependent.

An ECodeReference type is a construct that has the following two properties:

        ID: the String reference for the referenced resource

        ECode: the external code used to identify the resource

When providing data in a request and if only the ECode value is provided, the RME Web API will automatically try and resolve the ID and set the value. If the ECode is unable to be resolved, however, an error will be returned indicating that the ID property must be provided.

Examples:

JSON:

"Place_Published": {

"ID": "CategoryGroup(34)/Category(184)",

     "ECode": "AU"

}

XML:

<Place_Published>

<ID>CategoryGroup(34)/Category(184)</ID>

<ECode>AU</ECode>

</Country_Published>

 

String references

A string reference type must conform to a specific format for the value that indicates which resource it is referring to. This format happens to correspond to the same format as the section after the api/ in the URL used to reference the object.

Therefore, if a particular resource was located at: http://{server_name}/{virtual_directory}/api/{resource}({id})

The format of the value to set the String reference property to would be: {resource}({id})

Examples:

JSON: ResearchOutput: "ResearchOutput(37)"

XML: <ResearchOutput>ResearchOutput(37)</ResearchOutput>

 

Product Key: Modules - Core

Page ID: DOC002.htm