Skip to content

Commit ac93890

Browse files
committed
Update Examples/eg008CreateTemplate.sh
1 parent 59a907b commit ac93890

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Examples/eg008CreateTemplate.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ curl --header "Authorization: Bearer {ACCESS_TOKEN}" \
1414
--header "Content-Type: application/json" \
1515
--get \
1616
--data-urlencode "search_text=${template_name}" \
17-
--request GET https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/templates
17+
--request GET https://demo.docusign.net/restapi/v2/accounts/{ACCOUNT_ID}/templates \
18+
--output $response
19+
20+
# pull out the templateId if it was returned
21+
TEMPLATE_ID=`cat $response | grep templateId | sed 's/.*\"templateId\": \"//' | sed 's/\",.*//'`
22+
23+
# Save the template id for use by other scripts
24+
echo ${TEMPLATE_ID} > ../TEMPLATE_ID
1825

1926

2027
exit 0

0 commit comments

Comments
 (0)