Invoke-WebRequest : {"message":"invalid page_url parameter"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello and happy friday!
Can someone give ma good example of a module item page type? I have tried and end up with this error message
Invoke-WebRequest : {"message":"invalid page_url parameter"}
This is my code I am using
$item1 =@{"module_item[title]"="Technology Requirements and Personal Responsibility";"module_item[position]"="0";"module_item[indent]"="0";"module_item[type]"="Page";"module_item[html_url]"="https://instance.instructure.com/courses/59/modules/items/1255";"module_item[page_url]"="technology-requirements-and-personal-responsibility";"module_item[published]"="True"} $header = @{"Authorization"="Bearer "+ $security_token} $body= @{"module[name]"="Getting started";"module[position]"="1"} #$curlly=Invoke-WebRequest -Headers $header -Body $body -Method Post -Uri ($url_main+"courses/2420/modules") #$moduleid=(ConvertFrom-Json $purlly.Content).Id #create Item $curlly=Invoke-WebRequest -Headers $header -Body $item7 -Method Post -Uri ($url_main+"courses/2420/modules/13246/items")
Or better yet is there an way to upload an premade module?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
SO, after a while of figuring stuff out with the Canvas' live chat It turns if you want to link a page with a module. that page has to be created first!