Homepage › Clovertech Forums › Cloverleaf › Cloverleaf API – SMATDB
Tagged: clapi api json
- This topic has 8 replies, 3 voices, and was last updated 2 months, 2 weeks ago by Shivam Gohel.
-
CreatorTopic
-
November 24, 2020 at 1:54 pm #118243Jonathan SoudersParticipant
Anyone familiar with how this works? I’m trying to use the message search API call, but I have no idea what parameters I need to use for passing in the JSON – after I bit of finagling I was able to figure out the message API using the message ID, but this is not ideal for what I am tying to accomplish.
-
CreatorTopic
-
AuthorReplies
-
-
November 24, 2020 at 4:03 pm #118244Rob AbbottKeymaster
Hey Jonathan, great you are exploring the API!
Have you checked out the swagger pages? They might help point you in the right direction.
From your browser:
https://localhost:15037/clapi/swagger-ui.html
https://localhost:15037/clapi/swagger-ui.html#/smat-db-controller
https://localhost:15037/clapi/swagger-ui.html#!/smat-db-controller/searchMessagesUsingPOST_1
(replace localhost with your server’s hostname if you’re not right on it, and port number will vary with version)
Rob Abbott
Director, Product Management - Infor Cloverleaf-
November 25, 2020 at 10:12 am #118247Jonathan SoudersParticipant
Yes – but unfortunately I can’t decipher what parameters I need to supply to the following JSON object for the call to be successful, even from the Swagger UI.
Any way you can clarify what the needed string values are for the criteria, encodes, Files, etc. keys?
{
“criteria”: [
{
“itemName”: “string”,
“operator”: “string”,
“required”: true,
“val1”: “string”,
“val2”: “string”
}
],
“encodes”: {},
“filePasswordMap”: {},
“files”: [
“string”
],
“msgNumPerPage”: 0,
“pageNum”: 0,
“sort”: {
“ascending”: true,
“metaName”: “string”
},
“visiableMetaNames”: [
“string”
]
} -
November 25, 2020 at 10:45 am #118248Jonathan SoudersParticipant
Update:
I figured out most of the keys and can get response data now… but I still don’t know what string values to pass to the Criteria object. Any assistance is appreciated.
-
December 3, 2020 at 4:53 pm #118263Jonathan SoudersParticipant
I opened a support ticket for this which has now been escalated to R&D as a defect. I’ll document the results here if/when I determine the solution.
-
December 4, 2020 at 9:03 am #118268Rob AbbottKeymaster
Hi Jonathan sorry I didn’t follow up here. You did the right thing reaching out to support – we’ll also improve our documentation with anything that comes out of this case.
Rob Abbott
Director, Product Management - Infor Cloverleaf -
December 8, 2020 at 12:34 pm #118275Jonathan SoudersParticipant
Thanks Rob. Posting the results in a separate comment.
-
-
December 23, 2020 at 11:24 am #118301Jonathan SoudersParticipant
Finally ended up getting this working with the below syntax (I asked Infor to update their documentation because part of this criteria I needed to use is not mentioned anywhere in Swagger or in the Java classes I decompiled while troubleshooting).
For message search (content of message):
{
“files”:
[
“$HCIROOT/<site_name>/exec/processes/<process_name>/<file_name>”
],
“criteria”:
[
{“type”:”plain”,”itemName”:”MESSAGECONTENT”,”operator”:”regular expression”,”val1″:<search_text_or_regex_query>}
],
“sort”:{“ascending”:”true”},
“pageNum”:1,
“msgNumPerPage”:10
}For message search (metadata example):
{
“files”:
[
“$HCIROOT/<site_name>/exec/processes/<process_name>/<file_name>”
],
“criteria”:
[
{“type”:”plain”,”itemName”:”MID”,”operator”:”==”,”val1″:<cloverleaf_mid_value>}
],
“sort”:{“ascending”:”true”},
“pageNum”:1,
“msgNumPerPage”:10
}For message resend (example of outbound thread message resend – most values can be pulled from the other CLAPI requests for SMAT):
{
“defaultEncoding”: “UTF-8”,
“encoding”: “UTF-8”,
“includeMeta”: “true”,
“messageType”: “DATA”,
“passwords”: {},
“priority”: 5120,
“resend_type”: “DATA”,
“criteria”: [
{
“type”: “plain”,
“itemName”: “MID”,
“operator”: “==”,
“val1”: <cloverleaf_mid_value>
}
],
“srcThreadName”: “<thread_name>”,
“destThread”: “<thread_name>”,
“metatdataDestThreads”: “<thread_name>”,
“filename”: “<file_name>”,
“files”: [
“$HCIROOT/<site_name>/exec/processes/<process_name/<file_name>”
],
“modifiedmessages”: [
{
“cloverMsgprofile”: {
“mid”: “0.0.10648074”,
“sendingTime”: 1608657356535,
“fileRelativePath”: “/exec/processes/<process_name/<file_name>”,
“marked”: false,
“indexRecordOffset”: 0,
“indexRecordLength”: 0,
“modified”: false,
“rowId”: “67”,
“smatInfoVersion”: 258,
“dispTimeFmtVersion”: 258,
“offsetMap”: {},
“filePath”: “$HCIROOT/<site_name>/exec/processes/<process_name/<thread_name>.smatdb”,
“fileName”: “<file_name>”
},
“metadata”: {
“TIMEXLT”: “1608657356534”,
“STATE”: “14”,
“PRIORITY”: “5120”,
“SKIPXLT”: “0”,
“TIMEIN”: “1608657356534”,
“USERECOVERDB”: “3”,
“SAVECONTEXT”: “outbound”,
“DATAFMT”: “{RESEND_DEST <thread_name>} {RESEND_DEST <thread_name>}”,
“SEPCHARS”: “”,
“FLAGS”: “33286”,
“TIMEQCUR”: “0”,
“TYPE”: “DATA”,
“SRCMID”: “<cloverleaf_mid_value>”,
“RETRIES”: “0”,
“DESTCONN”: “<thread_name>”,
“ORIGDESTCONN”: “<thread_name>”,
“GROUPID”: “0”,
“TIMESTOR”: “0”,
“XLTTHREAD”: “”,
“TIMEQTOT”: “0”,
“DBTABLE”: “”,
“SOURCECONN”: “<thread_name>”,
“ORIGSOURCECONN”: “<thread_name>”,
“TIMEREC”: “1608657356534”,
“TIMEOUT”: “1608657356534”,
“DRIVERCTL”: “{CONNID 0} {IPVERSION 4} {CLIENTIP <client_ip_address>} {CLIENTPORT 54568} {_TRXID_ ORM_O01}”,
“GROUPMID”: “”,
“USERDATA”: “”,
“TIMEARC”: “0”
},
“contentBase64String”: “<base64_message>”
}
],
“processName”: “<process_name”,
“threadContext”: “ob_post_tps”
} -
March 5, 2024 at 4:51 pm #121233Shivam GohelParticipant
Hi @Jonathan,
Thank you for posting the dummy load. It’s impossible to figure this out from the documentation/SWAGGER UI. Though I was able to make the SMAT search work, I am still having a hard time figuring out the resend API.
I want to resend a single message through resend API. Would I be able to do that?
Here are the steps I am doing:
1. Getting list of messages (base64 encoded strings) from retrieve API.2. Copying and pasting one of the messages metadata to resend.
Note that I don’t want to resend complete SMAT. I just want to send a single message which I am passing through base64 encoded string parameter.
Please help me with this.
-
-
AuthorReplies
- You must be logged in to reply to this topic.