Ingest a bag into the storage service
tar -czf bag.tar.gz "$BAG_DIRECTORY"aws s3 cp "bag.tar.gz" "s3://$UPLOADS_BUCKET/$UPLOADED_BAG_KEY"curl -X POST "$TOKEN_URL" \ --data grant_type=client_credentials \ --data client_id="$CLIENT_ID" \ --data client_secret="$CLIENT_SECRET"{"access_token":"eyJraWQi...","expires_in":3600,"token_type":"Bearer"}curl -X POST "$API_URL/ingests" \ --header "Authorization: $ACCESS_TOKEN" \ --header "Content-Type: application/json" \ --data "{ \"type\": \"Ingest\", \"ingestType\": {\"id\": \"$INGEST_TYPE\", \"type\": \"IngestType\"}, \"space\": {\"id\": \"$SPACE\", \"type\": \"Space\"}, \"sourceLocation\": { \"provider\": {\"id\": \"amazon-s3\", \"type\": \"Provider\"}, \"bucket\": \"$UPLOADS_BUCKET\", \"path\": \"$UPLOADED_BAG_KEY\", \"type\": \"Location\" }, \"bag\": { \"info\": { \"externalIdentifier\": \"$EXTERNAL_IDENTIFIER\", \"type\": \"BagInfo\" }, \"type\": \"Bag\" } }"{"id":"ffd3c8a3-9021-47bc-a68c-75eeaff1d4bd", ...}curl "$API_URL/ingests/$INGEST_ID" \ --header "Authorization: $ACCESS_TOKEN"
Last updated