please help me in getting rest API to get space key by passing space name.
#!/bin/bash SpaceName="$@ Url=http://localhost:8090/rest/api/content" SpaceKey=$(curl -s -n $Url/search?cql=space.title~%22$SpaceName%22\&limit=1 | python -mjson.tool | grep space) SpaceKey=${SpaceId##*\/} SpaceKey=${SpaceId%\"*} echo "SpaceKey"
Run with
# ./scriptname.sh SpaceNameToSearch
This rest api does not seem to work.
Running it here, I get a random result from a different space.
Is that the expected behavior?
It looks like you're new here. Sign in or register to get started.