Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

We need to authenticate with this API.

The easiest way is to use Base Auth.

We need to use the Confluence GUI to create a token to combine your email address.

function main()
   local ApiToken = "5gBXXX"
   local BaseToken = filter.base64.enc("first.last@interfaceware.com:"..ApiToken)
   local Page = '875233353'
   local BaseUrl = "https://interfaceware.atlassian.net/wiki/rest/api/";
   
   local Data, Code, Headers = net.http.get{ 
      url = BaseUrl..'content/'..Page,
      get_parameters={
         expand='body.view,body.storage'
      }, 
      headers = {
         Accept="application/json",
         Authorization="Basic "..baseToken
      },
      live = true
   }
   local jsonData = json.parse{data=Data}
end

Further reading

  • No labels