Support Center

API Customizations

Last Updated: Jun 04, 2015 10:47PM BST

Introduction

The Wikispaces SOAP API is composed of 6 WSDL files. If you are on Wikispaces Private Label, replace www.wikispaces.com with the domain of your Private Label site.
 
Service WSDL Endpoint Details
Authentication http://www.wikispaces.com/site/api?wsdl Used for logging in and getting a session token, prior to other API calls
User http://www.wikispaces.com/user/api?wsdl Used for user creation and management
Space http://www.wikispaces.com/space/api?wsdl Used for space creation and management
Page http://www.wikispaces.com/page/api?wsdl Used for page creation, management, and data retrieval
Tag http://www.wikispaces.com/tag/api?wsdl User for tag creation and management
Message http://www.wikispaces.com/message/api?wsdl Used for message posting, listing and management
 


Authentication

The Authentication Service provides functions for logging in and creating a session for API calls. Sessions expire after 24 hours.

login
Log the user into the application and return a session token to be passed to future API calls.
 
username String The username to log in with
password String The password to log in with
returns String Session Token, expires after 24 hours

becomeUser
Log into a session as a different (non-admin) user. Any changes you make with the session returned from this function will appear to be made by the user you have become; however, we will record your real user id in an additional auditing log. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
username String The username of the user to become
returns String Session Token, expires after 24 hours

User
The User Service provides functions for creating users, manipulating existing user objects, and getting user details.

UserStruct
This is the base user object, which represents an existing user in the system.
 
Property Type Mutable? Description
id int no The unique integer identifier for this user
username string no The unique username for this user. Users log in with this, and it is displayed as their name
posts int no The number of message posts a user has made
edits int no The number of wiki page edits a user has made
auth_source_id int no the id of the authentication source the user is associated with
auth_external_id string no A unique identifier of the user in its authentication source
date_created int no The unix timestamp of the time when the user was created
date_updated int no The unix timestamp of the time when the user was last modified
user_created int no The user ID of the user that created this user
user_updated int no The user ID of the user that last modified this user

ArrayOfUsers
An array of UserStruct objects, returned when user lists are requested.

AuthSourceStruct
This object represents an authentication source users can be associated with in the system.
 
Property Type Mutable? Values Description
id int no   The unique integer identifier for this authentication source
name string no   The name of this authentication source
type string no P = Wikispaces Password
W = Wikispaces SSO
S = SAML
O = OpenID
G = Google Apps
L = LDAP
M = Moodle
T = LTI
The type of this authentication source
status string no A = active
D = disabled
The status of this authentication source

ArrayOfAuthSources
An array of AuthSourceStruct objects, returned when authentication source lists are requested.

Map
Describes a key and a related value.
 
Property Type Mutable? Details
key string no The key of the map entry
value string no The value of the map entry

ArrayOfMaps
An array of Map objects, used as a filter for finders.

getUser
Gets an existing user as a UserStruct by username.
 
session string A valid session token
username string The user's username to search for
returns UserStruct The user object for that username

getUserById
Gets an existing user as a UserStruct by user id.
 
session string A valid session token
userId int The user's id to search for
returns UserStruct The user object for that id

findUsers
Get a list of users that match the given filter. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
filter ArrayOfMaps A filter to apply to the query. The keys of the map entries can be any entry from UserStruct
returns ArrayOfUsers The list of users that match the filter

listUsers
Lists all users. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
returns ArrayOfUsers The list of users

createUser
Creates a new user. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
username string The user's username, which they will be known as and log in with
password string The user's password
email string The user's email address
returns UserStruct The newly created user object

createUserForAuthSource
Creates a new user on the given authentication source. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
username string The user's username, which they will be known as and log in with
password string The user's password
email string The user's email address
authSourceId int The authentication source to create the user on
authExternalId string The user's unique identifier in its authentication source (not used with the Wikispaces Password authentication source)
returns UserStruct The newly created user object

updateUser
Modifies an existing user object. You must be a site administrator to use this function unless the user you are trying to modify is the user you are logged in as. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
user UserStruct The modified user object
returns UserStruct The updated user object

