Is there an API to read and update page content on an intranet.confluence URL?

I am trying to follow the Atlassian Python API but I believe I am heading in the wrong direction. It seems to only work with xx.atlassian URLs.

Is there a way to read and update a page’s content that has an intranet url, or am I totally misunderstanding everything?

How would I be able to accomplish this?

eg. intranet.mycompany.corp/display/space/the+page+of+info

Any insight and documentation is appreciated.

Thank you!

To read and update a page in Confluence using the Atlassian Python API, you will need to use the Confluence REST API. This API allows you to perform various actions on Confluence pages, including reading and updating their content.

To use the Confluence REST API, you will need to make HTTP requests to the appropriate API endpoints. The Python Requests library is a popular library for making HTTP requests in Python.

Here is an example of how you can use the Confluence REST API to read a page’s content using the Python Requests library:

import requests

# Set the base URL for the Confluence API
base_url = "https://intranet.mycompany.corp/confluence/rest/api"

# Set the page ID of the page you want to read
page_id = "12345"

# Set the API key for authentication
api_key = "your-api-key"

# Set the headers for the API request
headers = {
    "Authorization": f"Basic {api_key}",
    "Content-Type": "application/json",
}

# Send the API request to read the page
response = requests.get(
    f"{base_url}/content/{page_id}", headers=headers
)

# Print the response from the API
print(response.json())


This example sends an HTTP GET request to the /content/{pageId} endpoint of the Confluence REST API to retrieve the content of the page with the ID page_id. The API key is provided in the Authorization header to authenticate the request.

To update the content of a page, you can use the /content/{pageId} endpoint with an HTTP PUT request and include the updated content in the request body. Here is an example of how you can do this:

import requests

# Set the base URL for the Confluence API
base_url = "https://intranet.mycompany.corp/