Get API Error Message in PowerShell

daniel_savlon
Community Explorer

Does anyone know the syntax for getting the text of a Canvas API error message in PowerShell?

For example, the Canvas Live API Response Body gives me the following message when I try to update an enrollment for an ended course:

{ "message": "Can't add an enrollment to a concluded course." }

How can I retrieve that message programmatically using PowerShell?

 

Thanks

Labels (3)
0 Likes