deleteUser
Deletes an existing user. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
userId int The user ID to delete

renameUser
Changes the username for an existing user object. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
oldUsername string The user's current username
newUsername string The new name to rename the user to
returns UserStruct The updated user object

listAuthSources
Lists all authentication sources. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session string A valid session token
returns ArrayOfAuthSources The list of authentication sources

Space
The Space Service provides functions for creating spaces, manipulating existing spaces, listing the members of a space, and getting the details of an existing space.

SpaceStruct
This is the base space object, which contains information about a wiki space.
 
Property Type Mutable? Values Details
id int no   The unique integer identifier for the space.
name String no   The unique name of the space. Appears in the URL as the subdomain, unless the space uses a custom domain.
text String yes   A custom name for the space. Displayed on web pages and used when more appropriate than "name"
description String yes   A custom description of the space.
page_count int no   The number of pages in the space.
status String no   The status of the space
edits int no 0 or null deprecated
image_type String no g = GIF
j = JPEG
p = PNG
null = none
The type of the image that the space logo is.
background_color String yes   The HEX triplet color that the space uses for a background color (If the theme supports it).
highlight_color String yes   The HEX triplet color that the space uses for a highlight color (If the theme supports it).
text_color String yes   The HEX triplet color that the space uses for a text color (If the theme supports it).
link_color String yes   The HEX triplet color that the space uses for a link color (If the theme supports it).
subscription_type String no N = none
C = comp
P = prepay
R = recurring
T = trial
The subscription type for the space.
subscription_level String no F = free
P = plus
S = super
The subscription level for the space.
subscription_end_date int no   the timestamp of the end date of the current subscription.
view_group String yes A = all
L = logged in
M = member
O = organizer
Specifies who can see the space
edit_group String yes Specifies who can edit the space
create_group String yes Specifies who can create pages in the space
message_edit_group String yes Specifies who can post messages in the space
is_crawled boolean yes   Should search engines be allowed to crawl the space.
license String yes   The license that the space content is released under. Can be one of many Creative Commons licenses, GNU-FDL, or "none".
discussions String yes N = none
O = one
P = per page
The discussion settings of the space.
date_created int no   The unix timestamp of the time when the space was created.
date_updated int no   The unix timestamp of the time when the space was last modified.
user_created int no   The user ID of the user that created this space.
user_updated int no   The user ID of the user that last modified this space.

ArrayOfSpaces
An array of SpaceStruct objects, returned when space lists are requested.

TemplateStruct
This is an object representing a template that a space can be created from.
 
Property Type Mutable? Details
id int no The unique integer identifier for the template.
name String no The unique name of the template.
space_id int no The integer identifier for the space that the template will base templated spaces on.

ArrayOfTemplates
An array of TemplateStruct objects, returned when template lists are requested.

MemberStruct
Describes a member of a space.
 
Property Type Mutable? Details
userId int no  
username String no The username that belongs to the space
type String no The access level of the member (M for member, O for organizer)

ArrayOfMembers
An array of MemberStruct objects, returned when member lists are requested.

Map
Describes a key and a related value.
 
Property Type Mutable? Details
key String no The key of the map entry
value String no The value of the map entry

ArrayOfMaps
An array of Map objects, used as a filter for finders.

findSpaces
Get a list of spaces that match the given filter. You must be a site administrator to use this function.
 
session String A valid session token
filter ArrayOfMaps A filter to apply to the query. The keys of the map entries can be any entry from SpaceStruct
returns ArrayOfSpaces The list of spaces that match the filter

listSpaces
Get a list of all spaces. You must be a site administrator to use this function.
 
session String A valid session token
returns ArrayOfSpaces The list of spaces

listUserSpaces
Get a list of spaces that the given user ID is a member of. You must be a site administrator to use this function.
session String A valid session token
userId int The ID of the user
returns ArrayOfSpaces The list of spaces that the user is a member of

listTemplates
Get a list of all templates. You must be a site administrator to use this function.
 
session String A valid session token
returns ArrayOfTemplates The list of templates

