XP-Dev.com Documentation

Old Wiki Pages API

This user guide only applies if your account and project is on our old platform, i.e. if your project's URL begins with https://xp-dev.com rather than https://<your-account>.xp-dev.com. If your account is on our new 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
textHtml Wiki text in HTML
publicWiki Whether the Wiki is public or not
project Project ID that the Wiki Page belongs to

Note: public Wiki pages allow anyone to read them, including un-authenticated XP-Dev.com users.

List All Wiki Pages

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

curl https://xp-dev.com/api/v1/wikis/project/3

Responses will be a list of Wiki Objects:

{"response":[
    {
        "name":"Homepage",
        "id":3,
        "project":3,
        "publicWiki":false,
        "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://xp-dev.com/api/v1/wikis/ with the following attributes:

Mandatory:

  • project
  • name
  • text
  • publicWiki

Example request:

curl -X POST -H 'Content-Type: application/json' -d '{"name":"Homepage","project":3,"publicWiki":false,"text":"Change Homepage text"}' https://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://xp-dev.com/api/v1/wikis/<wiki-id>. For example:

curl https://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://xp-dev.com/api/v1/wikis/<wiki-id> with the following attributes:

Mandatory:

  • name
  • text
  • publicWiki

Example request:

curl -X PUT -H 'Content-Type: application/json' -d '{"name":"Homepage","publicWiki":true,"text":"Change Homepage text (again)"}' https://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://xp-dev.com/api/v1/wikis/<wiki-id>:

curl -X DELETE https://xp-dev.com/api/v1/wikis/6

Feel free to contact us if you need any assistance.