curl -k -4 -v \
    -X POST "https://localhost:8443/rest/login" \
    -d "email=admin@dspace.com&password=admin"


TOKEN="JSESSIONID=06035EE7DE308E0E01E8BE05A27DD99D"


curl -k -4 \
    --cookie \"${TOKEN}\" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -X POST "https://localhost:8443/rest/communities" \
	-d "{\"name\":\"CREATED BY JSON (POST)\"}"


curl -k -4 \
    --cookie \"${TOKEN}\" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -X PUT "https://localhost:8443/rest/communities/[UUID]" \
	-d "{\"name\":\"TITULO EDITADO\"}"


curl -k -4 \
    --cookie \"${TOKEN}\" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -X POST "https://localhost:8443/rest/communities/[UUID]/collections" \
	-d "{\"name\":\"CREATED BY JSON (POST)\"}"


curl -k -4 \
    --cookie \"${TOKEN}\" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -X POST "https://localhost:8443/rest/collections/[UUID]/items" \
	-d "{\"metadata\":[ {\"key\": \"dc.title\", \"language\": \"pt_BR\" ,\"value\": \"TESTE 1\"} ]}"


curl -k -4 \
    --cookie \"${TOKEN}\" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -X POST "https://localhost:8443/rest/items/[UUID]/bitstreams?name=filename.txt" \
	-T "filename.txt"
