In this example we'll use Postman to upload a file to GroupShare by making a call to the following endpoint:
What is Postman?
Postman is a FREE tool which allows you to easily make calls to a server. You can download the tool from here.
How upload file using Postman
After you downloaded the tool you'll see a tab where we need to add following information:
- Call type (GET, POST, PUT..) , we'll use POST
- The endpoint we want to make the call [GSUrl]/api/projectserver/v2/projects/[projectId]/files/upload
- We need to add the token in the "Authorization" area (the token from Swagger can be used). See following post on how to get the token.
- In the "Body" we need to add the zip with the files we want to upload
Headers and Body area
- Click on "Headers" tab and add a new key "Content-Type" with "application/zip" as value.
- Next step is to add information in "Body" tab. In this tab make sure you have checked radio button "form-data" . In the key column select "File" from dropdown list. In the "Value" column select from the zip which contains the files you want to upload.
After all the required data is filled click on "Send" button. If the request was successful the status will be "200 OK"
Refresh projects view in GroupShare and you'll see the project in the grid.