Worklogs api filtering by username

Officially Answered

Comments

5 comments

  • Avatar
    Vanja Pletikosić

    Hello Leo,

    The REST API requests cannot be filtered by using the worklogs filter and can only be filtered by the fields specified in the Timetracker API reference.
    What I would recommend is for you to use our Reporting API and and OData request, by using the worklogsWorkItems endpoint for instance you can get the same data and you can also use the worklogsFilter to filter by the username.

    Let me know if this helps.

    Best regards,
    Vanja

    1
    Comment actions Permalink
  • Avatar
    Leo Dsouza

    Hi Vanja,

    Thank you for your response.

    With the reporting api, I'm getting the required data using the UserId filter. Is there a way to pass the username in the query? The User.Email filter gives me an error The child type 'User.Email' in a cast was not an entity type. Casts can only be performed on entity types.

    /api/odata/v3.2/workLogsWorkItems?worklogsFilter=User.Email eq 'leo.dsouza@regoconsulting.com'

    Regards,

    Leo.

    0
    Comment actions Permalink
  • Avatar
    Vanja Pletikosić

    Hi Leo,

    Please try with this: 

    /api/odata/v3.2/workLogsWorkItems?worklogsFilter=User/Email eq 'leo.dsouza@regoconsulting.com'


    Kind regards,
    Vanja

    0
    Comment actions Permalink
  • Avatar
    Leo Dsouza

    This works! Thank you for your prompt response.

    0
    Comment actions Permalink
  • Avatar
    Vanja Pletikosić

    Hi Leo,

    You are very welcome!

    Best regards,
    Vanja

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk