Get All Resources
Returns a list of resources for the specified tenant.
Command
GET https://{server}/api/v1/{tenantId}/objectData/Resource
Parameters
|
Name |
Required |
Data Type |
Description |
Parameter Type |
|---|---|---|---|---|
|
tenantId |
Yes |
String |
Unique identifier of the tenant. |
Path |
|
filter |
No |
String |
Spring Expression Language (EL) filter. Allows you to filter by a set of records (for example: name eq 'name'). The following fields are filterable:
For more details on using the filter query parameter, see Filtering Guidelines. |
Query |
|
offset |
No |
String |
The number of items to skip before starting to collect the result set. Used with limit. |
Query |
|
limit |
No |
String |
The maximum number of results to return. Used with offset. Together, they determine the start index and number of records to return. For example, to return records 5 through 15 that have been sorted by name, use the following: Resource?offset=5&limit=10&orderBy=name |
Query |
|
orderBy |
No |
String |
Order by fields, sort order. |
Query |
|
select |
No |
String |
Select the specific fields to be returned. |
Query |
|
count |
No |
String |
The number of records to fetch from the database. |
Query |
|
groupBy |
No |
String |
Categorization of results (group by a field). |
Query |
Responses
Status and Error Codes
Successful Response Body
|
Field |
Description |
||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
hostId |
The identifier of the host instance that is returning the request. |
||||||||||||||||||||||
|
status |
The status of the request. Valid values:
|
||||||||||||||||||||||
|
content |
Returns an array of records.
|
||||||||||||||||||||||
|
messages |
If the status is SUCCESS, this field is always blank. If the status is ERROR, a validation error occurred. For example, the object definition name in the URL is invalid. |
||||||||||||||||||||||
|
count |
The number of records returned. |
Examples
|
Sample API Call |
|---|
GET http://company.com/api/v1/pX3459712f8/objectData/Resource X-Application-Key: 30b5f27a684744116537882dda0e50efb8c5a6e26a7b7ad2f3fcb2c24436a840 Content-Type: application/json Authorization: Bearer eyJhbGciOiJSUzI1NiIsImprdSI6Imh0dHB= |
Successful Responses
|
Response Body Sample |
|---|
{
"hostId": "f51f1121783d15decddca1ff7b7f9ac3",
"status": "SUCCESS",
"content": [
{
"displayName": "Schneider, Gerd",
"lobExternalId": "B20394971",
"resourceId": "z20102720212855454224d99",
"terminalExternalId": "JI308971",
"type": "PERSON",
"lastModifiedTime": "2020-10-27 20:22:13.037737",
"createdBy": "z20102717121205036001d99",
"lastModifiedBy": "z20102717122656536419d99",
"createdTime": "2020-10-27 20:21:28.69425",
"activeFlag": true
},
{
"displayName": "Leclerq, Isabelle",
"lobExternalId": "C20394996",
"resourceId": "z20102917040662184992331",
"terminalExternalId": "I308996",
"type": "PERSON",
"lastModifiedTime": null,
"createdBy": "z20102717121205036001d99",
"lastModifiedBy": null,
"createdTime": "2020-10-29 17:04:06.761549",
"activeFlag": true
}
],
"messages": [],
"count": 2
} |
Error Responses
|
Response Body Error Sample - Object Definition Doesn't Exist on the Tenant |
|---|
{
"hostId": "964ce899bb9fca9271494665fb876e89",
"status": "ERROR",
"content": null,
"messages": [
{
"type": "ERROR",
"message": "Failed to Load Resource of Type ObjectDefn with Arguments [Resources, pX2f8122a19]",
"code": "error.resourceNotFound",
"arguments": {
"type": "ObjectDefn",
"arguments": "[Resources, pX2f8122a19]"
},
"key": "ObjectDefn"
}
],
"count": -1
} |