Answered

Miro Audit Logs

  • 4 February 2021
  • 2 replies
  • 405 views

I am trying to access audit logs of my team but am unable to access it as it says bad request for every request.

 

This is the request

https://api.miro.com/v1/audit/logs?createdAfter=2021-02-01T23:59:45Z&createdBefore=2021-02-05T23:59:45Z

 

I have also tried this in case it might work but it did not work too

https://api.miro.com/v1/audit/logs?createdAfter=2021-02-01&createdBefore=2021-02-05

 

I have added my authentication as Bearer {{Token}}.

 

The response I get is 400 Bad Request:

{

"status": 400,

"code": "invalidParameters",

"message": "Method arguments are not valid",

"context": {

"fields": [

{

"field": "createdAfter",

"message": "Invalid parameter type: Date is required",

"reason": "invalidParameter"

}

]

},

"type": "error"

}

 

Any help here would be appreciated. Thanks in advance!

icon

Best answer by Daniela Gavidia 8 February 2021, 14:13

View original

This topic has been closed for comments

2 replies

Hi Daniela,

 

I tried it your way and it worked. Thank you for the help!

 

 

Userlevel 4
Badge

Hello Abishek,

 

I believe the problem you are seeing is because the format of the date that you are passing does not match exactly with what the backed expects. Please try the format yyyy-MM-ddThh:mm:ss.SSSZ, as mentioned in the documentation:

https://developers.miro.com/reference#get-logs
 

Like this:

https://api.miro.com/v1/audit/logs?createdAfter=2020-02-01T05:34:08.000Z&createdBefore=2020-02-02T05:34:08.000Z

Notice the .000 between the seconds and the Z. 

 

Kind regards.

 

Daniela