Confluence Docs 3.0 : Prototype REST API This page last changed on Oct 11, 2009 by agnes@atlassian.com. This page documents the Prototype REST API supported for Confluence 3.1. ## Space #### Getting a List of Spaces Resource: `/space` Description: List all spaces (maximum page size of 50) visible to the current user Parameters:
`start-index` | start offset of the list
`max-results` | maximum number of results to return
`type` | space type e.g. personal, all
`expand` | use 'space' to expand the spaces details of each space listed
Result:
    <spaceEntityList expand="space">
    <space name="FOO" key="FOO">
    <link rel="self" href="http://localhost:8080/confluence/rest/prototype/1/space/FOO"/>
    <rootpages size="1"/>
    </space>
    <space name="Test Space" key="TST">
    <link rel="self" href="http://localhost:8080/confluence/rest/prototype/1/space/TST"/>
    <rootpages size="2"/>
    </space>
    </spaceEntityList>
#### Looking up Details of a space Resource: `/space/{key`} Description: Displays the details of the space identified by {key} Parameters:
`expand` | use 'rootpages' to list all the root level pages of the space
Result:
    <space name="Demonstration Space" key="ds" expand="rootpages">
    <link rel="self" href="http://localhost:8080/rest/prototype/1/space/ds"/>
    <rootpages size="2"/>
    <home>
    <id>32799</id>
    <link rel="self" href="http://localhost:8080/rest/prototype/1/content/32799"/>
    <type>page</type>
    <title>Home</title>
    <url>/display/ds/Home</url>
    <children size="6"/>
    </home>
    </space>
## Content #### Getting Content Resource: `/content/{id`} Description: Gets confluence content by id Parameters:
`expand` | use 'children' to list all the child pages of the page
Result:
    <content type="page" id="1180211" expand="children">
    <link rel="self" href="http://localhost:8080/confluence/rest/prototype/1/content/1180211"/>
    <title>Home</title>
    <url>/display/FOO/Home</url>
    <spaceKey>FOO</spaceKey>
    <children size="1"/>
    <body>This is the home of the FOO space.</body>
    </content>

Document generated by Confluence on Nov 05, 2009 23:27