Not signed in (Sign In)
The Intervals Forum is read-only
Please head to help.myintervals.com for help articles and guides. If you have any questions, please contact our support team.

API

not able to update projectworktype

Bottom of Page

1 to 10 of 10

  1.  
  1.  

    Hi, I cant seem to get this projectworktype to update using the following data with a "PUT" anything missing? Im getting a (400) Bad Request.

    <?xml version="1.0" encoding="UTF-8"?>
    <projectworktype>
    <esttime>22</esttime>
    </projectworktype>

    • jreeve
    • Jun 20th 2012 edited @ 06/20/2012 4:40 pm
     

    For this scenario, there are multiple required fields that are not being sent through. The projectid and active fields are required. Please refer to https://www.myintervals.com/api/resource.php?r=projectworktype for a list of all required and optional fields available.

  2.  
    I thought they were only required for creation, not updating...in any case I tried that anyway and i still get the 400 bad request error
  3.  

    here is the new PUT request i made which still fails to update


    <?xml version="1.0" encoding="UTF-8"?>
    <projectworktype>
    <esttime>22</esttime>
    <projectid>295395</projectid>
    <hourlyrate>100</hourlyrate>
    <active>t</active>
    </projectworktype>

  4.  

    T,

    Thank you for the followup. Our developers are going to take a closer look at why this is failing. We'll let you know once it's been resolved.

    J

  5.  
    thanks!
  6.  
    Our developers were able to isolate and resolve the issue. The API resource for project work types should work properly now. Thank you for taking the time to work with us on this issue.
  7.  

    it seems like any projectworktype that was spawned from a default worktype is giving me this error if that default worktype no longer exists. I have tried using 0 for the worktype id and i get an internal server error. if I leave it out entirely or explicitly include it i get the same error of the resource not being valid.

    what can i do to perform a successful update of the project worktype given the nolongerexisting default worktype it came from?

  8.  

    here is the exact error for more color. note that this even prevents me from deactivating problematic worktypes
    ==
    <intervals personid="126675" status="Bad Request" code="400"><error><code>18</code><message>Validation error has occurred (missing required field/parameter, or bad field/parameter)</message><verbose><item>Validation failed for the value (315123) passed to the following field: worktypeid</item><item>It appears the value you passed doesn't represent a valid resource.</item><item>Work type with this id could not be found.</item><item>Please consult the API documentation at https://myintervals.com/api for more information or email API support at api@myintervals.com for help.</item></verbose></error></intervals>

  9.  

    Hey t,

    I wanted to let you know that we just deployed a fix for the bug you encountered. Thank you for your patience through the process. If you encounter any further difficulty with the API, please let us know.

    Cameron

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