Make Transaction Rest Call
Step 4:- Make Transaction Rest Call
1) Once Rest Authentication is made, transaction calls can be made using the logintoken obtained from Step 3
2) If the server returns a 401 error with message Token is Invalid, then re-authentication needs to be done to get a new login token
3) For all transactions under the same URI, you can use GET to get a sample payload to use for posting data using POST method.
URI:- /api/app/system/* ( detail URI explained later for each transaction )
Content-Type:- application/json
Method:- GET ( to get a sample payload)
Request Header:-
Attribute |
Description |
appkey |
The appkey obtained in Step 1( rest_uu ) |
logintoken |
The token obtained in Step 3 |
Response Payload:- ( as per transaction described later in this section )
Attribute |
Description |
id |
ID of transaction is request is success |
error |
If there are errors in the transaction this field is populated, else it is blank |
msg |
If request is success, this will contain transaction messages |
data |
This part would vary for each transaction, depending on the transaction |
Response Sample(Success):-
{
"id": "",
"error": "",
"msg": "",
"sernos": {
"FG Serno1": [
"Comp1 Serno",
"Comp2 Key/Search key",
"Comp3 Serno"
],
"FG Serno2": [
"Comp4 Key/Search Key",
"Comp5 Serno",
"Comp6 Serno"
]
}
}
No Comments