Below you can see several examples on how to list logs. Examples both in JSON and JSONAPI are provided.
NOTE: Remember to substitute the token (after Bearer) and the service id (the "[SERVICE ID]" below) to your own token and service id.
Use Cases:
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/json" -H "Accept: application/json" -X GET https://api.myrapidi.com/api/v2/service/[SERVICE ID]/logs?fromdate=202101010000&todate=202101302359&limit=1000&offset=0
The output for this example would be:
[ { "id": 1, "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_INTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE005", "destination": " ", "description": "Statistics on connection SFORCE005 Sent 1 [0], Received 1 [0] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 89, "bytes_sent": 0, "packages_received": 89, "bytes_received": 0 }, { "id": 2, "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_INTERNAL", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "AX005_R", "destination": " ", "description": "Statistics on connection AX005_R Sent 2 [1260], Received 2 [269] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 107, "bytes_sent": 217740, "packages_received": 107, "bytes_received": 24442 }, ... { "id": 1000, "log_datetime": "2016-11-02T00:00:08Z", "transfer": "CUST01_SF", "sub_transfer": null, "group": "CUST", "schedule": "G_CUST_AX005", "source": "AX005_R", "destination": "", "description": "Statistics on connection AX005_R Sent 6 [4488], Received 6 [3559] - compressed 23 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "SCHED01", "filename": null, "run_id": "20161101000005SCHED01", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 23, "packages_sent": 134, "bytes_sent": 103699, "packages_received": 134, "bytes_received": 71843 } ]
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/vnd.api+json" -H "Accept: application/vnd.api+json" -X GET https://api.myrapidi.com/api/v2/service/[SERVICE ID]/logs?fromdate=202101010000&todate=202101302359&limit=1000&offset=0
The output for this example would be:
{ "data": [ { "id": "1", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE001", "destination": " ", "description": "Statistics on connection SFORCE001 Sent 1 [0], Received 1 [0] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 89, "bytes_sent": 0, "packages_received": 89, "bytes_received": 0 } }, { "id": "2", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "AX001_R", "destination": " ", "description": "Statistics on connection AX001_R Sent 2 [1268], Received 2 [269] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 107, "bytes_sent": 217740, "packages_received": 107, "bytes_received": 24442 } }, ... { "id": "1000", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:51:46Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE001", "destination": "AX001", "description": "SForce Account -> AX Customer Update EXTERNALID completed - compressed 4 monthly", "is_error": false, "time_used": 67, "log_type": "transfer_control", "message_code": "T1209", "service_code": "CmdLine", "filename": null, "run_id": "20150402005141Thread", "run_type": 0, "read_source": 15760, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 4, "packages_sent": 0, "bytes_sent": 0, "packages_received": 0, "bytes_received": 0 } }, ] }
This can be done by selecting only the logs where a search finds a match for 'statistics' in the description, and setting the offset and limit to 100 to indicate we're looking for the 2nd set of 100 logs that match our filters.
NOTE: This example assumes less than 300 000 total logs in the database, if there are more this request would return an error and additional indexed filters would be needed to reduce the number of logs the search would need to read.
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/json" -H "Accept: application/json" -X GET https://api.myrapidi.com/api/v2/service/[SERVICE ID]/logs?search=statistics&limit=100&offset=100
The output for this example would be:
[ { "id": 101, "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_INTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE005", "destination": " ", "description": "Statistics on connection SFORCE005 Sent 1 [0], Received 1 [0] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 89, "bytes_sent": 0, "packages_received": 89, "bytes_received": 0 }, { "id": 102, "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_INTERNAL", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "AX005_R", "destination": " ", "description": "Statistics on connection AX005_R Sent 2 [1260], Received 2 [269] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 107, "bytes_sent": 217740, "packages_received": 107, "bytes_received": 24442 }, ... { "id": 200, "log_datetime": "2016-11-02T00:00:08Z", "transfer": "CUST01_SF", "sub_transfer": null, "group": "CUST", "schedule": "G_CUST_AX005", "source": "AX005_R", "destination": "", "description": "Statistics on connection AX005_R Sent 6 [4488], Received 6 [3559] - compressed 23 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "SCHED01", "filename": null, "run_id": "20161101000005SCHED01", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 23, "packages_sent": 134, "bytes_sent": 103699, "packages_received": 134, "bytes_received": 71843 } ]
curl -H "Authorization: Bearer [API SECURITY TOKEN]" -H "Content-Type: application/vnd.api+json" -H "Accept: application/vnd.api+json" -X GET https://api.myrapidi.com/api/v2/service/[SERVICE ID]/logs?search=statistics&limit=100&offset=100
The output for this example would be:
{ "data": [ { "id": "101", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE001", "destination": " ", "description": "Statistics on connection SFORCE001 Sent 1 [0], Received 1 [0] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 89, "bytes_sent": 0, "packages_received": 89, "bytes_received": 0 } }, { "id": "102", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:13:16Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "AX001_R", "destination": " ", "description": "Statistics on connection AX001_R Sent 2 [1268], Received 2 [269] - compressed 6 monthly", "is_error": false, "time_used": 0, "log_type": "connection_control", "message_code": "T1316", "service_code": "CmdLine", "filename": null, "run_id": "20150402001313Thread", "run_type": 0, "read_source": 0, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 6, "packages_sent": 107, "bytes_sent": 217740, "packages_received": 107, "bytes_received": 24442 } }, ... { "id": "200", "type": "logs", "attributes": { "log_datetime": "2015-04-02T00:51:46Z", "transfer": "XCUST09_AX_UPD_EXTERNALID", "sub_transfer": " ", "group": " ", "schedule": " ", "source": "SFORCE001", "destination": "AX001", "description": "SForce Account -> AX Customer Update EXTERNALID completed - compressed 4 monthly", "is_error": false, "time_used": 67, "log_type": "transfer_control", "message_code": "T1209", "service_code": "CmdLine", "filename": null, "run_id": "20150402005141Thread", "run_type": 0, "read_source": 15760, "read_destination": 0, "skipped_source": 0, "read_action": 0, "updated": 0, "inserted": 0, "deleted": 0, "source_deleted": 0, "initialized": 4, "packages_sent": 0, "bytes_sent": 0, "packages_received": 0, "bytes_received": 0 } }, ] }