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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.