Integratec API Platform
resourceGet

Gets a representation of a resource.

There are multiple variations of this method:

object resourceGet(array resourceId)

object resourceGet(array resourceId, array names)

Parameters
[in]resourceIdResource ID of the resource to get.
[in]namesProperties to return.
Returns
The return value is a JSON object representation of the resource.
If the resource is a collection, the return value has an array named items. Each array item is a JSON object representation of a resource in the collection.
If the resource is a collection and the items have auto-generated bookmarks, the return value has an array of bookmarks for the items named itemBookmarks.
Usage
If names is not an empty array, property names are returned in the same case specified. If names is an empty array or missing, all properties are returned.

Examples

C#

jsonReply = call.resourceGet(
new string[] { "addressTables", "1234567890" },
new string[] { "name", "classId", "connection" }
);

Python

1 jsonReply = call.resourceGet(
2  [ 'addressTables', '1234567890' ],
3  [ 'name', 'classId', 'connection' ]
4 )

Request

{
"method" : "resourceGet",
"params" : [
["addressTables", "1234567890"],
[ "name", "classId", "connection" ]
]
}

Reply

{
"result" : {
"name" : "Conner",
"classId" : "dbf",
"connection" : "Conner.dbf"
}
}

object resourceGet(array resourceId, boolean forwards, string bookmark, integer count)

object resourceGet(array resourceId, boolean forwards, string bookmark, integer count, array names)

Parameters
[in]resourceIdResource ID of the resource to get.
[in]forwardsThe direction to traverse the collection.
[in]bookmarkThe position at which to start the enumeration.
[in]countThe number of items to return.
[in]namesProperties to return.
Returns
The return value is a JSON object representation of the resource.
The return value has an array named items. Each array item is a JSON object representation of an item in the collection.
If items have auto-generated bookmarks, the return value has an array of bookmarks for the items named itemBookmarks.
If there are more items in the collection, the return value has a string named bookmark that can be used to continue the enumeration.
Usage
Enumerates item in a collection. The resource must be a collection.
To traverse the collection forwards, set forwards to true. To traverse the collection backwards, set forwards to false.
bookmark can be an empty string, a value returned by a previous call to resourceGet() or, if items have bookmarks, a bookmark for an item.
  • If bookmark is an empty string and forwards is true, the enumeration starts at the beginning of the collection. If bookmark is an empty string and forwards is false, the enumeration starts at the end.
  • If bookmark is a value returned by a previous call to resourceGet(), the enumeration starts where the previous enumeration ended.
  • If bookmark is a bookmark for an item, the enumeration starts at the item.
If count is -1 and forwards is true, the enumeration ends when the end of the collection is reached. If count is -1 and forwards is false, the enumeration ends when the beginning of collection is reached. The number of items returned may be less than count, if the enumeration ends before finding the requested number of items.
If names is not an empty array, property names are returned in the same case specified. If names is an empty array or missing, all properties are returned.

Examples

C#

jsonReply = call.resourceGet(
new string[] { "addressTables", "2736298458", "records" }, True, "", 2,
new string[] { "COMPANY" }
);

Python

1 jsonReply = call.resourceGet(
2  [ 'addressTables', '2736298458', 'records' ], true, '', 2,
3  [ 'COMPANY' ]
4 )

Request

{
"method" : "resourceGet",
"params" : [
[ "addressTables", "2736298458", "records" ],
true,
"",
2,
[ "COMPANY" ]
]
}

Reply

{
"result" : {
{
"items" : [
{
"COMPANY" : "BCC Software, LLC"
},
{
"COMPANY" : "XYZ Company"
}
],
"itemBookmarks" : [
"AQAAAA==",
"AgAAAA=="
],
"bookmark" : "AwAAAA=="
}
}