4545fi
4646
4747# This header will be used for both the API call to get the ID of the workspace creator, and to create the upload request
48- # ds-snippet-start:Workspaces4Step2
48+ # ds-snippet-start:Workspaces5Step2
4949declare -a Headers=(' --header' " Authorization: Bearer ${ACCESS_TOKEN} " \
5050 ' --header' " Accept: application/json" \
5151 ' --header' " Content-Type: application/json" )
52- # ds-snippet-end:Workspaces4Step2
52+ # ds-snippet-end:Workspaces5Step2
5353
5454# Create the workspace upload request definition
5555# apx-snippet-start:createWorkspaceUploadRequest
56- # ds-snippet-start:Workspaces4Step3
56+ # ds-snippet-start:Workspaces5Step3
5757printf \
5858' {
5959 "name": "Upload Request example ' " ${DUE_DATE} " ' ",
@@ -73,15 +73,15 @@ printf \
7373 ],
7474 "status": "draft"
7575}' >> $request_data
76- # ds-snippet-end:Workspaces4Step3
76+ # ds-snippet-end:Workspaces5Step3
7777
78- # ds-snippet-start:Workspaces4Step4
78+ # ds-snippet-start:Workspaces5Step4
7979Status=$( curl -s -w " %{http_code}\n" -i \
8080 --request POST ${base_path} /accounts/${account_id} /workspaces/${workspace_id} /upload-requests \
8181 " ${Headers[@]} " \
8282 --data-binary @${request_data} \
8383 --output ${response} )
84- # ds-snippet-end:Workspaces4Step4
84+ # ds-snippet-end:Workspaces5Step4
8585# apx-snippet-end:createWorkspaceUploadRequest
8686
8787if [[ " $Status " -gt " 201" ]] ; then
@@ -108,3 +108,4 @@ rm "$request_data"
108108
109109
110110
111+
0 commit comments