Not signed in (Sign In)

API

bulk delete via API calls

Bottom of Page

1 to 4 of 4

  1.  
  1.  

    Is there any way to perform a bulk delete of objects via the API (specifically for expenses)?

    thanks
    -T

  2.  

    T,

    The API does not have any single action that can accommodate a bulk delete. The recommended solution is to call the API once using the DELETE method for each expense that is to be deleted.

    The documentation for the expense resource is available at Intervals API Documentation: Project Expenses

    In this scenario, you could use the Expense resource to retrieve a list of expenses. Parse the list for the IDs and then make a DELETE request for each ID to be deleted:
    DELETE https://api.myintervals.com/expense/{ID}/

    Assuming no errors, the server will respond with 200 OK.

  3.  

    thanks for taking the time to answer J. I was looking for a way to save on API calls given the 6K limit, no worries.
    Thanks,
    -T

  4.  

    For T, and anyone else:

    To clarify, we have deliberately not implemented bulk delete. There are two reasons for this:

    1. There are many access considerations that take place each time something is deleted. Adding bulk delete might make dealing with error messages more complicated.
    2. But the primary reason we have cut down on this is to cut down on accidental deletions. It's bad enough to delete one resource accidentally, but to delete them all might be devastating to a company. We want to require every action taken through the API to be as purposeful as possible, and cut down the chance for mistakes as much as is possible.

    Hope that explains things.

    Cameron

Comments are closed.
For more Intervals help documentation, please visit help.myintervals.com