Appearance
getSmartLibraryMetadata ​
Returns necessary metadata about a SmartLibrary including Folders, SmartLibrary version, metadata versions, and file versions etc. Intended usage is for assisting with device syncing. NOTE: this service is required to be used when SmartLibrary Folders are used as it contains all necessary metadata to drive folder functionaliy.
Request ​
http
GET /rest/smartlib/{smartLibId}/metadataHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
smartLibId | Long | Yes | Id of the Smart Library for which metadata is being requested |
debug | Boolean | No | Flag to return name of the entries to assist with debugging as this API only returns ids |
showFolderStructureOnly | Boolean | No | Flag to control whether folder structure only be returned i.e. no entries |
Response ​
200 OK ​
JSON Response where type is E=Entry and F=Folder.
EXAMPLE 1 - "folders only, no entries" will be returned when showFolderStructureOnly=true. MID use mainly.
json
{
"smartLibOrder": "AO",
"urlTemplate": "standard-entry-url.html",
"authorIsUploader": "N",
"userRoles": [],
"smartLibId": 347,
"smartLibOwner": "CO",
"cId": 3,
"cName": "My Interact Finance",
"targetAppCode": "MY",
"smartLibStatus": "A",
"smartLibName": "Test Library",
"smartLibDesc": "My test library",
"smartLibVersion": 9,
"smartLibRequiresMetadata": "Y",
"smartLibCreated": 1537937973380,
"smartLibCreatedBy": "1",
"smartLibModified": 1537937973380,
"smartLibModifiedBy": "1",
"smartLibUsesFolders": "N",
"smartLibUsesFilters": "Y",
"smartLibTags": [],
"smartLibFolders": [],
"smartLibFilters": [],
"structure": [
{
"type": "F",
"folderId": 173,
"folderName": "Level1",
"order": 1,
"hexColor": "#475C67",
"entriesVersion": 2,
"metadataVersion": 1,
"entries": []
},
{
"type": "F",
"folderId": 174,
"folderName": "Level2",
"order": 2,
"hexColor": "#475C67",
"entriesVersion": 3,
"metadataVersion": 1,
"entries": []
}
],
"totalActiveSmartEntries": 2,
"totalRecords": 2,
"totalActivePages": 1,
"userCanUpload": false
}json
{
"smartLibOrder": "AO",
"urlTemplate": "standard-entry-url.html",
"authorIsUploader": "N",
"userRoles": [],
"smartLibId": 347,
"smartLibOwner": "CO",
"cId": 3,
"cName": "My Interact Finance",
"targetAppCode": "MY",
"smartLibStatus": "A",
"smartLibName": "Test Library",
"smartLibDesc": "My test library",
"smartLibVersion": 9,
"smartLibRequiresMetadata": "Y",
"smartLibCreated": 1537937973380,
"smartLibCreatedBy": "1",
"smartLibModified": 1537937973380,
"smartLibModifiedBy": "1",
"smartLibUsesFolders": "N",
"smartLibUsesFilters": "Y",
"smartLibTags": [],
"smartLibFolders": [],
"smartLibFilters": [],
"structure": [
{
"type": "F",
"folderId": 173,
"folderName": "Level1",
"order": 1,
"hexColor": "#475C67",
"entriesVersion": 2,
"metadataVersion": 1,
"entries": [
{
"type": "E",
"smartEntryId": 453,
"smartEntryMetadataVersion": 1,
"smartEntryFileVersion": 1
}
]
},
{
"type": "F",
"folderId": 174,
"folderName": "Level2",
"order": 2,
"hexColor": "#475C67",
"entriesVersion": 3,
"metadataVersion": 1,
"entries": [
{
"type": "E",
"smartEntryId": 454,
"smartEntryMetadataVersion": 2,
"smartEntryFileVersion": 1
}
]
}
],
"totalActiveSmartEntries": 2,
"totalRecords": 2,
"totalActivePages": 1,
"userCanUpload": false
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInsufficientPrivilegesException | See Error Definitions |
WSSmartLibNotFoundException | See Error Definitions |
WSBrochureNotFoundException | See Error Definitions |
WSAuthorisationServiceException | See Error Definitions |
WSSmartLibraryServiceException | See Error Definitions |
WSInternalException | See Error Definitions |