The usual answer would be a pointer to the REST API docs. I find it's often more useful to start with the examples (with the rest of the docs available in the tree to the left) - https://developer.atlassian.com/server/confluence/confluence-rest-api-examples/
It looks like you're new here. Sign in or register to get started.