Skip to content

Commit 8af71ea

Browse files
author
nianiB9
committed
temporary change
1 parent 3d44dfb commit 8af71ea

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

examples/Maestro/eg001TriggerWorkflow.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ echo ""
4444
#apx-snippet-start:GetWorkflowsList
4545
response=$(mktemp /tmp/response-wftmp.XXXXXX)
4646
Status=$(
47-
curl -w '%{http_code}' --request GET "${base_path}/accounts/${account_id}/workflows" \
47+
curl -w '%{http_code}' --request GET "${base_path}/accounts/60b2b6db-7d3b-4bf8-95ba-a516bf479749/workflows" \
4848
"${Headers[@]}" \
4949
--output ${response}
5050
)
@@ -68,7 +68,7 @@ workflow_id=$(grep -B 1 '"name": "Example workflow - send invite to signer"' $re
6868
# Get the trigger URL
6969
# workflow_id comes from the response of the Workflows: getWorkflowsList endpoint
7070
response=$(mktemp /tmp/response-wftmp.XXXXXX)
71-
Status=$(curl -s -w "%{http_code}\n" -i --request GET "${base_path}/accounts/${account_id}/workflows/${workflow_id}/trigger-requirements" \
71+
Status=$(curl -s -w "%{http_code}\n" -i --request GET "${base_path}/accounts/60b2b6db-7d3b-4bf8-95ba-a516bf479749/workflows/8fdfb076-bfbe-4709-a8c0-1a7f886903ad/trigger-requirements" \
7272
"${Headers[@]}" \
7373
--output ${response})
7474
#apx-snippet-end:GetWorkflowTriggerRequirements
Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
1-
#!/bin/bash
2-
# https://developers.docusign.com/docs/maestro-api/maestro101/embed-workflow/
3-
# Embed a Maestro workflow after it has been triggered
1+
# #!/bin/bash
2+
# # https://developers.docusign.com/docs/maestro-api/maestro101/embed-workflow/
3+
# # Embed a Maestro workflow after it has been triggered
44

5-
# Check that we're in a bash shell
6-
if [[ $SHELL != *"bash"* ]]; then
7-
echo "PROBLEM: Run these scripts from within the bash shell."
8-
fi
5+
# # Check that we're in a bash shell
6+
# if [[ $SHELL != *"bash"* ]]; then
7+
# echo "PROBLEM: Run these scripts from within the bash shell."
8+
# fi
99

10-
# Step 1: Obtain your OAuth token
11-
ACCESS_TOKEN=$(cat config/ds_access_token.txt)
10+
# # Step 1: Obtain your OAuth token
11+
# ACCESS_TOKEN=$(cat config/ds_access_token.txt)
1212

13-
# Step 2: Read the account ID
14-
account_id=$(cat config/API_ACCOUNT_ID)
13+
# # Step 2: Read the account ID
14+
# account_id=$(cat config/API_ACCOUNT_ID)
1515

16-
# Step 3: Read the workflow ID created by the trigger workflow script
17-
workflow_id=$(cat config/WORKFLOW_ID)
16+
# # Step 3: Read the workflow ID created by the trigger workflow script
17+
# workflow_id=$(cat config/WORKFLOW_ID)
1818

19-
# Step 4: Verify a workflow has been created
20-
if [ -z "$workflow_id" ]; then
21-
echo "❌ ERROR: No workflow found. Please trigger a workflow before running this embed script."
22-
exit 0
23-
fi
19+
# # Step 4: Verify a workflow has been created
20+
# if [ -z "$workflow_id" ]; then
21+
# echo "❌ ERROR: No workflow found. Please trigger a workflow before running this embed script."
22+
# exit 0
23+
# fi
2424

25-
# Step 5: Construct your API headers
26-
declare -a Headers=('--header' "Authorization: Bearer ${ACCESS_TOKEN}" \
27-
'--header' "Accept: application/json" \
28-
'--header' "Content-Type: application/json")
25+
# # Step 5: Construct your API headers
26+
# declare -a Headers=('--header' "Authorization: Bearer ${ACCESS_TOKEN}" \
27+
# '--header' "Accept: application/json" \
28+
# '--header' "Content-Type: application/json")
2929

30-
# Step 6: Prepare request body
31-
request_data=$(mktemp /tmp/request-embed.XXXXXX)
32-
printf \
33-
'{
34-
"returnUrl": "https://example.com/return"
35-
}' > $request_data
30+
# # Step 6: Prepare request body
31+
# request_data=$(mktemp /tmp/request-embed.XXXXXX)
32+
# printf \
33+
# '{
34+
# "returnUrl": "https://example.com/return"
35+
# }' > $request_data
3636

37-
# Step 7: Make the POST request to generate the embed URL
38-
response=$(mktemp /tmp/response-embed.XXXXXX)
39-
Status=$(curl -s -w "%{http_code}\n" -i --request POST "https://api-d.docusign.net/maestro/v1/accounts/${account_id}/workflows/${workflow_id}/embed_url" \
40-
"${Headers[@]}" \
41-
--data-binary @$request_data \
42-
--output ${response})
37+
# # Step 7: Make the POST request to generate the embed URL
38+
# response=$(mktemp /tmp/response-embed.XXXXXX)
39+
# Status=$(curl -s -w "%{http_code}\n" -i --request POST "https://api-d.docusign.net/maestro/v1/accounts/${account_id}/workflows/${workflow_id}/embed_url" \
40+
# "${Headers[@]}" \
41+
# --data-binary @$request_data \
42+
# --output ${response})
4343

44-
# Step 8: Handle the response
45-
if [[ "$Status" -gt "201" ]]; then
46-
echo ""
47-
echo "❌ ERROR: Unable to generate embed URL for the workflow"
48-
echo ""
49-
cat $response
50-
rm "$request_data"
51-
rm "$response"
52-
exit 0
53-
fi
44+
# # Step 8: Handle the response
45+
# if [[ "$Status" -gt "201" ]]; then
46+
# echo ""
47+
# echo "❌ ERROR: Unable to generate embed URL for the workflow"
48+
# echo ""
49+
# cat $response
50+
# rm "$request_data"
51+
# rm "$response"
52+
# exit 0
53+
# fi
5454

55-
echo ""
56-
echo "✅ Embed URL successfully generated:"
57-
embed_url=$(grep '"url":' $response | sed -n 's/.*"url": "\([^"]*\)".*/\1/p')
58-
echo $embed_url
55+
# echo ""
56+
# echo "✅ Embed URL successfully generated:"
57+
# embed_url=$(grep '"url":' $response | sed -n 's/.*"url": "\([^"]*\)".*/\1/p')
58+
# echo $embed_url
5959

60-
# Optional: Output embed code for iframe usage
61-
echo ""
62-
echo "📎 Use this in your HTML:"
63-
echo "<iframe src=\"$embed_url\" width=\"100%\" height=\"600\" frameborder=\"0\" allowfullscreen></iframe>"
60+
# # Optional: Output embed code for iframe usage
61+
# echo ""
62+
# echo "📎 Use this in your HTML:"
63+
# echo "<iframe src=\"$embed_url\" width=\"100%\" height=\"600\" frameborder=\"0\" allowfullscreen></iframe>"
6464

65-
# Clean up
66-
rm "$request_data"
67-
rm "$response"
65+
# # Clean up
66+
# rm "$request_data"
67+
# rm "$response"

0 commit comments

Comments
 (0)