getSpace
Get a space object, given its name. You must be a site administrator to use this function.
 
session String A valid session token
name String The space name to fetch
returns SpaceStruct The space with the name provided

createSpace
Creates a new space. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
name String The space name to create (will be the subdomain in the URL)
access_level String The access level of the space ("public", "protected", or "private")
returns SpaceStruct The space that was created

createSpaceFromTemplate
Creates a new space based on a template. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
name String The space name to create (will be the subdomain in the URL)
access_level String The access level of the space ("public", "protected", or "private")
templateId int The ID of the template to base the new space on
returns SpaceStruct The space that was created

updateSpace
Updates an existing space. You must be a space organizer to use this function.This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
space SpaceStruct The modified space object to update
returns SpaceStruct The updated space object

deleteSpace
Marks a space as deleted, so that users cannot access it. You must be a space organizer to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The id of the space to delete
returns boolean If the space was deleted

undeleteSpace
Marks a deleted space as a normally visible space. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The id of the space to restore
returns boolean If the space was restored

renameSpace
Changes the space name to another name. You must be a site administrator to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The ID of the space to rename
newName String The new space name, which cannot be in use by another space
returns boolean If the space was renamed

isMember
Checks to see if a user is a member of the space. You must be able to view the space to use this function.
 
session String A valid session token
spaceId int The id of the space to check
userId int The id of the user to check for
returns boolean If the user is a member

isOrganizer
Checks to see if a user is an organizer of the space. You must be able to view the space to use this function.
 
session String A valid session token
spaceId int The id of the space to check
userId int The id of the user to check for
returns boolean If the user is an organizer

addMember
Add a user to a space as a regular member. You must be a space organizer to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The id of the space to add a member to
userId int The id of the user to add as a member of of the space
returns boolean If the user was added

addOrganizer
Add a user to a space as an organizer. You must be a space organizer to use this function. This function cannot be used with Wikispaces Private Label Original.
session String A valid session token
spaceId int The id of the space to add an organizer to
userId int The id of the user to add as an organizer of of the space
returns boolean If the user was added

removeMember
Removes a user currently in the space as a member. You must be a space organizer to use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The id of the space to remove a member from
userId int The id of the user to remove from the space
returns boolean If the user was removed

listMembers
List all members of a space, allong with their member access level.
 
session String A valid session token
spaceId int The id of the space to list members from
returns ArrayOfMembers An array of MemberStruct objects that represent members of the space

Page
The Page Service provides access to creating wiki pages, editing existing pages, modifying existing page information, and deleting pages.

PageStruct
This is the basic page object, which represents an existing version of a page.
 
Property Type Mutable? Description
id int no The unique integer identifier for this page (which is a collection of versions of the page)
versionId int no
name String no The name of the page, which is unique within the space
spaceId int no The integer id of the space that this page is in
latest_version int no The version id of the latest version of the page
versions int no The number of versions of this page that exist (some pages have 0 versions)
is_read_only boolean no Is the current page locked for editing by organizers only?
comment String yes The change comment of the version of the page
content String yes The un-rendered wikitext content of the version of the page
html String no The renderd HTML content of the version of the page
date_created int no The unix timestamp of the time when this version of the page was created (can be null)
user_created int no The user ID of the user that created this version of the page (can be null)
user_created_username String no The username of hte user that created this version of the page (can be null)

ArrayOfPages
An array of PageStruct objects, used when a list of pages is requested.

getPage
Get a page with the latest version of content. Some pages have no versions created and will not have content. You must have access to view the page to use this function.
 
session String A valid session token
spaceId int The space id of the space the page is in
name String The name of the page in the space
returns PageStruct The page object requested

getPageWithVersion
Get a page with a specific version of the content. You must have access to view the page to use this function.
 
session String A valid session token
spaceId int The space id of the space the page is in
name String The name of the page in the space
version int The version of the page that is requested
returns PageStruct The page object requested with specific version

listPageVersions
Get a list of all page versions of a given page. You must have access to view the page to use this function.
 
