Replace all options in optionlist via API

Answered

Comments

3 comments

  • Avatar
    Tony Ruth

    Hey Kyle, with version 5.1 you can send all of the options in with a single request.

    1
    Comment actions Permalink
  • Avatar
    Tony Ruth

    Hi Kyle, you are correct with your assumptions about v60, you have to delete everything if you want to load the entire list content over again (2 requests). You won't cause any harm if when you create the list again, the original options have the same keys as before you deleted.

    If you are really concerned about usage, then you may consider using the 5.1 APIs instead for your option list updates as the update list request requires that you send in all the content and our server code blow the existing options away for you.

    Hope that helps,
    Tony

    0
    Comment actions Permalink
  • Avatar
    Kyle Bradfield

    OK, I'll try using the 5.1 API instead. When I tried it before via the PHP sdk, it was creating a copy of the list ending in "_1" instead of updating the existing list. It looks like it might be a bug in the sdk where the ZCOptionList edit() method is sending a POST request, and the API docs say it should be a PUT request. POST is for creating a new list, so I believe the edit() method was incorrectly creating a new list with the same name).

    Our growing plan migration is scheduled for tonight, so I will give it a try tomorrow. I noticed in the v60 API, each call is limited to 1000 items. The employee list I want to update has about 1100 items. With the 5.1 API, can I send all of them in one call, or does it also have the 1000 item limit? Thanks.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk