Using Valency API in content page

Answers
-
Hey @Kwangsub Ahn ,
I think some samples or code repos may help you build the context of your app and receive the auth tokens you need to hit our APIs.
Here are some ideas to help you get started:
Hope that helps you start building your app
-
Hi, Thanks for the reply. I made some progress but still has some issue. I am using API tool for test. Some of Get/Post methods works fine. But as the screenshot shown, uploading file throwing an error with 500. Not sure any thing wrong.
-
Hey @Kwangsub Ahn ,
I am not sure given your screenshot what exactly you are trying to do. The Data area of the API Test tool is where you enter JSON for the API call. Example below:
The API URL has (myOrgId) which isnt valid in the request, so you may want to proof read your URL and make sure its fully substituted as well
-
I am trying to call an API to upload a file.
/d2l/api/le/1.22/[orgId]/dropbox/folders/[folderId]/submissions/mysubmissions/
Could you give me any working example using above API? I've tried to fix but always it throws 500 error (or 400).
-
I am curious about how to put multipart/mixed; boundary=xxBOUNDARYxx for type and body below.
--xxBOUNDARYxx
Content-Disposition: form-data; name=""; filename="file.txt"
Content-Type: text/plain
This is a sample text file with some text content.
--xxBOUNDARYxx--
This kind of information is used from the sample code from github link you gave me but There is no such place to put this information in API test tool
-
Take a look here, I think this might help: https://github.com/Brightspace/Extensibility-Samples/blob/master/docs/content.md
-
Thanks, it helped.
Just one thing about Content-Type, I needed to put "multipart/mixed;boundary=xxBOUNDARYxx" but there was no option for this in API tool so after I forced to change the text in select box option from browser, I was successfully able to get response.
-
Awesome glad it worked for you! Please be sure to the comment that helped as "Best Answer" to help other devs find this answer easily in the future
-
would really like to know where you were " forced to change the text in select box option from browser" is located at. I am having this exact same issue trying to upload a file. If anyone at d2l can help that would be great!
Categories
- All Categories
- 6 Thought Leadership
- 7 Known and Fixed Issues
- 6 Product Roadmap
- 553 Archived
- 10 Accessibility
- 27 Community Corner
- 2 Welcome
- Updates
- Member Spotlights
- 4 Events
- 242 Development
- 746 Customer Enablement
- Evaluate - Assess Student Learning
- Get Comfortable with Brightspace
- Communicate - Engage with Your Students
- 1 Create - Set up your Brightspace course
- Action - Add or create student activities
- 26 Partners
- 8 Product News
- 2022
- 2022 Release Notes
- 2021 Release Notes
- 4 Training
- andycat