How to exclude values from specific fields

Hi All, hope everyone is well.
I am pretty new to using api’s and postman.
In our organisation we have rest api’s that we use. For the help i need i am using this api specifically:

https://api2.timedoctor.com/api/1.0/activity/edit-time/bulk
[

  • {
    • “userId”: “string”,

    • “start”: “2019-08-24T14:15:22Z”,

    • “taskId”: “string”,

    • “projectId”: “string”,

    • “end”: “2019-08-24T14:15:22Z”,

    • “operation”: “add”,

    • “reason”: “string”,

    • “approved”: true}

]

So when i run this it works 100% fine. All i want to try and do is that when i run this api to update my time in bulk, i just want to exclude specific project id’s and task id’s from being updated. the rest i want to update all like it currently does.
Anyone know how i can possibly exclude specific values from projectid and taskid field?

Thank would appreciate any insights.

How are you generating the array of data being used for the bulk upload?

Surely, you just don’t include those project and task ID’s in the request?

So the project and taskid i need to update are all the same for all the days i need to edit, so i am just doing the edit on the full day which does it correctly, but for a specific project id and task id it is considered a break so i just don’t want those to update, while all the others can update. I just need to find out how to do an exclusion

That will be down to the API design on whether it supports that type of action.

This is usually a case of reading through the API specification to see if it supports that type of filtering.

Sounds like something you need to discuss with the supplier of the API if the use case is not specifically detailed in the API documentation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.