Fetching Logs with Client URL.

0

Various curl commands to fetch logs:

Grab the bearer with Basic auth:


curl --location --request POST 'https://sdkms.fortanix.com/sys/v1/session/auth' \
--header 'Authorization: Basic dGFudmVlbi5rYXVyQGZxxxxxxxxxxxxxHdW5lZXRAOTUyQA==' \
--data-raw ''


Select the account with account ID:
 

curl --location --request POST 'https://sdkms.fortanix.com/sys/v1/session/select_account' \
--header 'Authorization: Bearer iFLgNbGDdFkk1s_iZM6IA-xxxxxxxxxxxxxxx-3nJiQ9Z7d39jTCSxyPxy8iE3FNDMTGvlWnEXJaA' \
--header 'Content-Type: text/plain' \
--data-raw '{
"acct_id": "xxxxxxxxxxxxxxxxxxxx"
}'

 
Get Logs:
 

curl --location --request GET 'https://sdkms.fortanix.com/sys/v1/logs?action_type=AUTH&size=100&acct_id=c30b659e-58xxxx-xxxx-xxxx-xxx&action_type=ADMINISTRATIVE' \
--header 'Authorization: Bearer ixxxxxxxxxxs-3nJiQ9ZxxxxxxxxxxxxxxxxxvlWnEXJaA' \
--data-raw ''

 

 

range_from is the starting time for search, this is EPOCH value. 


curl --location --request GET 'https://eu.smartkey.io/sys/v1/logs?action_type=AUTH&action_type=ADMINISTRATIVE&size=100&range_from<EPOCH VALUE>=&range_to=<EPOCH VALUE>&actor_type=User' \
header '> --header 'Authorization: Bearer kBT2qY7SxxxxxxxxxxxxxxxxxxxxxH5JTS6E_o64cnXvzeK4B3kPLmoO4HTWgQ_LMIoZWGHa4R' \wGlug
> --data-raw ''
curl --location --request GET 'https://eu.smartkey.io/sys/v1/logs?action_type=AUTH&action_type=ADMINISTRATIVE&size=2&range_from=<EPOCH VALUE>&range_to=<EPOCH VALUE>' \
--header 'Authorization: Bearer <xxxxxxxxxxxxxxxxxxxxx>' \
--data-raw ''

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post