Hi I want to get the content of a page via rest api call.
I tried all imaginable combinations of user, password and URI.
E.G:
curl -X GET -u <email>:<API Token> "https://domain.atlassian.net/rest/api/content/<ID>?expand=space"
curl -X GET -u <email>:<PWD> "https://domain.atlassian.net/rest/api/content/<ID>?expand=space"
And I tried multiple page ID's. I got the page id by going to Page Info and then used the ID= ... from URL.
I also tried to send a "simple" Https request and added the Authentification to the header. The Http 404 error still occurs. The return header does not contain a Authentication_Failed entry. So I assume that the login has been successful.
Hello @Jannis Koray Köksel do you encode your user and pass to base64?? it happened to me that I haven't paid attention to this:
If you need to you may construct and send basic auth headers yourself. To do this you need to perform the following steps:
user@example.com:api_token
.Authorization
header with content Basic
followed by the encoded string. For example, the string user:user
encodes to dXNlcjp1c2Vy
in base64, so you would make the request as follows:curl -D- \ -X GET \ -H "Authorization: Basic dXNlcjp1c2Vy" \ -H "Content-Type: application/json" \ "https://your-domain.atlassian.net/wiki/rest/api/space"
the postman integrations its a great start also
hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.