XP-Dev.com Documentation

Wiki Pages API

This user guide only applies if your account and project is on our new platform, i.e. if your project's URL begins with https://<your-account>.xp-dev.com rather than https://xp-dev.com. If your account is on our old platform, you should be using this user guide instead.

Each Wiki Object has the following attributes:

Attribute Description
id Unique Wiki ID
name Wiki name
text Wiki text in Textile
htmlText Wiki text in HTML
project Project ID that the Wiki Page belongs to

List All Wiki Pages

GET request to https://<your-account>.xp-dev.com/api/v1/wikis/project/<project-id>:

curl https://<your-account>.xp-dev.com/api/v1/wikis/project/3

Responses will be a list of Wiki Objects:

[
    {
        "name":"Homepage",
        "id":3,
        "project": {
          "id": 3
        },
        "text":"This is your default project wiki homepage\r\n\r\nFeel free to edit this page and make it your own",
        "htmlText":"<p>This is your default project wiki homepage</p><p>Feel free to edit this page and make it your own</p>"
    },
    ...
]

Create a New Wiki Page

POST request to https://<your-account>.xp-dev.com/api/v1/wikis with the following attributes:

Mandatory:

  • project
  • name
  • text

Example request:

curl -X POST -H 'Content-Type: application/json' -d '{"name":"Homepage","project":{"id":3},"text":"Change Homepage text"}' https://<your-account>.xp-dev.com/api/v1/wikis

Responses will be in the form of a single Wiki Object

Get a Single Wiki Page

GET request to https://<your-account>.xp-dev.com/api/v1/wikis/<wiki-id>. For example:

curl https://<your-account>.xp-dev.com/api/v1/wikis/6

Responses will be in the form of a single Wiki Object

Update a Single Wiki Page

PUT request to https://<your-account>.xp-dev.com/api/v1/wikis/<wiki-id> with the following attributes:

Mandatory:

  • name
  • text

Example request:

curl -X PUT -H 'Content-Type: application/json' -d '{"name":"Homepage","text":"Change Homepage text (again)"}' https://<your-account>.xp-dev.com/api/v1/wikis/6

Responses will be in the form of a single Wikis Object

Delete a Single Wiki Page

DELETE request to https://<your-account>.xp-dev.com/api/v1/wikis/<wiki-id>:

curl -X DELETE https://<your-account>.xp-dev.com/api/v1/wikis/6

Feel free to contact us if you need any assistance.