session String A valid session token
spaceId int The space id of the space the page is in
name String The name of the page in the space
returns ArrayOfPages An array of PageStruct objects that represent all versions of the page

listPages
Get a list of all pages in a space. You must have access to view the space to use this function.
 
session String A valid session token
spaceId int The space id of the space to list pages in
returns ArrayOfPages An array of PageStructs for all pages in the provided space

updatePage
Saves changes made to an existing page. You must have access to edit the pageto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The space id of the space the page is in
page PageStruct The modified page object to save
returns PageStruct The newly update page object

createPage
Create a new page. You must have access to edit pagesto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The space id of the space to create the page in
name String The name of the page to create, must be unique in the space
content String The wikitext content of the page
comment String A change comment to accompany the new page
returns PageStruct The newly created page object

renamePage
Rename an existing page. You must be a space organizerto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The space id of the space to rename the page in
page PageStruct The page object that will be renamed
new_name String The new name to give the page, must be valid and not in use
returns PageStruct The new page object with the new name

deletePage
Deletes an existing page. You must be a space organizerto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
spaceId int The space id of the space to delete the page in
page PageStruct The page object that will be deleted
returns boolean The result of the delete operation

lockPage
Locks a page. You must be a space organizerto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
pageId int The page id of the page to lock
returns boolean The result of the lock operation

unlockPage
Unlocks a page. You must be a space organizerto use this function. This function cannot be used with Wikispaces Private Label Original.
 
session String A valid session token
pageId int The page id of the page to unlock
returns boolean The result of the unlock operation

Tag
The Tag Service provides access to creating tags on wiki pages, listing pages with tags, and managing tags

TagStruct
This is the basic tag object, which represents a tag associated with a page.
 
Property Type Mutable? Description
id int no The unique integer identifier for this tag
name String no The name of the tag
page_id int no The integer id of the page that this tag is associated with
date_created int no The date that this tag was added to the page
user_created int no The id of the user that added the tag to the page

ArrayOfTags
An array of TagStruct objects, used when a list of tags is requested.

listTagsForPage
Get a list of tags added to the given page. You must have access to view the page to use this function.
 
session String A valid session token
pageId int The page id of the page to list tags for
returns ArrayOfTags The list of tags

createTag
Get a page with a specific version of the content. You must have access to edit the page to use this function.
 
session String A valid session token
pageId int The id of the page to add the tag to
tag String The name of the tag to add to the page
returns TagStruct The tag object that was created

deleteTag
Deletes an existing tag from a page. You must have access to edit the page to use this function, and the tag being deleted must have been created by you.
 
session String A valid session token
pageId int The pageid of the page to remove the tag from
tag String The name of the tag to remove
returns boolean The result of the delete operation

updateTags
Sets the tags for a page. Deletes all other tags on that page and adds the ones provided.
 
session String A valid session token
pageId int The page id of the page to set the tags on
tags Array of strings An array of tag names to add
returns boolean The result of the updateTags operation

Message
The Message Service provides access to creating messages on wiki pages, listing message topics, and managing messages.

MessageStruct
This is the basic message object, which represents an existing message.
 
Property Type Mutable? Description
id int no The unique integer identifier for this tag
subject String no The subject of the message or topic
body String no The body/contents of the message, as wikitext
html String no The rendered HTML of the message body
page_id int no The id of the page that this message is associated with
topic_id int no The id of the message that is at the top level of the thread, representing the topic
responses int no The number of responses to this message, if it is a topic
date_created int no The date that this message was posted
user_created int no The id of the user that posted this message
user_created_username String no The username of the user that posted this message

ArrayOfMessages
An array of MessageStruct objects, used when a list of messages is requested.

listTopics
Get a list of topics (top level messages) for a given page. You must have access to view the page to use this function.
 
session String A valid session token
pageId int The page id of the page to list topics for
returns ArrayOfMessages The list of message topics

listMessagesInTopic
Get a list of messages under a given topic. You must have access to view the page to use this function.
 
session String A valid session token
topicId int The message id of the topic to list messages under
returns ArrayOfMessages The list of messages

