MDM
Activity Data
Function: activity_data
Type: API Endpoint (POST)
Purpose:
The activity_data function serves as an API endpoint that fetches activity data for a specific user. The function retrieves data related to activities, triggers, or history records based on specified filters. It allows filtering by user, customer, application, and fetch type (status categories such as Success, Failure, In Progress, etc.).
URL:
POST /api/mdm/activity_data
Request Headers:
- User-Code (Header, required): A base64-encoded string representing the user code.
- Customer-Key (Header, required): A base64-encoded string containing lscode and firmcode, separated by a pipe (|), which helps identify the customer's firm and database code.
- App-Code (Header, required): A base64-encoded string representing the application code.
- Fetch-Type (Header, required): A string indicating the type of data to fetch:
-Upload
- 0: Pending
- 1: Processed
- 2: Not-Processed
- 3: In-progress
-Download
- 4: In-progress
- 6: Processed
- 7: Not Processed
- type (Header, required): A string indicating the type of data to retrieve:
- 0: Activity
- 1: Trigger
- 2: History
Response Model:
Returns a JSON object containing:
- recordsTotal: Total number of records retrieved.
- columns: List of dictionaries defining column metadata for the output.
- data: List of dictionaries with activity data.
Response Example:
{
"recordsTotal": 1,
"columns": [
{"data": "batchid", "title": "ID", "target": 0},
{"data": "file_upload_on", "title": "Date", "target": 1},
{"data": "table_name", "title": "Table", "target": 2},
{"data": "file_name", "title": "File Name", "target": 3},
{"data": "created_user", "title": "User", "target": 4},
{"data": "message", "title": "Message", "target": 5},
{"data": "Url", "title": "View Error Details", "target": 6}
],
"data": [
{
"batchid": "<batchid>",
"file_upload_on": "<file_upload_on>",
"table_name": "<table_name>",
"file_name": "<file_name>",
"created_user": "<created_user>",
"message": "<message>",
"Url": "<Url>"
}
]
}
post/api/mdm/activity_data
Headers
User-Codestring required
Customer-Keystring required
App-Codestring required
Fetch-Typestring required
typestring required
Response
Successful Response
{"stackTrail":"paths:/api/mdm/activity_data:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}