planner API loop through checklist

Thiemen Siemensma | Bijlsma BV 41 Reputation points
2020-05-26T10:03:40.063+00:00

Hi,

I'm working on creating a automated plan-creation. I want to check an existing plan and create a new plan based on the existing one.

Copying all the buckets and tasks works fine through the planner API, but when I try to get all checklist items and loop over them, I can't update the new task checklist because they are objects and not stored in an array when I retrieve them through my custom connector. Can anyone help my to get this loop working so I can update the new task's checklist items based on the title of the template task checklist items. Pictures below are the json representation of my retrieved checklist items, and the error I recieve when I want the loop throught this body.

8627-checklist-items-json.png

8694-error-message.png

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,677 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 27,856 Reputation points Microsoft Employee
    2020-05-26T16:31:59.497+00:00

    Hi @Thiemen Siemensma | Bijlsma BV ,

    Microsoft Q&A is a brand new platform and now all services have been migrated here yet. A better place to ask your question would be to post it over at https://social.msdn.microsoft.com/Forums/en-US/home?forum=sharepointdevelopment&filter=alltypes&sort=relevancedesc&brandIgnore=True&filter=alltypes&searchTerm=

    Having said that, in looking at the error message, the body payload should be a JSON array. In looking at your screen shot, it doesn't appear to be that so make sure your values are enclosed inside [ ] e.g.

    [  
        "70407": {  
            "@odata.type": "#microsoft.graph.plannerChecklistItem",  
            ....  
        }  
    ]  
    

    Hope this helps.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.