createTopic
Create a new topic (message thread) on a page. You must have access to post messages to use this function.
 
session String A valid session token
pageId int The id of the page to add the topic to
subject String The subject of the message topic
body String The message body, in wikitext format
returns MessageStruct The message object that was created

createReply
Create a reply to an existing topic (message thread) on a page. You must have access to post messages to use this function.
session String A valid session token
topicId int The id of the topic to add the message to
subject String The subject of the message
body String The message body, in wikitext format
returns MessageStruct The message object that was created

deleteMessage
Deletes an existing tag from a page. You must be a space organizer to use this function.
session String A valid session token
messageId int The id of the message to delete
returns boolean The result of the delete operation

SOAP Faults
There are common SOAP Faults that can be thrown when errors are encountered:
 
Fault Code Description
Invalid Session 1 The session token provided is invalid or expired, or for a deleted user. Please log in again and generate a new session token
Invalid Login 2 The login provided when generating the session is not valid. Please check the username and password
Insufficient Permissions 3 The authenticated user lacks the permissions necessary to carry out the operation requested
Invalid Object 4 The object requested by name or ID does not exist

Other faults can be generated at other levels of the system and provide their own description of the fault (Often these are input validation issues. The invalid value should be described in the SOAP Fault message).
Fault Code Description
Invalid Email VAL002 Please enter an email address in the form user@domain.com.
Invalid Username VAL003 Your username must be between 3 and 32 letters long. Please use only letters, numbers, hyphens, and underscores, without any spaces.
Invalid Password VAL004 Please enter a password that is at least 6 letters long.
Username Exists USR001 We already have a member with this username
Email Exists USR002 We already have a member with this email address
Restricted Username USR003 You have chosen a restricted username. Please choose a different username.
Disucssion Post Subject Required MSG001 Please enter a message subject
Discussion Post Body Required MSG002 Please enter a message body
Mail Subject Required MAL001 Please enter a message subject
Invalid Mail Recipient MAL005 Some of the addresses you entered were not found, please correct them and click Send
Mail Recipient Required MAL006 Please enter the username of someone you would like to send your mail to
Invalid Wiki Name WKI002 The wiki name entered is not valid
Wiki Page Name Already Exists WKI008 A wiki page with that name already exists in this space
Wiki Page Redirect Loop WKI009 A redirect loop has been detected
Wiki Page Redirect Chain Length Exceeded WKI010 The redirect chain is too long, try making this page point to the final destination, or pages that redirect to this page, point to the new destination
Invalid Search Term IDX005 Invalid search term. A search must contain at least one term to search for.
Invalid Space Name SPC001 A space name must be between 3 and 32 letters long and contain only letters, numbers, and hyphens. It cannot start with a hyphen.
Space Name Reserved SPC002 The space name is reserved, please choose another.
Space Name Exists SPC003 The space name already exists, please choose another.
Invalid Space Theme Color SPC005 Please enter only six letters and numbers for your colors.
Invalid Space View Group SPC006 Invalid group selected for view permission
Invalid Space Edit Group SPC007 Invalid group selected for edit permission.
Invalid License SPC008 Invalid license.
Rename Recurring Space SPC010 Cannot rename a space with a recurring subscription
Domain Name Taken SPC011 The domain name provided is already in use
Invalid Tag TAG001 Tags may only contain letters, numbers, spaces, hyphens, and periods and must be less than 255 characters.
 

Code Examples

If you are on Wikispaces Private Label, replace www.wikispaces.com with the domain of your Private Label site in all code examples.

PHP

PERL


Python


ASP


C#
Project Setup
First, add the following Web References to your project
URL: http://www.wikispaces.com/site/api?wsdl
Name: siteApi
URL: http://www.wikispaces.com/space/api?wsdl
Name: spaceApi
URL: http://www.wikispaces.com/user/api?wsdl
Name: userApi
Library Code Sample
The library code should be compiled into a DLL file and placed in your project's bin directory

API Code Sample

Still have questions? Contact Wikispaces Support.

Contact Us

help@blendspace.com
http://assets0.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete