diff --git a/sidecar.sh b/sidecar.sh index 238c64e..e36dcb0 100755 --- a/sidecar.sh +++ b/sidecar.sh @@ -37,24 +37,24 @@ populate_notebook() { } function populate() { - log "querying manifest service at $GEN3_ENDPOINT/manifests/" - MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/") - log "querying manifest service at $GEN3_ENDPOINT/manifests/metadata/" - METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata/") + log "querying manifest service at $GEN3_ENDPOINT/manifests" + MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests") + log "querying manifest service at $GEN3_ENDPOINT/manifests/metadata" + METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata") while [ -z "$MANIFEST_FILE" ] && [ -z "$METADATA_FILE" ]; do if [ -z "$MANIFEST_FILE" ]; then - log "Unable to get manifests from '$GEN3_ENDPOINT/manifests/'" + log "Unable to get manifests from '$GEN3_ENDPOINT/manifests'" log $MANIFEST_FILE fi if [ -z "$METADATA_FILE" ]; then - log "Unable to get metadata from '$GEN3_ENDPOINT/manifests/metadata/'" + log "Unable to get metadata from '$GEN3_ENDPOINT/manifests/metadata'" log $METADATA_FILE fi log "sleeping for 15 seconds before trying again.." sleep 15 - MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/") - METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata/") + MANIFEST_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests") + METADATA_FILE=$(curl -s -H "Authorization: Bearer ${ACCESS_TOKEN}" "https://$GEN3_ENDPOINT/manifests/metadata") done log "successfully retrieved manifests and metadata for user"