Uploaded by John Nickle

Mongoose REST Web Service

advertisement
Mongoose REST Web Service
REST Service APIs
This document supplies the methodology and API definitions for the new Mongoose REST web service.
The root url is: http://servername/IDORequestService/MGRestService.svc/rest
*Each API call allows the option of xml or json data. The url contains the format type requested. Each url
example given uses xml as the format. For JSON, simply replace the “xml” designator with “json”, so
http://localhost/IDORequestService/MGRestService.svc/rest/xml/Usernames/Username,UserId,UserDesc
Becomes:
http://localhost/IDORequestService/MGRestService.svc/rest/json/Usernames/Username,UserId,UserDesc
Configurations
No user credentials are required. This call returns a list of configurations available on the Mongoose web
server.
/xml/configurations
Example:
http://localhost:39719/MGRestService.svc/rest/xml/configurations
1
XML Response
<ArrayOfstring xmlns="http://schemas.microsoft.com/2003/10/Serialization/Arrays"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<string>MG80Local</string>
<string>SL8.04_OH_Prod</string>
<string>IT_701</string>
<string>IssueTracking80</string>
<string>SL8.03.00_OH</string>
<string>MG9Local</string>
<string>QA-9007</string>
<string>Core900_Dev</string>
</ArrayOfstring>
JSON Response
["MG80Local","SL8.04_OH","IT_701","MSF_Dev","MTM_V2","Core901_Dev","MTM901","MG902"]
GetSecurityToken
User credentials are passed through the HTTP headers.
First get a security token. Use the following API, passing the user id and password through HTTP headers of those
respective names, using the following url template:
/xml/token/{config}
Example: http://localhost/IDORequestService/MGRestService.svc/rest/xml/token/MG9Local
Note: This returns a security token, used for all other API calls. All other calls require the Authorization HTTP
header to contain this security token string.
2
XML Response
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/"> b/XdI6IQzCviZ. . .
UD6/
</string>
JSON Response
"b\/XdI6IQzCviZOGJ0E. . . LUD6\/"
GetIdoData (Basic)
A simplified API call is provided, which has no advanced parameters such as filtering or row cap. It returns the
top 50 read-only rows of the IDO.
Template: /xml/{ido}/{props}
Example: http://localhost/IDORequestService/MGRestService.svc/rest/xml/Usernames/Username,UserId,UserDesc
Url Parts
Ido
IDO name
props
IDO property list (comma-delimited)
XML Response
<MGRestResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Items>
<item>
<p>sa</p>
<p>5</p>
<p />
</item>
<item>
<p>service</p>
3
<p>6</p>
<p />
</item>
<item>
<p>mbair1</p>
<p>7</p>
<p>Matt Bair</p>
</item>
<item>
<p>XML2</p>
<p>39</p>
<p>user description</p>
</item>
<item>
<p>test1</p>
<p>60</p>
<p />
</item>
</Items>
<Message i:nil="true" />
<MessageCode>0</MessageCode>
</MGRestResponse>
JSON Response
{
"Items":
[
["sa","5",""],
["service","6",""],
["mbair1","7","Matt Bair"],
["XML2","39", "user description"],
["test1","60",""],
],
"Message":null,
"MessageCode":0
}
4
GetIdoData (Advanced)
An advanced API call allows the user to designate one or more of the query parameters.
Template: /json/{ido}/{props}/adv/?filter={filter}&orderby={orderby}&rowcap={recordcap}
&distinct={distinct}&customloadmethod={clm}&customloadmethodparms={clmparms}&loadtype={loadtype}bookmar
k={bookmark}&postquerycommand={pqc}&readonly={ro}
Url Parts
Ido
IDO name
props
IDO property list (comma-delimited)
Url Parameters
Parameter
Description
filter
SQL filter string;
Use syntax:
description LIKE '%panel%'
orderby
Sets the SQL ORDER BY value
rowcap
Sets row cap amount.
0 = default cap set in Mongoose server
-1 = unlimited
distinct
SQL DISTINCT keyword. Values: true|false
customloadmethod
Custom Load Method name
customloadmethodparms
Custom Load method parameters, separated by
commas
loadtype
Load type: values: FIRST|NEXT|PREVIOUS|LAST
Will select accordingly and return row cap amount
designated in url, or use default row cap.
bookmark
Designate bookmark id
postquerycommand
Post Query Command name
5
readonly
Read Only flag. Set to true for read only data (no
ItemId is returned with query, so no updating is
possible.)
Example:
http://localhost/IDORequestService/MGRestService.svc/rest/xml/Usernames/Username,UserId,UserDesc/adv/?filter=Username+=+'mb
air1'&orderby=UserId&rowcap=20&distinct=True
XML Response
<MGRestResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Items>
<item>
<p>mbair1</p>
<p>7</p>
<p>Matt Bair</p>
<p />
</item>
</Items>
<Message>Success</Message>
<MessageCode>0</MessageCode>
</MGRestResponse>
JSON Response
{"Items":[["mbair1","7","Matt Bair",""]],"Message":"Success","MessageCode":0}
ReadOnly option
Affixing a “readonly=true” parameter onto the request url will return the data without the itemID fields, which
are required for any updates or deletes.
http://localhost/MGRestService.svc/rest/json/MCB_DataTypesDemo/ID,Name,DecimalValue,DateValue/adv/?rowcap=50&distinct=Fals
e&readonly=true
6
Full Schema option
The following url template will return the data in XML format, with each element labeled according to the
property name, and with an embedded XSD schema in the response XML data.
http://localhost/MGRestService.svc/rest/schema/MCB_DataTypesDemo/ID,Name,DecimalValue,DateValue/adv/?rowcap=50&distinct=False
XML Response
<NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:MainDataTable="MCB_DataTypesDemo" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="MCB_DataTypesDemo">
<xs:complexType>
<xs:sequence>
<xs:element name="ID" msdata:Caption="sID" type="xs:int" />
<xs:element name="Name" msdata:Caption="sName" type="xs:string"
minOccurs="0" />
<xs:element name="DecimalValue" msdata:Caption="sDecimalMCB"
type="xs:decimal" minOccurs="0" />
<xs:element name="DateValue" msdata:Caption="sDateMCB" type="xs:dateTime"
minOccurs="0" />
<xs:element name="_ItemId" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<MCB_DataTypesDemo>
<ID>1</ID>
<Name>Leong</Name>
<DecimalValue>124</DecimalValue>
<_ItemId>PBT=[MCB_DataTypesDemo] mcb.ID=[1f6da13c-fcfe-4038-849d-34ed685d9763]
mcb.DT=[2014-06-03 14:04:59.267]</_ItemId>
</MCB_DataTypesDemo>
7
<MCB_DataTypesDemo>
<ID>2</ID>
<Name>Chang</Name>
<DecimalValue>1679000</DecimalValue>
<_ItemId>PBT=[MCB_DataTypesDemo] mcb.ID=[0d7ca8e0-8964-4aa7-a2e1-d3b79bc5cb2b]
mcb.DT=[2014-09-05 12:11:44.850]</_ItemId>
</MCB_DataTypesDemo>
<MCB_DataTypesDemo>
<ID>3</ID>
<Name>Lafayette</Name>
<_ItemId>PBT=[MCB_DataTypesDemo] mcb.ID=[04e9d71a-5cda-4f5a-a137-62d22d7069e6]
mcb.DT=[2013-12-06 15:31:36.580]</_ItemId>
</MCB_DataTypesDemo>
<MCB_DataTypesDemo>
<ID>55</ID>
<Name />
<DateValue>2014-03-12T00:00:00-04:00</DateValue>
<_ItemId>PBT=[MCB_DataTypesDemo] mcb.ID=[94e71508-4239-40a7-9f7d-b65fa60b1c8e]
mcb.DT=[2014-03-14 15:17:41.600]</_ItemId>
</MCB_DataTypesDemo>
</NewDataSet>
JSON Response
Not available
8
Property Info
Return IDO property metadata with this API.
Example:
http://localhost/IDORequestService/MGRestService.svc/rest/xml/idoinfo/Usernames
XML Response
<ArrayOfRestIdoItemPropInfo xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<RestIdoItemPropInfo>
<defaultValue />
<labelStringID />
<name>UserId</name>
<required>true</required>
<dataType>Decimal</dataType>
<length>11</length>
<readOnly>true</readOnly>
</RestIdoItemPropInfo>
<RestIdoItemPropInfo>
<defaultValue>getdate()</defaultValue>
<labelStringID />
<name>CreateDate</name>
<required>true</required>
<dataType>Date</dataType>
<length>0</length>
<readOnly>true</readOnly>
</RestIdoItemPropInfo>
...
<RestIdoItemPropInfo>
<defaultValue />
<labelStringID />
<name>UDFRowPointer</name>
<required>false</required>
9
<dataType>GUID</dataType>
<length>0</length>
<readOnly>true</readOnly>
</RestIdoItemPropInfo>
</ArrayOfRestIdoItemPropInfo>
JSON Response
Not available
InvokeMethod
The following url template is used to Invoke an IDO method. Pass the parameters as comma-separated
strings.
Template: /xml/method/{ido}/{method}/?parms={parms}
Example:
http://localhost/IDORequestService/MGRestService.svc/rest/xml/method/MCB_Opportunities/GetDayofWeekAndMonth/?parms=9/4/20
14,0,0,msg
Url Parts
ido
IDO name
method
IDO property list (comma-delimited)
Url Parameters
Parameter
Description
parms
Comma-delimited list of method parameter values
10
XML Response
<MGRestInvokeMethodResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message i:nil="true" />
<MessageCode>0</MessageCode>
<Parameters>
<p>9/4/2014</p>
<p>Thursday</p>
<p>September</p>
<p>success</p>
</Parameters>
<ReturnValue>0</ReturnValue>
</MGRestInvokeMethodResponse>
JSON Response
{"Message":null,"MessageCode":0,"Parameters":["9\/4\/2014","Thursday","September","success"],"ReturnValue":"0"}
HTTP POST –InsertItem
To insert a single IDO item, use the following url template, and attach the REST Request message.
Template: /xml/additem
XML Request
<?xml version="1.0"?>
<IDOUpdateItem xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.infor.com">
<Action>Insert</Action>
<ItemId>PBT=[Usernames]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Username</Name>
<Value>newuser14</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
11
<Modified>true</Modified>
<Name>EditLevel</Name>
<Value>2</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>UserDesc</Name>
<Value>user description</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>SuperUserFlag</Name>
<Value>1</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
XML Response
<MGRestUpdateResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message>Insert successful.</Message>
<MessageCode>200</MessageCode>
</MGRestUpdateResponse>
12
JSON Request
{
"Action":1,"ItemId":"PBT=[Usernames]",
"Properties":
[
{"IsNull":false,"Modified":true,"Name":"Username","Value":"newuser15"},
{"IsNull":false,"Modified":true,"Name":"EditLevel","Value":"2"},
{"IsNull":false,"Modified":true,"Name":"UserDesc","Value":"user description"},
{"IsNull":false,"Modified":true,"Name":"SuperUserFlag","Value":"1"}
]
}
JSON Response
{"Message":"Insert successful.","MessageCode":200}
HTTP POST –InsertItems
To insert multiple IDO items, use the following url template, and attach the REST Request message.
Template: /xml/additems
<?xml version="1.0"?>
<ArrayOfIDOUpdateItem xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.infor.com">
<IDOUpdateItem>
<Action>Insert</Action>
<ItemId>PBT=[Usernames]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Username</Name>
<Value>newuser10</Value>
</UpdateProperty>
<UpdateProperty>
13
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>EditLevel</Name>
<Value>2</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>UserDesc</Name>
<Value>user description</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>SuperUserFlag</Name>
<Value>1</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
<IDOUpdateItem>
<Action>Insert</Action>
<ItemId>PBT=[Usernames]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Username</Name>
<Value>newuser11</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>EditLevel</Name>
<Value>2</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>UserDesc</Name>
<Value>user description</Value>
</UpdateProperty>
14
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>SuperUserFlag</Name>
<Value>1</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
</ArrayOfIDOUpdateItem>
JSON Request
{
"Action":1,
"ItemId":"PBT=[Usernames]",
"Properties":
[
{"IsNull":false,"Modified":true,"Name":"Username","Value":"newuser54"},
{"IsNull":false,"Modified":true,"Name":"EditLevel","Value":"2"},
{"IsNull":false,"Modified":true,"Name":"UserDesc","Value":"user description"},
{"IsNull":false,"Modified":true,"Name":"SuperUserFlag","Value":"1"}
]
}
JSON Response
{"Message":"Insert successful.","MessageCode":200}
15
HTTP PUT – UpdateItem
The following url template may be used to update a single item of data. Attach the following REST Request message.
Template: /xml/updateitem
XML Request
<?xml version="1.0"?>
<IDOUpdateItem xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.infor.com">
<Action>Update</Action>
<ItemId>PBT=[MCBCustomers] mcb.ID=[6da61163-1cc5-4159-afb7-6d3ceafdcbe2] mcb.DT=[201408-06 10:00:10.880]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Name</Name>
<Value>Schulhoff Diagnostics</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
XML Response
<?xml version="1.0"?>
<MGRestUpdateResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message>Update successful.</Message>
<MessageCode>201</MessageCode>
</MGRestUpdateResponse>
16
JSON Request
{
"Action":2,
"ItemId":"PBT=[MCBCustomers] mcb.ID=[70c0b27f-8151-4f3a-8fcf-a8a8381823b4] mcb.DT=[2015-01-07
11:42:06.153]",
"Properties":
[
{"IsNull":false,"Modified":true,"Name":"Name","Value":"Blair"},
{"IsNull":false,"Modified":true,"Name":"Address","Value":"45 Woodwar dr"},
{"IsNull":false,"Modified":true,"Name":"City","Value":"alabaster"},
{"IsNull":false,"Modified":true,"Name":"State","Value":"KY"},
{"IsNull":false,"Modified":true,"Name":"PostalCode","Value":"65332"}
]
}
JSON Response
{"Message":"Update successful.","MessageCode":201}
HTTP PUT – UpdateItems
The following url template may be used to update a single item of data. Attach the following REST Request
message.
Template: /xml/updateitems
XML Request
<?xml version="1.0"?>
<ArrayOfIDOUpdateItem xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.infor.com">
<IDOUpdateItem>
<Action>Update</Action>
17
<ItemId>PBT=[MCBCustomers] mcb.ID=[70c0b27f-8151-4f3a-8fcf-a8a8381823b4]
mcb.DT=[2015-01-05 15:56:46.737]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Name</Name>
<Value>Blair</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Address</Name>
<Value>45 Woodwar dr</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>City</Name>
<Value>alabaster</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>State</Name>
<Value>KY</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>PostalCode</Name>
<Value>65332</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
<IDOUpdateItem>
<Action>Update</Action>
<ItemId>PBT=[MCBCustomers] mcb.ID=[5b4bd1ed-c21b-4087-8744-cab682132a85]
mcb.DT=[2015-01-05 13:21:21.690]</ItemId>
<Properties>
<UpdateProperty>
18
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Name</Name>
<Value>Stevens</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>Address</Name>
<Value>556 fred st</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>City</Name>
<Value>wexford</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>State</Name>
<Value>PA</Value>
</UpdateProperty>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>true</Modified>
<Name>PostalCode</Name>
<Value>15090</Value>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
</ArrayOfIDOUpdateItem>
XML Response
<MGRestUpdateResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message>Update successful.</Message>
<MessageCode>201</MessageCode>
</MGRestUpdateResponse>
19
JSON Request
[
{
"Action":2,
"ItemId":"PBT=[MCBCustomers] mcb.ID=[70c0b27f-8151-4f3a-8fcf-a8a8381823b4] mcb.DT=[2015-01-07
11:13:31.803]",
"Properties":
[
{"IsNull":false,"Modified":true,"Name":"Name","Value":"Bair"},
{"IsNull":false,"Modified":true,"Name":"Address","Value":"45 Woodwar dr"},
{"IsNull":false,"Modified":true,"Name":"City","Value":"alabaster"},
{"IsNull":false,"Modified":true,"Name":"State","Value":"KY"},
{"IsNull":false,"Modified":true,"Name":"PostalCode","Value":"65332"}
]
},
{
"Action":2,
"ItemId":"PBT=[MCBCustomers] mcb.ID=[5b4bd1ed-c21b-4087-8744-cab682132a85] mcb.DT=[2015-01-07
11:13:35.567]",
"Properties":
[
{"IsNull":false,"Modified":true,"Name":"Name","Value":"Stevenson"},
{"IsNull":false,"Modified":true,"Name":"Address","Value":"556 fred st"},
{"IsNull":false,"Modified":true,"Name":"City","Value":"wexford"},
{"IsNull":false,"Modified":true,"Name":"State","Value":"PA"},
{"IsNull":false,"Modified":true,"Name":"PostalCode","Value":"15090"}
]
}
]
20
JSON Response
{"Message":"Update successful.","MessageCode":201}
HTTP Delete - DeleteItem
This method allows the user to delete a single item, using the HTTP DELETE verb, and sending no data.
The ItemId must be modified to account for any spaces.
Template: /xml/deleteitem/?itemId={itemId}
Example:
http://localhost/MGRestService.svc/rest/xml/deleteitem/?itemId=PBT=[MCBCustomers]+mcb.ID=[146c1914-a71c-4ecd-a171500de513c1a8]+mcb.DT=[2015-01-05+15:59:39.027]
Url Parameters
Parameter
Description
itemId
Full ItemId as passed in collection load API
HTTP POST - DeleteItems
For deleting multiple items, use this url template, and attach data according to the following pattern.
Template: /xml/deleteitems
Example: http://localhost:4868/IDORequestService/MGRestService.svc/rest/xml/deleteitems
21
XML Request
<?xml version="1.0"?>
<ArrayOfIDOUpdateItem xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.infor.com">
<IDOUpdateItem>
<Action>Delete</Action>
<ItemId>PBT=[MCBCustomers] mcb.ID=[70c0b27f-8151-4f3a-8fcf-a8a8381823b4]
mcb.DT=[2015-01-07 13:13:04.660]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>false</Modified>
<Name>_ItemId</Name>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
<IDOUpdateItem>
<Action>Delete</Action>
<ItemId>PBT=[MCBCustomers] mcb.ID=[5b4bd1ed-c21b-4087-8744-cab682132a85]
mcb.DT=[2015-01-07 11:42:06.203]</ItemId>
<Properties>
<UpdateProperty>
<IsNull>false</IsNull>
<Modified>false</Modified>
<Name>_ItemId</Name>
</UpdateProperty>
</Properties>
</IDOUpdateItem>
</ArrayOfIDOUpdateItem>
XML Response
<MGRestUpdateResponse xmlns="http://schemas.datacontract.org/2004/07/"
xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Message>Delete successful.</Message>
<MessageCode>202</MessageCode>
</MGRestUpdateResponse
22
JSON Request
[
{
"Action":4,
"ItemId":"PBT=[MCBCustomers] mcb.ID=[70c0b27f-8151-4f3a-8fcf-a8a8381823b4] mcb.DT=[2015-01-07
13:13:04.660]",
"Properties":
[
{"IsNull":false,"Modified":false,"Name":"_ItemId","Value":null}
]
},
{
"Action":4,
"ItemId":"PBT=[MCBCustomers] mcb.ID=[5b4bd1ed-c21b-4087-8744-cab682132a85] mcb.DT=[2015-01-07
11:42:06.203]",
"Properties":
[
{"IsNull":false,"Modified":false,"Name":"_ItemId","Value":null}
]
}
]
List of API Urls and HTTP Verbs
Uri
Method
Description
SecurityToken
/xml/token/{config}
GET
Create security token.
Requires (2) headers:
UserId, Password
23
Returns security token string which must be used to access
most of the other APIs.
http://localhost/MGRestService.svc/rest/xml/token/MyConf
ig
/json/token/{config}
GET
Create security token.
Requires (2) headers:
UserId, Password
Returns security token string which must be used to access
most of the other APIs.
http://localhost/MGRestService.svc/rest/json/token/MyCon
fig
GetConfigurations
/xml/configurations
GET
Returns a list of configuration names
http://localhost/MGRestService.svc/rest/xml/configurations
/json/configurations
GET
Returns a list of configuration names
http://localhost/MGRestService.svc/rest/json/configurations
InvokeMethod
/xml/method/{ido}/{meth
GET
od}/?parms={parms}
Invokes an IDO method. Pass in all required parameters in a
comma-delimited string.
http://localhost/MGRestService.svc/rest/xml/myIDO/myMet
hod/?parms=string1,100,true
/json/method/{ido}/{meth
GET
Invokes an IDO method. Pass in all required parameters in a
24
od}/?parms={parms}
comma-delimited string.
http://localhost/MGRestService.svc/rest/json/myIDO/myMe
thod/?parms=string1,100,true
IDO Property Information
/xml/idoinfo/{ido}
GET
Return IDO property metadata
http://localhost/MGRestService.svc/rest/xml/idoinfo/MyIdo
/json/idoinfo/{ido}
GET
Return IDO property metadata
http://localhost/MGRestService.svc/rest/json/idoinfo/MyIdo
Basic LoadCollection (prop list only, record cap of 50)
/xml/{ido}/{props}
GET
A basic load collection with minimal parameters.
Record cap of 50, no filter. Pass in Ido name and property list
(comma-delimited).
http://localhost/MGRestService.svc/rest/xml/MyIdo/ID,Nam
e,Code
/json/{ido}/{props}
GET
A basic load collection with minimal parameters.
Record cap of 50, no filter. Pass in Ido name and property list
(comma-delimited).
http://localhost/MGRestService.svc/rest/json/MyIdo/ID,Na
me,Code
LoadCollection with all Parameters
/xml/{ido}/{props}/adv/?fi
GET
Load Collection with all potential parameters available.
lter={filter}&orderby={ord
25
erby}&rowcap={recordcap}
filter - filter string
&distinct={distinct}&custo
orderby - order by list of fields
mloadmethod={clm}&cust
rowcap - maximum rows to return (Integer)
omloadmethodparms={clm
distinct – flag for distinct (Boolean)
parms}&loadtype={loadtyp
customloadmethod – custom load method name to run
e}&bookmark={bookmark}
customloadmethodparms - any CLM parameters
&postquerycommand={pq
loadtype - load type (FIRST, NEXT, PREV, LAST)
c}&readonly={ro}
bookmark – bookmark string
postquerycommand – command to run after load
readonly – read only flag (Boolean )
http://localhost/MGRestService.svc/rest/xml/MyIdo/ID,Nam
e,ImportantDate/?filter+=+Name+LIKE+'%Smith%'&orderby
=ID&rowcap=10&distinct=True
/json/{ido}/{props}/adv/?f
ilter={filter}&orderby={ord
GET
Load Collection with all potential parameters available.
erby}&rowcap={recordcap}
&distinct={distinct}&custo
filter - filter string
mloadmethod={clm}&cust
orderby - order by list of fields
omloadmethodparms={clm
rowcap - maximum rows to return (Integer)
parms}&loadtype={loadtyp
distinct – flag for distinct (Boolean)
e}&bookmark={bookmark}
customloadmethod – custom load method name to run
&postquerycommand={pq
customloadmethodparms - any CLM parameters
c}&readonly={ro}
loadtype - load type (FIRST, NEXT, PREV, LAST)
bookmark – bookmark string
postquerycommand – command to run after load
readonly – read only flag (Boolean )
http://localhost/MGRestService.svc/rest/json/MyIdo/ID,Na
me,ImportantDate/?filter+=+Name+LIKE+'%Smith%'&orderb
26
y=ID&rowcap=10&distinct=True
LoadCollection with all Parameters and Full Schema (XML only)
/schema/{ido}/{props}/ad
GET
Return full load collection with inline XSD schema, and all
v/?filter={filter}&orderby=
element tags named based on property names. XML only.
{orderby}&rowcap={record
All parameters available.
cap}&distinct={distinct}&c
ustomloadmethod={clm}&
customloadmethodparms=
http://localhost/MGRestService.svc/rest/schema/MyIdo/ID,
{clmparms}&loadtype={loa
Name,ImportantDate/?filter+=+Name+LIKE+'%Smith%'&ord
dtype}&bookmark={book
erby=ID&rowcap=10&distinct=True
mark}&postquerycomman
d={pqc}&readonly={ro}
Insert Single Item
/xml/additem
POST
Add single IDO item
http://localhost/MGRestService.svc/rest/xml/additem
/json/additem
POST
Add single IDO item
http://localhost/MGRestService.svc/rest/json/additem
Insert List of Items
/xml/additems
POST
Add multiple IDO items
http://localhost/MGRestService.svc/rest/xml/additems
/json/additems
POST
Add multiple IDO items
http://localhost/MGRestService.svc/rest/json/additems
Update Single Item
/xml/updateitem
PUT
Update single IDO item
27
http://localhost/MGRestService.svc/rest/xml/updateitem
/json/updateitem
PUT
Update single IDO item
http://localhost/MGRestService.svc/rest/json/updateitem
Update List of Items
/xml/updateitems
PUT
Update multiple IDO items
http://localhost/MGRestService.svc/rest/xml/updateitems
/json/updateitems
PUT
Update multiple IDO items
http://localhost/MGRestService.svc/rest/json/updateitems
Delete Single Item
/xml/deleteitem
DELETE
Delete single IDO item
http://localhost/MGRestService.svc/rest/xml/deleteitem/?it
emId=PBT=[MCBCustomers]+mcb.ID=[146c1914-a71c-4ecda171-500de513c1a8]+mcb.DT=[2015-01-05+15:59:39.027]
/json/deleteitem
DELETE
Delete single IDO item
http://localhost/MGRestService.svc/rest/json/deleteitem/?it
emId=PBT=[MCBCustomers]+mcb.ID=[146c1914-a71c-4ecda171-500de513c1a8]+mcb.DT=[2015-01-05+15:59:39.027]
Delete Multiple Items
/xml/deleteitems
POST
Delete multiple IDO items
28
http://localhost/MGRestService.svc/xml/deleteitems
/json/deleteitems
POST
Delete multiple IDO items
http://localhost/MGRestService.svc/json/deleteitems
Error Codes
In the event of an error in an operation, the service will return the following message codes.
Error Code
Error Message
Description
300
Invalid Token
Created token is invalid; so username / password
/ configuration combination is invalid
301
Missing User name
User name missing from query
400
Invalid IDO query definition
Query is invalid; possibly misspelled property
name(s), IDO name, or indecipherable filter.
401
Missing IDO name
IDO name is missing, or has not been defined in
correct format in url
402
Missing property list
Property list is missing, or has not been defined
in correct format in url
403
Unable to parse record cap
Record cap value cannot be parsed or
understood; must be whole number -1 or greater
404
Unable to parse distinct
True/ False value for distinct cannot be
determined.
410
Unable to extract IDO name for
IDO name cannot be extracted from the ItemId
update
in the insert or update operation
Unable to extract RowPointer for
RowPointer value cannot be extracted from the
update
ItemId in the insert or update operation
450
Load Collection Failed
Load Collection failed for indeterminate reason
460
Invoke Method Failed
Invoke Method failed for indeterminate reason
470
Insert Failed
Insert failed for indeterminate reason
411
29
471
Update Failed
Update failed for indeterminate reason
472
Delete Failed
Delete failed for indeterminate reason
501
Full Schema unable to parse
With the Full Schema option, the service was
DateTime
unable to parse the date values of the fields
Full schema unable to get
With the Full Schema option, the service was
property information
unable to retrieve the property information
Full schema unable to create
With the Full Schema option, the service was
dataTable
(internally) unable to create the underlying
502
503
DataTable from which the XSD schema is
created.
30
Download