<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D51Y0000ALoXh6SQFOkta Classic EngineIntegrationsAnswered2024-03-25T18:07:27.000Z2021-01-25T19:01:05.000Z2021-01-28T23:43:18.000Z

s7d2w (s7d2w) asked a question.

Confluence REST API

I am trying to use the REST api on Confluence with Okta. I have a perl script which uses the technique found at https://developer.okta.com/blog/2018/06/22/multi-factor-authentication-command-line and seems to work mostly. I am getting a sessionToken and a sessionId and all of the appropriate cookies are set for my XXX.okta.com. Then I make my request to confluence and I see a series of redirects that looks correct.

 

  1. https://${CONFLUENCE}/rest/api/content?type=page&spaceKey=${SPACE}&title=${TITLE}&expand=body.storage%2Cversion
  2. https://${ORGPREFIX}.okta.com/oauth2/default/v1/authorize?...
  3. https://${CONFLUENCE}/oauth2/idpresponse?...
  4. https://${CONFLUENCE}/rest/api/content?type=page&spaceKey=${SPACE}&title=${TITLE}&expand=body.storage%2Cversion

 

Unfortunately the result comes back as a 404 with this content:

{

"statusCode": 404,

"data": {

"authorized": false,

"valid": true,

"allowedInReadOnlyMode": true,

"errors": [],

"successful": false

},

"message": "No space with key : ${SPACE}",

"reason": "Not Found"

}

 

Am I missing a step?


  • User15905896560008893663 (Vendor Management)

    In order to provide you with the best answer, we need to gather more information. Please open a ticket with the support team, via the Open a Case button on the Okta Help Center (https://support.okta.com/help), and provide us with your workflow, such as the request you are trying to make, and the expected answer. 

  • s7d2w (s7d2w)

    The request I am trying to make is in the question above. The result I expect is to not get an error. I was very clear in my explanation.

This question is closed.
Loading
Confluence REST API