Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting ID of confluence curl request

atalwar November 1, 2021

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
}

 

1 answer

0 votes
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 4, 2021

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events