Hi Team,
I'm using the following CURL request in a Jenkins pipeline. While I'm getting the response, I would only like to get the ID of the page. Is there a way I can just the ID from the CURL or add something to the Jenkins file that can help me get that ID?
Thanks a lot
script {
response = sh(script: "curl -u 'xxxxxxxxx:xxxxxxxxxxxx' -X GET -H 'Content-Type: application/json' https://xxxx.xxxxx.net/wiki/rest/api/content/xxxxxxxx?expand=body.storage", returnStdout: true)
echo '=========================Response===================' + response
}
Hi @atalwar,
Thank you for raising this question on Community. If you need to get the page ID, refer to the example "Find a page by title and space key" from the page REST API Examples.
I hope that helps, but if you still have trouble, you might have luck asking on the Atlassian Developer Community.
Take care,
Shannon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.