Created
June 17, 2016 03:04
-
-
Save douglascrp/acaedc05e0483bc97181b8063a93e820 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Atualização de pasta com CURL | |
# | |
# Usage: atualiza-pasta.sh | |
# | |
# ./atualiza-pasta.sh | |
# | |
ALFRESCO_SERVER=http://servidor:8080/alfresco | |
USERNAME="admin" | |
PASSWORD="senha" | |
#CURL_VERBOSE=-v | |
CURL_VERBOSE=-s | |
CURL_METHOD=POST | |
#obter o id da pasta que se deseja atualizar | |
IDPASTA="2098bd8f-c171-442c-8aeb-8a7e911b76a2" | |
METADATA_SERVICE_URL=${ALFRESCO_SERVER}/service/api/metadata/node | |
echo "Atualizando pasta: ""${IDPASTA}"" em ${ALFRESCO_SERVER}" | |
curl -X ${CURL_METHOD} --user "${USERNAME}":"${PASSWORD}" \ | |
"${METADATA_SERVICE_URL}/workspace/SpacesStore/${IDPASTA}" \ | |
-H "Content-Type: application/json" -d '{"properties":{"cont:contratadaContrato":"Nome Contratada","cont:contratanteContrato":"Nome Contratante"}}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment