Schema: UserApiKey (ID: 3476)
METADATA
Attribute | Value |
---|---|
Topic | 3325-mlink |
MLink Token | MLinkRest |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
100 | id | byte | API key serial number which identifies this key |
101 | expires | DateTime | API key expiration date, defaults to never 2100-01-01 |
102 | created | DateTime | API key creation date |
103 | label | string(255) | API key name/description (if any; may be client supplied) |
104 | plaintextApiKey | string(36) | plaintext API key (only sent for an add operation) |
105 | success | enum : YesNo | did the call succeed? |
106 | errorMessage | string(255) | error message if success == No |
107 | action | enum : MLinkActions | action to take |
Post Msgs API Call
- Python
- cUrl
import requests
# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'
# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'
# Request Parameters
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'postmsgs',
"postaction": "U", # (U)pdate, (I)nsert, (R)eplace, or (D)elete
"postmerge": "Y", # (Y)es or (N)o
}
payload = {
"header": {
"mTyp": "UserApiKey"
},
"message": {
"id": 1, // byte
"expires": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"created": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"label": "exampleString", // string
"plaintextApiKey": "exampleString", // string
"success": "enumValue", // enum(YesNo) - None, Yes, No
"errorMessage": "exampleString", // string
"action": "enumValue" // enum(MLinkActions) - None Select Insert Update Replace Delete
}
}
response = requests.post(MLINK_PROD_URL, params=params, json=payload)
curl -X POST 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=postmsgs' \
--data-urlencode 'postaction=U' \ # (U)pdate, (I)nsert, (R)eplace, or (D)elete
--data-urlencode 'postmerge=Y' \ # (Y)es or (N)o
--header 'Content-Type: application/json' \
--data '{
"header": {
"mTyp": "UserApiKey"
},
"message": {
"id": 1, // byte
"expires": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"created": "2025-01-01 12:00:00.000000", // yyyy-MM-dd HH:mm:ss.SSSSSS
"label": "exampleString", // string
"plaintextApiKey": "exampleString", // string
"success": "enumValue", // enum(YesNo) - None, Yes, No
"errorMessage": "exampleString", // string
"action": "enumValue" // enum(MLinkActions) - None Select Insert Update Replace Delete
}
}'