Specifications/open-collaboration-services-draft

Open Collaboration Services (v1.6 draft1)

Frank Karlitschek MailTo(karlitschek AT kde.org)

Contents

  1. Open Collaboration Services (v1.6 draft1)
    1. Changelog
    2. Purpose
    3. Examples
    4. Naming
    5. Requirements
      1. Performance / Scalability
      2. Security
      3. Privacy
      4. Vendor Independent
    6. Architecture
      1. REST
      2. SSL
      3. Authentication
        1. example login/password
        2. example api key
      4. Proxy
      5. Date Format
      6. Services
      7. Error Reporting
      8. Versioning
      9. Provider files
    7. Service Specifications
      1. CONFIG
        1. config
      2. PERSON
        1. check
        2. add
        3. search
        4. get
        5. get self
        6. edit
        7. balance
        8. get attributes
        9. set attribute
        10. delete attribute
      3. FRIEND
        1. get
        2. received invitations
        3. sent invitations
        4. invite
        5. approve
        6. decline
        7. cancel
      4. MESSAGE
        1. folders
        2. list
        3. get
        4. send
      5. ACTIVITY
        1. get
        2. put
      6. CONTENT
        1. categories
        2. licenses
        3. distributions
        4. dependencies
        5. homepagetypes
        6. list
        7. get
        8. download
        9. vote
        10. add
        11. edit
        12. delete content entry
        13. upload new download file
        14. delete download file
        15. upload preview image
        16. delete preview image
        17. get recommendation
      7. FAN
        1. get
        2. is fan
        3. add
        4. remove
      8. KNOWLEDGEBASE
        1. list
        2. get
        3. add
      9. EVENT
        1. list
        2. get
        3. add
        4. edit
        5. delete event entry
      10. COMMENTS
        1. get
        2. add
        3. vote
      11. PRIVATE DATA
        1. get attributes
        2. set attribute
        3. delete attribute
      12. FORUM
        1. list
        2. topics/list
        3. forum/topics/add
      13. BUILDSERVICE
        1. Projects
          1. create
          2. get
          3. delete
          4. edit
          5. list
          6. upload source
        2. Remote Accounts
          1. list
          2. add
          3. edit
          4. get
          5. remove
        3. Build Services
          1. list
          2. get
        4. Build Jobs
          1. list
          2. create
          3. cancel
          4. get
          5. get output
        5. Publishing
          1. getpublishingcapabilities
          2. get publisher
          3. publish target result
          4. save fields
          5. get fields
      14. ACHIEVEMENTS
        1. Content achievement list
        2. User achievement list
        3. add
        4. edit
        5. remove
        6. set progress
        7. reset progress

Changelog

Differences between 1.5 and 1.6 PERSON:

CONTENT:

COMMENTS:

PRIVATEDATA:

FORUM:

BUILDSERVICE:

Purpose

Integration of web communities and web based services into desktop and mobile applications. free, secure, privacy protected, vendor independent.

Examples

Naming

Requirements

Performance / Scalability

The services should be usable by millions of people at the same time because of that it is important to build the architecture in a scalable way. Every component of the architecture must be cluster enabled. This means that it must be possible to implement every service or component in a server cluster.

Security

The data transfer should be encrypted if possible.

Privacy

It is essential to respect the privacy requirements of the people. Every person must have full control over the personal information.

Vendor Independent

It is important for an application to be independent of a specific websites or services because of that we use independent provider files who map the clients to the service providers For example the KDE project has provider files hosted on the KDE.org server who contains a list of providers who are providing a specific service. So the application maintainer has full control over which content and services are accessed by the application (client)

Architecture

REST

We use REST for the webservices calls. Unlike, for example SOAP, REST is very, lightweight, easy to learn and implement and cachable. REST is very widespread in the internet and is used by other popular webservices. REST support is integrated into various web or desktop frameworks and it is platform and technology independent. The data exchange format is XML. If you add the format=json parameter you can also get the data in JSON format.

SSL

We suggest to use ssl to encrypt the data transfer between client and service providers. Unencrypted data transfer is also possible when a SSL it too expensive or slow.

Authentication

Most services require a authenticated user. This is important for legal reasons and to prevent DOS attacks. At the moment we support autentification via login/password or an API key. You have to get the API key from the service provider We will support OpenID in a later version of the specification.

example login/password

https://frank:password@api.opendesktop.org/v1/activity?page=3

example api key

https://API5142830791365744186814934@api.opendesktop.org/v1/activity?page=3

Proxy

It is possible to implement proxy service provider to integrate other proprietary webservices.

Date Format

All date and time data is in ISO 8601 format.

Services

The applications or websites do not have to support every service. We suggest to implement only the services into the clients or service providers which are useful for the users at this point.

At the moment there are the following services:

Error Reporting

Every response xml contains a "status", "statuscode" and a "message" tag. The status tag has only two possible values. "ok" or "failed". If the status is "failed", you can get a human readable errortext from the "message" tag. Examples of errormessages are: "data is private" or "person not found". You get a machine readable status in the "statuscode" tag. Statuscode 100 means "request sucessful", 999 means "unknown request". All other codes are specific to the called method and described below.

Versioning

We support versioning of the service specifications, so if we break the api in an incompatible way we can use a new version number and still keep the old API for legacy applications(client). Please note that the api is currently in draft state, so it will change in the future.

Provider files

It is important to decouple the applications from the services, so we suggest to use provider files to control the mapping of applications to service providers. If an application wants to access to services it first gets the provider file to get the list of available providers, then it can access the different providers and merge the results. An example provider file:

<providers>

<provider>
 <id>opendesktop</id>
 <location>https://api.opendesktop.org/v1/</location>
 <name>openDesktop.org</name>
 <icon></icon>
 <termsofuse>https://opendesktop.org/terms/</termsofuse>
 <register>https://opendesktop.org/usermanager/new.php</register>
 <services>
   <person ocsversion="1.3" />
   <friend ocsversion="1.3" />
   <message ocsversion="1.3" />
   <activity ocsversion="1.3" />
   <content ocsversion="1.3" />
   <fan ocsversion="1.3" />
   <knowledgebase ocsversion="1.3" />
   <event ocsversion="1.3" />
 </services>
</provider>

<provider>
 <id>testy</id>
 <location>https://api.foo.org</location>
 <name>Foo provider</name>
 <icon></icon>
 <termsofuse>https://foo.org/terms/</termsofuse>
 <register>https://foo.org/register.php</register>
 <services>
   <person ocsversion="1.5" />
   <friend ocsversion="1.3" />
   <message ocsversion="1.3" />
   <knowledgebase ocsversion="1.2" />
   <event ocsversion="1.1" />
 </services>
</provider>

</providers>

The KDE provider file is here: http://download.kde.org/ocs/providers.xml

Service Specifications

CONFIG

config

Get some basic API configuration information

Example: GET https://api.opendesktop.org/v1/config Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <version>1.4</version>
  <website>openDesktop.org</website>
  <host>api.openDesktop.org</host>
  <contact>frank@openDesktop.org</contact>
  <ssl>true</ssl>
 </data>
</ocs>

PERSON

The PERSON service is handling the access to user data. You can search people and access personal data of other people of the person made the information public. The personids are stored and shown case sensitive, but if you want to reference a person the personid is case insensitive.

check

Check if the given login and password or the API key is valid. It returns the associated username.

Example: POST https://api.opendesktop.org/v1/person/check postdata: login="frank" password="123456" Checks if frank,123456 is a valid account. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <person details="check">
   <personid>frank</personid>
  </person>
 </data>
</ocs>

add

Registers a new user account on the server. The users still have to approve the account by clicking on a link in a confirmation email to activate the account. Only alphanumeric characters are allowed and the password has to be 8 characters or longer.

Example: POST https://api.opendesktop.org/v1/person/add postdata: login="frank" password="123456" firstname="Frank" lastname="Karlitschek" email="karlitschek@kde.org" registers a new user account. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

Find a specific list of persons. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header. It is not possible to get a list of more than 1000 people because of privacy issues.

Example: GET https://frank:password@api.opendesktop.org/v1/person/data?name=eter&city=don&description=development&latitude=11.2&longitude=22&distance=0.5&page=2&pagesize=10 Gets the third page of the search result list from the search for person where "eter" is in the nickname, firstname or lastname and "don" is in the city and who is interested in "development" and who lived near latitude:11.2 and longitude:22.0 witch a tolerance of 0.5

Example: <?xml version="1.0"?>

<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <person details="summary">
   <personid>Testy</personid>
   <privacy>0</privacy>
   <privacytext>public</privacytext>
   <firstname>Peter</firstname>
   <lastname>-</lastname>
   <company></company>
   <gender></gender>
   <communityrole></communityrole>
   <city>London</city>
   <country></country>
  </person>
  <person details="summary">
   <personid>peter</personid>
   <privacy>0</privacy>
   <privacytext>public</privacytext>
   <firstname>Frank</firstname>
   <lastname>Test</lastname>
   <company>company</company>
   <gender>male</gender>
   <communityrole></communityrole>
   <city>London</city>
   <country></country>
  </person>
 </data>
</ocs>

get

Get the data from one specific person. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <person details="full">
   <personid>Frank</personid>
   <privacy>1</privacy>
   <privacytext>visible only for registered users</privacytext>
   <firstname>Frank</firstname>
   <lastname>Test</lastname>
   <gender>male</gender>
   <communityrole>developer</communityrole>
   <homepage>opendesktop.org</homepage>
   <company>opendesktop.org</company>
   <avatarpic>https://www.KDE-Look.org/CONTENT/user-pics/0/Frank.jpg</avatarpic>
   <avatarpicfound>1</avatarpicfound>
   <bigavatarpic>https://www.KDE-Look.org/CONTENT/user-bigpics/0/Frank.jpg</bigavatarpic>
   <bigavatarpicfound>1</bigavatarpicfound>
   <birthday>1973-07-25</birthday>
   <jobstatus>working</jobstatus>
   <city>Stuttgart</city>
   <country>Germany</country>
   <latitude></latitude>
   <longitude></longitude>
   <ircnick>karli</ircnick>
   <ircchannels>kde-dev, plasma</ircchannels>
   <irclink>irc://irc.freenode.org/kde-dev</irclink>
   <irclink>irc://irc.freenode.org/plasma</irclink>
   <likes>lot of stuff</likes>
   <dontlikes>nothing</dontlikes>
   <interests>travel</interests>
   <languages>english</languages>
   <programminglanguages>php, c++</programminglanguages>
   <favouritequote></favouritequote>
   <favouritemusic>nin</favouritemusic>
   <favouritetvshows></favouritetvshows>
   <favouritemovies>fightclub</favouritemovies>
   <favouritebooks></favouritebooks>
   <favouritegames>ut3</favouritegames>
   <description></description>
   <profilepage>https://www.KDE-Look.org/usermanager/search.php?username=Frank</profilepage>
  </person>
 </data>
</ocs>

get self

Get the data from yourself. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <person details="full">
   <personid>Frank</personid>
   <privacy>1</privacy>
   <privacytext>visible only for registered users</privacytext>
   <firstname>Frank</firstname>
   <lastname>Test</lastname>
   <gender>male</gender>
   <communityrole>developer</communityrole>
   <homepage>opendesktop.org</homepage>
   <company>opendesktop.org</company>
   <avatarpic>https://www.KDE-Look.org/CONTENT/user-pics/0/Frank.jpg</avatarpic>
   <avatarpicfound>1</avatarpicfound>
   <bigavatarpic>https://www.KDE-Look.org/CONTENT/user-bigpics/0/Frank.jpg</bigavatarpic>
   <bigavatarpicfound>1</bigavatarpicfound>
   <birthday>1973-07-25</birthday>
   <jobstatus>working</jobstatus>
   <city>Stuttgart</city>
   <country>Germany</country>
   <latitude></latitude>
   <longitude></longitude>
   <ircnick>karli</ircnick>
   <ircchannels>kde-dev, plasma</ircchannels>
   <irclink>irc://irc.freenode.org/kde-dev</irclink>
   <irclink>irc://irc.freenode.org/plasma</irclink>
   <likes>lot of stuff</likes>
   <dontlikes>nothing</dontlikes>
   <interests>travel</interests>
   <languages>english</languages>
   <programminglanguages>php, c++</programminglanguages>
   <favouritequote></favouritequote>
   <favouritemusic>nin</favouritemusic>
   <favouritetvshows></favouritetvshows>
   <favouritemovies>fightclub</favouritemovies>
   <favouritebooks></favouritebooks>
   <favouritegames>ut3</favouritegames>
   <description></description>
   <profilepage>https://www.KDE-Look.org/usermanager/search.php?username=Frank</profilepage>
  </person>
 </data>
</ocs>

edit

Update the latitude, longitude, city and country of myself. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/person/self postdata: longitude="1.23" latitude="3.45" Updated my position to 1.23 and 3.45 Example:

<?xml version="1.0"?>
<ocs>
 <meta>
   <status>ok</status>
   <statuscode>100</statuscode>
   <message></message>
 </meta>
</ocs>

balance

Get the account balance of a user.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <person details="balance">
   <currency>USD</currency>
   <balance>1.49</balance>
  </person>
 </data>
</ocs>

get attributes

Gets the list of extended attributes of a person. You can store several attributes to your person record which are publicly readable for everybody. The attributes are key/value pairs with an "app" parameter as namespace. Store data which is only interesting for your application with your application name as an app namespace. If the data is of general interest use "global" as app parameter. The parameter "app" and "key" are optional in the url. So you access all the attributes from the person or only the attributes from a specific application or the only the value of one specific key. You can search for users which have specific attributes with the search method. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/person/attributes/fregl/parley/language Get the value of the key language of the application parley from the user fregl. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>1</totalitems>
 </meta>
 <data>
  <attribute>
   <app>parley</app>
   <key>language</key>
   <value>english, german</value>
   <lastmodified>2007-11-01T22:45:20+01:00</lastmodified>
  </attribute>
 </data>
</ocs>

set attribute

Set an attribute of a person. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/person/setattribute/parley/language postdata: value="italian" Set the value of the key "language" of the application "parley" to "italian". Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

delete attribute

Delete an attribute of a person. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/person/deleteattribute/parley/language Delete the attribute with the key "language" and the application "parley". Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

FRIEND

The FRIEND service is for handling friendship relations between people. You can get the friends of a specific person or from yourself. You can invite other persons as a friend and manage the invitations.

get

Gets the list of friends from a person. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/friend/data/foobar?pagesize=10&page=1 Gets the second page of friends of the person "foobar" Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>3</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <user details="id">
   <personid>cornelius</personid>
  </user>
  <user details="id">
   <personid>dave</personid>
  </user>
  <user details="id">
   <personid>fen</personid>
  </user>
 </data>
</ocs>

received invitations

Gets the list of friendship invitations. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/friend/receivedinvitations?page=1 Gets the second page of my received invitations. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>1</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <user details="id">
   <personid>testy</personid>
  </user>
 </data>
</ocs>

sent invitations

Gets the list of sent friendship invitations. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/friend/sentinvitations?page=1 Gets the second page of my sent invitations. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>1</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <user details="id">
   <personid>testy</personid>
  </user>
 </data>
</ocs>

invite

Invite a person to become a friend. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/friend/invite/foobar/ postdata: message="hi. how are you?" Invites the person "foobar" and send him a message "hi. how are you?" Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

approve

Approve a friendship request. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/friend/approve/foobar/ Approve the invitation from the user "foobar" Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

decline

Decline a friendship request. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/friend/decline/foobar/ Decline the invitation from the user "foobar" Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

cancel

Cancel a friendship with a user. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/friend/cancel/foobar/ Cancel the friendship with the user "foobar" Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

MESSAGE

The MESSAGE services can be used to send and receive messages. This is always possible even if you do not know the real email address of the other person. The messages are stored in different folders. If you want to access a special folder like for example the inbox you should search in the folders list for a folder with the type "inbox" to get the right folder id.

folders

Gets a list of the availabe message folders. You need the ids if you want to access the folders via messagelist. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>4</totalitems>
 </meta>
 <data>
  <folder>
   <id>0</id>
   <name>inbox</name>
   <messagecount>27</messagecount>
   <type>inbox</type>
  </folder>
  <folder>
   <id>1</id>
   <name>send</name>
   <messagecount>9</messagecount>
   <type>send</type>
  </folder>
  <folder>
   <id>2</id>
   <name>trash</name>
   <messagecount>0</messagecount>
   <type>trash</type>
  </folder>
  <folder>
   <id>3</id>
   <name>archive</name>
   <messagecount>0</messagecount>
   <type></type>
  </folder>
 </data>
</ocs>

list

Gets the list of messages from a specific folder. The messages are sorted in chronological order. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/message/1?page=2&pagesize=10 Gets the third page of messages from the folder with the id 1 of person "frank". firstname, lastname and profilepage are from the sender of the message. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <message details="full">
   <id>8490</id>
   <messagefrom>testy</messagefrom>
   <firstname>Frank</firstname>
   <lastname>Karlitschek</lastname>
   <profilepage>https://www.opendesktop.org/usermanager/search.php?username=Frank</profilepage>
   <messageto>Frank</messageto>
   <senddate>2008-08-10T16:03:59+02:00</senddate>
   <status>1</status>
   <statustext></statustext>
   <subject>test message</subject>
   <body>Sorry for bothering but did you ...</body>
  </message>
  <message details="full">
   <id>8491</id>
   <messagefrom>testy1</messagefrom>
   <firstname>Testy</firstname>
   <lastname>TTT</lastname>
   <profilepage>https://www.opendesktop.org/usermanager/search.php?username=testy1</profilepage>
   <messageto>Frank1</messageto>
   <senddate>2008-08-12T16:03:59+02:00</senddate>
   <status>1</status>
   <statustext></statustext>
   <subject>test message</subject>
   <body>Testy 2 ...</body>
  </message>
 </data>
</ocs>

get

Get a message. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header. The message will be marked as "read" if you access it with this method.

Example: GET https://frank:password@api.opendesktop.org/v1/message/1/42 Get the message with the id 42 in the folder 1. firstname, lastname and profilepage are from the sender of the message. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <message details="full">
   <id>8490</id>
   <messagefrom>testy</messagefrom>
   <firstname>Test</firstname>
   <lastname>TTT</lastname>
   <profilepage>https://www.opendesktop.org/usermanager/search.php?username=testy</profilepage>
   <messageto>Frank</messageto>
   <senddate>2008-08-10T16:03:59+02:00</senddate>
   <status>1</status>
   <statustext></statustext>
   <subject>test message</subject>
   <body>Sorry for bothering but did you ...</body>
  </message>
 </data>
</ocs>

send

Send a message. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

ACTIVITY

You can use the ACTIVITY services to see what is going on in your friends network. For example who visited you homepage, who has sent you a message and who uploaded a new content to the website. You can also post a microblogging message which is visible on you profile page and in the activities of your friends. The entries are sorted by timestamp.

get

Gets the list of activities. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <activity details="full">
   <id>42</id>
   <personid>testy2</personid>
   <firstname>Test</firstname>
   <lastname>Te</lastname>
   <profilepage>/usermanager/search.php?username=testy2</profilepage>
   <avatarpic>https://www.opendesktop.org/usermanager/nopic.png</avatarpic>
   <timestamp>2008-08-01T20:30:19+02:00</timestamp>
   <type>6</type>
   <message>testy2 has updated: &quot;Extract And Compress&quot;</message>
   <link>https://www.KDE-Look.org/content/show.php?content=84206</link>
  </activity>
  <activity details="full">
   <id>43</id>
   <personid>foobar2</personid>
   <firstname>Foo</firstname>
   <lastname>Bar</lastname>
   <profilepage>/usermanager/search.php?username=foobar2</profilepage>
   <avatarpic>https://www.opendesktop.org/usermanager/nopic.png</avatarpic>
   <timestamp>2008-08-02T19:38:10+02:00</timestamp>
   <type>6</type>
   <message>foobar2 has updated: &quot;Arezzo&quot;</message>
   <link>https://www.KDE-Look.org/content/show.php?content=84403</link>
  </activity>
 </data>
</ocs>

put

Updates your activities. This is microblogging like Twitter. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

CONTENT

categories

Get a list of all available content categories.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>4</totalitems>
 </meta>
 <data>
  <category>
   <id>1</id>
   <name>KDE Wallpaper 640x480</name>
  </category>
  <category>
   <id>2</id>
   <name>KDE Wallpaper 800x600</name>
  </category>
  <category>
   <id>3</id>
   <name>KDE Wallpaper 1024x768</name>
  </category>
  <category>
   <id>4</id>
   <name>KDE Wallpaper 1280x1024</name>
  </category>
 </data>
</ocs>

licenses

Get a list of all possible licenses. The IDs can be alphanumeric. The IDs should follow "liblicense" if possible.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>17</totalitems>
 </meta>
 <data>
  <license>
   <id>1000</id>
   <name></name>
   <link></link>
  </license>
  <license>
   <id>3</id>
   <name>Artistic 2.0</name>
   <link>https://dev.perl.org/perl6/rfc/346.html</link>
  </license>
  <license>
   <id>6</id>
   <name>BSD</name>
   <link>https://www.opensource.org/licenses/bsd-license.php</link>
  </license>
 </data>
</ocs>

distributions

Get a list of all possible distributions. The IDs can be alphanumeric.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>23</totalitems>
 </meta>
 <data>
  <distribution>
   <id>0</id>
   <name></name>
  </distribution>
  <distribution>
   <id>2200</id>
   <name>Arch</name>
  </distribution>
  <distribution>
   <id>2000</id>
   <name>Ark</name>
  </distribution>
  <distribution>
   <id>1100</id>
   <name>Debian</name>
  </distribution>
 </data>
</ocs>

dependencies

Get a list of all possible dependencies.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>36</totalitems>
 </meta>
 <data>
  <dependtypes>
   <id>0</id>
   <name></name>
  </dependtypes>
  <dependtypes>
   <id>30</id>
   <name>GNOME 1.x</name>
  </dependtypes>
  <dependtypes>
   <id>31</id>
   <name>GNOME 2.x</name>
  </dependtypes>
  <dependtypes>
   <id>20</id>
   <name>GTK 1.x</name>
  </dependtypes>
 </data>
</ocs>

homepagetypes

Get a list of all possible homepagetypes.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>14</totalitems>
 </meta>
 <data>
  <homepagetypes>
   <id>0</id>
   <name>&amp;nbsp;</name>
  </homepagetypes>
  <homepagetypes>
   <id>10</id>
   <name>Blog</name>
  </homepagetypes>
  <homepagetypes>
   <id>20</id>
   <name>Facebook</name>
  </homepagetypes>
 </data>
</ocs>

list

Gets a list of a specific set of contents.

Example:

<?xml version="1.0"?>

<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <content details="summary">
   <id>1420</id>
   <name>name</name>
   <version>11122</version>
   <changed>2007-11-24T22:41:08+01:00</changed>
   <created>2007-11-01T22:28:24+01:00</created>
   <typeid>6</typeid>
   <typename>KDE Wallpaper (other)</typename>
   <language></language>
   <personid>Frank</personid>
   <profilepage>https://www.opendesktop.org/usermanager/search.php?username=Frank</profilepage>
   <downloads>5</downloads>
   <score>50</score>
   <comments>0</comments>
   <preview1>https://www.KDE-Look.org/content/preview.php?preview=1&amp;id=1420&amp;file1=1420-1.png&amp;file2=1420-2.png&amp;file3=&amp;name=nameeee</preview1>
   <previewpic1>https://www.KDE-Look.org/CONTENT/content-pre1/1420-1.png</previewpic1>
  </content>
  <content details="summary">
   <id>1422</id>
   <name>testy2</name>
   <version>11</version>
   <summary>this is a short summary</summary>
   <changed>2007-11-01T22:45:20+01:00</changed>
   <created>2007-11-01T22:43:21+01:00</created>
   <typeid>7</typeid>
   <typename>KDE Wallpaper (SVG)</typename>
   <language></language>
   <personid>Frank</personid>
   <downloads>8</downloads>
   <score>50</score>
   <comments>0</comments>
   <preview1>https://www.KDE-Look.org/content/preview.php?preview=1&amp;id=1422&amp;file1=1422-1.jpg&amp;file2=1422-2.png&amp;file3=1422-3.png&amp;name=vdfdds222</preview1>
   <previewpic1>https://www.KDE-Look.org/CONTENT/content-pre1/1422-1.jpg</previewpic1>  
   <icon width="16" height="16">https://www.KDE-Look.org/img/icon1.png</icon>     
   <icon width="32" height="32">https://www.KDE-Look.org/img/icon2.png</icon>     
   <icon width="64" height="64">https://www.KDE-Look.org/img/icon2.png</icon>     
   <smallpreviewpic1>https://www.KDE-Look.org/CONTENT/content-m1/m1421-1.png</smallpreviewpic1>
   <downloadway1>1</downloadway1>
   <downloadtype1>Fedora</downloadtype1>
   <downloadprice1>2.99</downloadprice1>
   <downloadlink1>https://www.opendesktop.org/content/buy.php?content=1422&amp;id=1</downloadlink1>
   <downloadname1>pay item 1</downloadname1>
   <downloadsize1>2</downloadsize1>
   <downloadgpgsignature1></downloadgpgsignature1>
   <downloadgpgfingerprint1></downloadgpgfingerprint1>
   <downloadtype2>Ubuntu </downloadtype2>
   <downloadprice2>0</downloadprice2>
   <downloadlink2>https://www.opendesktop.org/content/download.php?content=1422&amp;id=2</downloadlink2>
   <downloadname2>free download</downloadname2>
   <downloadgpgsignature2></downloadgpgsignature2>
   <downloadgpgfingerprint2></downloadgpgfingerprint2>
   <downloadtype3>SUSE </downloadtype3>
   <downloadprice3>0</downloadprice3>
   <downloadlink3>https://www.opendesktop.org/content/download.php?content=1422&amp;id=3</downloadlink3>
   <downloadname3>free item</downloadname3>
   <downloadgpgsignature3></downloadgpgsignature3>
   <downloadgpgfingerprint3></downloadgpgfingerprint3>
   <detailpage>https://www.KDE-Look.org/content/show.php?content=100</detailpage>
  </content>
 </data>
</ocs>

get

Read content data of one specific content.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <content details="full">
   <id>100</id>
   <name>GradE8</name>
   <version></version>
   <typeid>10</typeid>
   <typename>Theme/Style for KDE 2.1</typename>
   <language></language>
   <personid>Hans</personid>
   <created>2001-09-28T18:45:40+02:00</created>
   <changed>2001-09-28T18:45:40+02:00</changed>
   <downloads>2</downloads>
   <score>67</score>
   <description>This is my first KDE 2.0 theme. It is not the final version, I must add some icons etc...</description>
   <summary>this is a short summary</summary>
   <changelog></changelog>
   <feedbackurl>https://openDesktop.org/feedback</feedbackurl>
   <homepage>https://en.wikipedia.org/foo111</homepage>
   <homepagetype>Wikipedia</homepagetype>
   <homepage2></homepage2>
   <homepagetype2></homepagetype2>
   <homepage3>https://myhomepage.com</homepage3>
   <homepagetype3>Blog</homepagetype3>
   <homepage4></homepage4>
   <homepagetype4></homepagetype4>
   <homepage5></homepage5>
   <homepagetype5></homepagetype5>
   <homepage6></homepage6>
   <homepagetype6></homepagetype6>
   <homepage7></homepage7>
   <homepagetype7></homepagetype7>
   <homepage8></homepage8>
   <homepagetype8></homepagetype8>
   <homepage9></homepage9>
   <homepagetype9></homepagetype9>
   <homepage10></homepage10>
   <homepagetype10></homepagetype10>
   <donationpage>https://www.opendesktop.org/content/donation.php?content=123</donationpage>
   <comments>0</comments>
   <commentspage>https://www.opendesktop.org/content/show.php?content=100</commentspage>
   <fans>22</fans>
   <fanspage>https://www.opendesktop.org/content/show.php?action=fan&amp;content=100</fanspage>
   <knowledgebaseentries>7</knowledgebaseentries>
   <knowledgebasepage>https://www.opendesktop.org/content/show.php?action=knowledgebase&amp;content=100</knowledgebasepage>
   <depend></depend>
   <preview1>https://www.KDE-Look.org/content/preview.php?preview=1&amp;id=100&amp;file1=100-1.jpg&amp;file2=&amp;file3=&amp;name=GradE8</preview1>
   <preview2></preview2>
   <preview3></preview3>
   <previewpic1>https://www.KDE-Look.org/CONTENT/content-pre1/100-1.jpg</previewpic1>
   <previewpic2></previewpic2>
   <previewpic3></previewpic3>
   <smallpreviewpic1>https://www.KDE-Look.org/CONTENT/content-m1/m100-1.png</smallpreviewpic1>
   <smallpreviewpic2></smallpreviewpic2>
   <smallpreviewpic3></smallpreviewpic3>
   <icon width="16" height="16">https://www.KDE-Look.org/img/icon1.png</icon>     
   <icon width="32" height="32">https://www.KDE-Look.org/img/icon2.png</icon>     
   <icon width="64" height="64">https://www.KDE-Look.org/img/icon2.png</icon> 
   <video>https://www.KDE-Look.org/video/video1.mpg</video> 
   <video>https://www.KDE-Look.org/video/video2.mpg</video> 
   <video>https://www.KDE-Look.org/video/video3.mpg</video> 
   <detailpage>https://www.KDE-Look.org/content/show.php?content=100</detailpage>
   <downloadway1>1</downloadway1>
   <downloadtype1>Fedora </downloadtype1>
   <downloadprice1>0</downloadprice1>
   <downloadlink1>https://www.opendesktop.org/content/download.php?content=1423&amp;id=2</downloadlink1>
   <downloadname1>gdfgd22</downloadname1>
   <downloadsize1>2</downloadsize1>
   <downloadgpgfingerprint1>6AD9 150F D8CC 941B 4541  2DCC 68B7 AB89 5754 8D2D</downloadgpgfingerprint1>
   <downloadgpgsignature1>iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy</downloadgpgsignature1>
   <downloadpackagename1>packname</downloadpackagename1>
   <downloadrepository1>repo</downloadrepository1>
   <downloadtype2>Fedora </downloadtype2>
   <downloadprice2>2.99</downloadprice2>
   <downloadlink2>https://www.opendesktop.org/content/buy.php?content=1423&amp;id=1</downloadlink2>
   <downloadname2>gdgg22</downloadname2>
   <downloadgpgfingerprint2>6AD9 150F D8CC 941B 4541  2DCC 68B7 AB89 5754 8D2D</downloadgpgfingerprint2>
   <downloadgpgsignature2>iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy</downloadgpgsignature2>
   <downloadpackagename2>packname</downloadpackagename2>
   <downloadrepository2>repo</downloadrepository2>
  </content>
 </data>
</ocs>

download

Download or buy one specific content item. Links to the package and links to repositories are supported. You get the downloadlink or the packagename/packagerepository combination in the XML.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <content details="download">
   <downloadway>0</downloadway>
   <downloadlink>https://www......tar.gz</downloadlink>
   <mimetype>image/jpeg</mimetype>
   <packagename>glibc-2.10.1-10.4.i686.rpm</packagename>
   <packagerepository>https://download.opensuse.org/distribution/11.2/repo/oss/</packagerepository>
   <gpgfingerprint>6AD9 150F D8CC 941B 4541  2DCC 68B7 AB89 5754 8D2D</gpgfingerprint>
   <gpgsignature>iEYEABECAAYFAkxT52oACgkQMNASEGDVgdegPAbDSMHn/xDQCfSplogMr9x0G0ZNqMUAn3WLVmXADVzWdEToTJ8B5wpdm3zb=A6Dy</gpgsignature>
  </content>
 </data>
</ocs>

vote

Vote for one specific content.

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

add

Add a new content entry:

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <content>
   <id>1234567</id>
  </content>
 </data>
</ocs>

edit

Edit a content entry:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

delete content entry

Delete a content entry:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

upload new download file

Upload a new download file to a content:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

delete download file

Delete the download file from a content:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

upload preview image

Upload a new preview image for a content:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

delete preview image

Delete a preview image from a content:

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

get recommendation

Gets a list of cross selling for a contentid

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <content details="basic">
   <id>1422</id>
  </content>
  <content details="basic">
   <id>1223344</id>
  </content>
 </data>
</ocs>

FAN

get

Gets a list of fans of a specific content entries. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <person details="fans">
   <personid>Frank</personid>
   <timestamp>2009-08-18T10:40:09+02:00</timestamp>
  </person>
  <person details="fans">
   <personid>Test</personid>
   <timestamp>2009-07-18T11:41:15+02:00</timestamp>
  </person>
 </data>
</ocs>

is fan

Check if the current user is fan of a specific content. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <status>fan</status>
 </data>
</ocs>

add

Become a fan of a specific content. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

remove

Remove the user from the fans list of a specific content. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

KNOWLEDGEBASE

list

Gets a list of a specific set of knowledgebase entries. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <content details="detail">
   <id>1</id>
   <status>not answered</status>
   <contentid>12345</contentid>
   <category>Application</category>
   <user>testy</user>
   <changed>2009-02-07T23:14:11+01:00</changed>
   <name>app question</name>
   <description>How can I ........</description>
   <answer></answer>
   <answeruser>testy2</answeruser>
   <comments>0</comments>
   <detailpage>https://www.opendesktop.org/content/show.php?action=knowledgebase&amp;content=11&amp;kbid=12345</detailpage>
  </content>
  <content details="detail">>
   <id>2</id>
   <status>answered</status>
   <contentid>12345</contentid>
   <category>other</category>
   <user>testy</user>
   <changed>2009-02-03T21:11:01+01:00</changed>
   <name>app question 22</name>
   <description>How can I 22........</description>
   <answeruser>testy2</answeruser>
   <answer></answer>
   <comments>0</comments>
   <detailpage>https://www.opendesktop.org/content/show.php?action=knowledgebase&amp;content=11&amp;kbid=12</detailpage>
  </content>
 </data>

get

Read one specific knowledgebase entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <knowledgebase>
   <id>1</id>
   <status>not answered</status>
   <contentid>12345</contentid>
   <category>Application</category>
   <user>testy</user>
   <changed>2009-02-07T23:14:11+01:00</changed>
   <name>app question</name>
   <description>How can I ........</description>
   <answeruser>testy2</answeruser>
   <answer></answer>
   <comments>0</comments>
   <detailpage>https://www.opendesktop.org/content/show.php?action=knowledgebase&amp;content=11&amp;kbid=12345</detailpage>
  </knowledgebase>
 </data>
</ocs>

add

Add one specific knowledgebase entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
<meta>
 <status>ok</status>
 <statuscode>100</statuscode>
 <message></message>
</meta>
</ocs>

EVENT

list

Gets a list of a specific set of events. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>2</totalitems>
  <itemsperpage>10</itemsperpage>
 </meta>
 <data>
  <event details="detail">
   <id>4</id>
   <name>Test Party</name>
   <category>Party</category>
   <startdate>2010-08-02T00:00:00+02:00</startdate>
   <enddate>2011-10-03T00:00:00+02:00</enddate>
   <user>Frank</user>
   <city>Stuttgart</city>
   <country>Germany</country>
   <longitude>9.183</longitude>
   <latitude>48.767</latitude>
   <changed>2009-05-18T14:03:55+02:00</changed>
   <comments>2</comments>
   <participants>2</participants>
   <badge></badge>
   <detailpage>https://www.opendesktop.org/events/?id=4</detailpage>
  </event>
  <event details="detail">
   <id>3</id>
   <name>Another Party</name>
   <category>Party</category>
   <startdate>1979-01-01T01:00:01+01:00</startdate>
   <enddate>1979-01-01T01:00:01+01:00</enddate>
   <user>Frank</user>
   <city>Stuttgart</city>
   <country>Germany</country>
   <longitude>1.2</longitude>
   <latitude>1.1</latitude>
   <changed>2009-05-16T00:25:31+02:00</changed>
   <comments>0</comments>
   <participants>1</participants>
   <badge></badge>
   <detailpage>https://www.opendesktop.org/events/?id=3</detailpage>
  </event>
 </data>
</ocs>

get

Read one specific event entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <event>
   <id>6</id>
   <name>bbb</name>
   <description>here is the description text</description>
   <category>Party</category>
   <startdate>1970-01-01T00:00:00+01:00</startdate>
   <enddate>1970-01-01T00:00:00+01:00</enddate>
   <user>Frank</user>
   <organizer></organizer>
   <location></location>
   <city></city>
   <country>Germany</country>
   <longitude>0</longitude>
   <latitude>0</latitude>
   <homepage></homepage>
   <tel></tel>
   <fax></fax>
   <email></email>
   <changed>2009-05-18T18:49:15+02:00</changed>
   <comments>1</comments>
   <participants>2</participants>
   <detailpage>https://www.opendesktop.org/events/?id=6</detailpage>
   <badge>https://www.opendesktop.org/CONTENT/event-badge/0/6.png</badge>
   <image></image>
  </event>
 </data>
</ocs>

add

Add a new event entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <event>
   <id>1234567</id>
  </event>
 </data>
</ocs>

edit

Edit an event entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

delete event entry

Delete an event entry. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <status>ok</status>
 <message></message>
</ocs>

COMMENTS

get

Gets a list of comments.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <comment>
   <id>234</id>
   <subject>vfvvdsx</subject>
   <text>vdxvvsx</text>
   <childcount>0</childcount>
   <user>test</user>
   <date>2005-01-29T18:58:40+01:00</date>
   <score>50</score>
  </comment>
  <comment>
   <id>235</id>
   <subject>vxvdfvd</subject>
   <text>gfdgfdgfgfgf
   </text>
   <childcount>1</childcount>
   <user>test</user>
   <date>2005-01-29T19:17:06+01:00</date>
   <score>60</score>
   <children>
    <comment>
     <id>315</id>
     <subject>Re: jjjjjjjjjjjjjjj</subject>
     <text>gfdg</text>
     <childcount>0</childcount>
     <user>Frank</user>
     <date>2007-03-13T21:34:43+01:00</date>
     <score>40</score>
    </comment>
   </children>
  </comment>
 </data>
</ocs>

add

Add a comment. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

vote

Vote for one specific comment. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
 <data>
  <comment>
   <id>1234567</id>
  </comment>
 </data>
</ocs>

PRIVATE DATA

get attributes

Gets the list of my personal extended attributes. You can store several attributes which are only readable to me. The attributes are key/value pairs with an "app" parameter as namespace. Store data which is only interesting for your application with your application name as a app namespace. If the data is of general interest use "global" as app parameter. The parameter "app" and "key" are optional in the url. So you access all the attributes from yourself or only the attributes from a specific application or the only the value of one specific key. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/privatedata/getattribute/parley/language Get the value of the key language of the application parley from myself. Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
  <totalitems>1</totalitems>
 </meta>
 <data>
  <attribute>
   <app>parley</app>
   <key>language</key>
   <value>english, german</value>
   <lastmodified>2007-11-01T22:45:20+01:00</lastmodified>
  </attribute>
 </data>
</ocs>

set attribute

Set an attribute. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/privatedata/setattribute/parley/language postdata: value="italian" Set the value of the key "language" of the application "parley" to "italian". Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

delete attribute

Delete an attribute. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/privatedata/deleteattribute/parley/language Delete the attribute with the key "language" and the application "parley". Example:

<?xml version="1.0"?>
<ocs>
 <meta>
  <status>ok</status>
  <statuscode>100</statuscode>
  <message></message>
 </meta>
</ocs>

FORUM

list

Gets a list of forums.

Example: https://frank:password@api.opendesktop.org/v1/forums/data&page=1&pagesize=10 Gets the second page of the list of forums. The pagesize is 10

Example:

<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message></message>
</meta>
<data>
<forum>
 <id>234</id>
 <name>vfvvdsx</name>
 <description>test</description>
 <date>2005-01-29T18:58:40+01:00</date>
 <icon>https://forum.example.org/images/forum-img.png</icon>
 <childcount>0</childcount>
 <children></children>
 <topics>123</topics>
</forum>
<forum>
 <id>876</id>
 <name>yheweq</name>
 <description>foobar</description>
 <date>2005-01-29T18:58:40+01:00</date>
 <icon>https://forum.example.org/img/forum-icon.gif</icon>
 <childcount>1</childcount>
 <children>
    <forum>
      <id>234</id>
      <name>cameras</name>
      <description>new forum</description>
      <date>2005-01-29T18:58:40+01:00</date>
      <icon>https://forum.example.org/images/icon.jpg</icon>
      <childcount>0</childcount>
      <children></children>
      <topics>5</topics>
    </forum>
 </children>
 <topics>789</topics>
</forum>
</data>
</ocs>

topics/list

Gets a list of a specific set of topics.

Example: https://frank:password@api.opendesktop.org/v1/forum/topics/list?forum[]=123&search=foo&sortmode=new&page=1 Gets the second page of the list of the newest topics from forum 123 with the string foo in the subject, content or the comment. Additional forums can be specified to be searched by adding further &forum[]= entries to the request.

Example:

<?xml version="1.0"?>
<ocs>
<meta>
 <status>ok</status>
 <statuscode>100</statuscode>
 <message></message>
 <totalitems>2</totalitems>
 <itemsperpage>10</itemsperpage>
</meta>
<data>
 <topic details="detail">
  <id>1</id>
  <forumid>123</forumid>
  <user>testy</user>
  <changed>2009-02-07T23:14:11+01:00</changed>
  <subject>Random forum post</subject>
  <content>Just testing</content>
  <comments>0</comments>
 </topic>
</data>

forum/topics/add

Add a new topic to a forum. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header. All arguments are mandatory.

Example: https://frank:password@api.opendesktop.org/v1/forum/topic/add

Example:

<?xml version="1.0"?>
<ocs>
<meta>
<status>ok</status>
<statuscode>100</statuscode>
<message></message>
</meta>
</ocs>

BUILDSERVICE

The build service module handles a user's access to build services, used to create distribution packages for the platforms supported by those services, and afterwards distribute to distribution sites which support the package formats produced by these various services.

Projects

create

Create a new project for the authorized user, optionally inserting information into the project. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/project/create postdata: name="A Project" developers[0][name]="Frank Karlitschek" developers[0][url]="mailto:karlitschek@kde.org" developers[1][name]="Dan jensen" developers[1][url]="mailto:admin@leinir.dk"

This creates a new project and inserts the two listed developers as information on the project.

Example:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <projectid>122</projectid>
  </data>
</ocs>

get

Get all information for a specified project. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/project/get/122

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <project>
      <projectid>122</projectid>
      <name>A Project</name>
      <version>1.0pre1</version>
      <license>Creative Commons Attribution Share-Alike 2.0</license>
      <url>https://somesite.com/</url>
      <developers>Frank Karlitschek &lt;karlitschek@kde.org&gt;
Dan Jensen &lt;admin@leinir.dk&gt;</developers>
      <summary>A neat little project which does something</summary>
      <description>A long description of the project
      
which even cleverly includes multiple lines</description>
      <requirements></requirements>
      <specfile>#
# spec file for package a-project
#
# Copyright (C) 2010 Frank Karlitschek (mailto:karlitschek@kde.org)
# Copyright (C) 2010 Dan Jensen (mailto:admin@leinir.dk)
#

Name: a-project
Summary: A neat little project which does something

Version: 1.0pre1
Release: 0
License: Creative Commons Attribution Share-Alike 2.0
Url: https://somesite.com/
BuildRoot: /var/tmp/%name-root
Source: a-project-1.0pre1.tar.bz2

%description
A long description of the project
      
which even cleverly includes multiple lines

(etc etc...)</specfile>
    </project>
  </data>
</ocs>

delete

Delete a specific project and the uploaded source files. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/project/delete/122

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

edit

Set any of the values found on a project. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/project/edit/122 postdata: name="A Project" summary="A neat little project which does something"

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

list

List all projects for the currently authorized user. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/project/list

This might yield the following XML output (where the user has exactly one project):

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <projectlist>
      <project>
        <projectid>122</projectid>
        <name>A Project</name>
        <version>1.0pre1</version>
        <license>Creative Commons Attribution Share-Alike 2.0</license>
        <url>https://somesite.com/</url>
        <developers>Frank Karlitschek &lt;karlitschek@kde.org&gt;
Dan Jensen &lt;admin@leinir.dk&gt;</developers>
        <summary>A neat little project which does something</summary>
        <description>A long description of the project
      
which even cleverly includes multiple lines</description>
        <requirements></requirements>
        <specfile></specfile>
      </project>
    </projectlist>
  </data>
</ocs>

upload source

Upload a new source bundle (a compressed file in .zip, .tar.gz or .tar.bz2 format) containing the source code of the project. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Note: If the project has not had a source file uploaded yet, and the specfile data field for the project is empty (that is, nothing has been entered manually), this will also fill that field with an automatically generated spec file.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/project/uploadsource/122

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

Remote Accounts

list

Get a list of all the remote accounts a user has added references to. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/remoteaccounts/list

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <remoteaccountslist>
      <remoteaccount>
        <id>2</id>
        <type>1</type>
        <typeid>mbs</typeid>
        <data></data>
        <login>frank</login>
        <password>password</password>
      </remoteaccount>
      <remoteaccount>
        <id>7</id>
        <type>2</type>
        <typeid>1</typeid>
        <data></data>
        <login>frank</login>
        <password>password</password>
      </remoteaccount>
    </remoteaccountslist>
  </data>
</ocs>

add

Add a new remote account reference to a user. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/remoteaccounts/add postdata: type=1 typeid="mbs"

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <remoteaccountid>7</remoteaccountid>
  </data>
</ocs>

edit

Change the details of a specified remote account for the authenticated user. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/remoteaccounts/edit/7 postdata: login="frank" password="bet123ter"

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

get

Get the details of a specific remote account. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/remoteaccounts/get/7

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <remoteaccount>
        <id>7</id>
        <type>2</type>
        <typeid>1</typeid>
        <data></data>
        <login>frank</login>
        <password>bet123ter</password>
    </remoteaccount>
  </data>
</ocs>

remove

Remove the specific remote account from the user's list of remote accounts. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/remoteaccounts/remove/7

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

Build Services

list

Get a list of all the build services available. If the user is not authenticated the complete list of services is returned. If the user is authenticated the list is returned of build services that user is signed up for. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/buildservices/list

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <buildservices>
      <buildservice>
        <id>1</id>
        <name>Some Build Service</name>
        <registrationurl>https://bs.some.com/user/new</registrationurl>
        <supportedtargets>
          <target>
            <id>1</id>
            <name>i386</name>
          </target>
          <target>
            <id>2</id>
            <name>x86_64</name>
          </target>
          <target>
            <id>3</id>
            <name>armv5</name>
          </target>
        </supportedtargets>
      </buildservice>
    </buildservices>
  </data>
</ocs>

get

Get a the information on a particular build service.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/buildservices/get/1

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <buildservice>
      <id>1</id>
      <name>Some Build Service</name>
      <registrationurl>https://bs.some.com/user/new</registrationurl>
      <supportedtargets>
        <target>
          <id>1</id>
          <name>i386</name>
        </target>
        <target>
          <id>2</id>
          <name>x86_64</name>
        </target>
        <target>
          <id>3</id>
          <name>armv5</name>
        </target>
      </supportedtargets>
    </buildservice>
  </data>
</ocs>

Build Jobs

list

List the jobs a user has, optionally for a single project. If projectid is specified, only build jobs for that project are returned. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/jobs/list/122

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <buildjobs>
      <buildjob>
        <id>12</id>
        <project>122</project>
        <buildservice>mbs</buildservice>
        <target>2</target>
        <name>armv5 job 12</name>
        <status>1</status>
        <progress>0.56</progress>
        <url>https://bs.some.com/job/54322</url>
        <message></message>
      </buildjob>
      <buildjob>
        <id>18</id>
        <project>122</project>
        <buildservice>obs</buildservice>
        <target>4</target>
        <name>armv5 job 14</name>
        <status>1</status>
        <progress>0.88</progress>
        <url>https://bs.some.com/job/54324</url>
        <message></message>
      </buildjob>
    </buildjobs>
  </data>
</ocs>

create

Create a new build job. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/jobs/create/122/1/armv5

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <buildjobid>616</buildjobid>
  </data>
</ocs>

cancel

Cancel a build job. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/jobs/cancel/616

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

get

Get information about a build job. See also getoutput. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/jobs/get/616

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <buildjob>
      <id>12</id>
      <project>122</project>
      <buildservice>mbs</buildservice>
      <target>2</target>
      <name>armv5 job 12</name>
      <status>1</status>
      <progress>0.56</progress>
      <url>https://bs.some.com/job/54322</url>
      <message></message>
    </buildjob>
  </data>
</ocs>

get output

Get the build output from a specific build job. This is the clear text version of the configuration, compilation and other steps. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/jobs/getoutput/616

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <output>-- Found GCC: /usr/bin/gcc
-- Found X11: /usr/lib64/libX11.so
(etc etc)
    </output>
  </data>
</ocs>

Publishing

getpublishingcapabilities

List all the available publishers. In the case of an authenticated user, the function will return only the publishers that the user has an account with. Authentication is done by sending a Basic HTTP Authorisation header.

Status 102 is informational and in essence is a success. It is meant as a convenient way of finding out whether to bother parsing the list of publishers.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/publishing/getpublishingcapabilities

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <publishers>
      <publisher>
        <id>1</id>
        <name>Some App Store</name>
        <registrationurl>https://store.some.com/user/new</registrationurl>
        <fields>
          <field>
            <name>Name</name>
            <fieldtype>string</fieldtype>
            <options></options>
            <fieldsize>256</fieldsize>
            <required>true</required>
          </field>
          <field>
            <name>Description</name>
            <fieldtype>longtext</fieldtype>
            <options></options>
            <fieldsize>4294967296</fieldsize>
            <required>false</required>
          </field>
          <field>
            <name>Category</name>
            <fieldtype>item</fieldtype>
            <options>
              <option>Game</option>
              <option>Productivity</option>
              <option>Gadget</option>
            </options>
            <fieldsize>0</fieldsize>
            <required>true</required>
          </field>
        </fields>
        <supportedtargets>
          <target>i386</target>
          <target>x86_64</target>
          <target>armv5</target>
        </supportedtargets>
      </publisher>
      <publisher>
        <id>2</id>
        <name>Somewhere</name>
        <registrationurl>https://store.some.where/register</registrationurl>
        <fields></fields>
        <supportedtargets>
          <target>i386</target>
        </supportedtargets>
      </publisher>
    </publishers>
  </data>
</ocs>

get publisher

Get the descriptive information about a publisher.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/publishing/getpublisher/5

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <publisher>
      <id>1</id>
      <name>Some App Store</name>
      <registrationurl>https://store.some.com/user/new</registrationurl>
      <fields>
        <field>
          <name>Name</name>
          <fieldtype>string</fieldtype>
          <options></options>
          <fieldsize>256</fieldsize>
          <required>true</required>
        </field>
        <field>
          <name>Description</name>
          <fieldtype>longtext</fieldtype>
          <options></options>
          <fieldsize>4294967296</fieldsize>
          <required>false</required>
        </field>
        <field>
          <name>Category</name>
          <fieldtype>item</fieldtype>
          <options>
            <option>Game</option>
            <option>Productivity</option>
            <option>Gadget</option>
          </options>
          <fieldsize>0</fieldsize>
          <required>true</required>
        </field>
      </fields>
      <supportedtargets>
        <target>i386</target>
        <target>x86_64</target>
        <target>armv5</target>
      </supportedtargets>
    </publisher>
  </data>
</ocs>

publish target result

Publish the result of a specific build job to one publisher. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/publishing/publishtargetresult/616/5

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

save fields

TODO: This needs a publishing site association as well, otherwise we cannot check the field type properly...

Save field data relating to a particular project. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/buildservice/publishing/savefields/122 postdata: fields[0]["name"]="Name" fields[0]["fieldtype"]="string" fields[0]["data"]="A Project" fields[1]["name"]="Category" fields[1]["fieldtype"]="item" fields[1]["data"]="Nifty"

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>failed</status>
    <statuscode>103</statuscode>
    <message>The item "Nifty" does not exist in the list of possible options. The options are: "Game", "Productivity", "Gadget"</message>
  </meta>
</ocs>

get fields

Get the field data from the previous publishing of a particular project. In the case of a project with no field data saved, an empty list will be returned. This should be interpreted as a success, as only saved data is returned, and data for any aditional fields is not included as empty, since the knowledge of which fields are required now is not available. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: GET https://frank:password@api.opendesktop.org/v1/buildservice/publishing/getfields/122

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <fields>
      <field>
        <name>Name</name>
        <fieldtype>string</fieldtype>
        <data>A Project</data>
      </field>
      <field>
        <name>Summary</name>
        <fieldtype>string</fieldtype>
        <data>A neat little project which does something</data>
      </field>
      <field>
        <name>Category</name>
        <fieldtype>item</fieldtype>
        <data>Gadget</data>
      </field>
    </fields>
  </data>
</ocs>

ACHIEVEMENTS

An achievement is a concept first developed for use in video games, whereby a meta-goal existing outside of the normal gameplay is defined as having a value in itself. In the world of online social interaction, these become a way of measuring your own progress through a game in a different way, adding another layer on top of the traditional methods of levels or quests. This module is a generalised system which allows for achievements to be attached to any OCS content item, which means it also becomes useful for other applications. It is left up to the user of this API to choose which those are, but a couple of tricks for designing good achievements follow:

Content achievement list

List achievements for a piece of content. Optionally with progress data for a specified user.

Example: GET https://api.opendesktop.org/v1/achievements/content/1234?user_id=frank

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <achievement>
      <id>12</id>
      <content_id>1234</content_id>
      <name>The Great Thing</name>
      <description>Great things are afoot</description>
      <explanation>A great thing which will help you with other things.</explanation>
      <points>15</points>
      <image>https://opendesktop.org/content/achievements/images/12.png</image>
      <dependencies />
      <visibility>visible</visibility>
      <type>flowing</type>
      <progress>1</progress>
    </achievement>
    <achievement>
      <id>321</id>
      <content_id>1234</content_id>
      <name>The Greater Thing</name>
      <description>Even greater things are afoot</description>
      <explanation>Incredible things have been achieved.</explanation>
      <points>25</points>
      <image>https://opendesktop.org/content/achievements/images/321.png</image>
      <dependencies>
        <achievement_id>12</achievement_id>
      </dependencies>
      <visibility>dependents</visibility>
      <type>set</type>
      <options>
        <option>good</option>
        <option>other good</option>
        <option>also good</option>
      </options>
      <progress>
        <reached>good</reached>
        <reached>also good</reached>
      </progress>
    </achievement>
  </data>
</ocs>

User achievement list

List achievements that a user has progress on. Optionally filtered by a specified content item, so only achievements reached on that piece of content are shown.

Example: GET https://api.opendesktop.org/v1/achievement/list/1234&user_id=frank

This might yield the following XML output:

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <achievement>
      <id>12</id>
      <content_id>1234</content_id>
      <name>The Great Thing</name>
      <description>Great things are afoot</description>
      <explanation>A great thing which will help you with other things.</explanation>
      <points>15</points>
      <image>https://opendesktop.org/content/achievements/images/12.png</image>
      <dependencies />
      <visibility>visible</visibility>
      <type>flowing</type>
      <progress>1</progress>
    </achievement>
  </data>
</ocs>

add

Add a new achievement tied to a piece of content. Only the owner of that content item is allowed to add achievements on it. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/achievement/add postdata: content_id=1234 name=Something description="A description" explanation="An explanation" points=12 image=@imagefile.png dependencies[0]=12 dependencies[1]=13

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
  <data>
    <achievement_id>15</achievement_id>
  </data>
</ocs>

edit

Edit an existing achievement. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: PUT https://frank:password@api.opendesktop.org/v1/achievement/edit/15 postdata: name="Something Else"

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

remove

Delete an achievement and all progress on it on all users. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: DELETE https://frank:password@api.opendesktop.org/v1/achievements/remove/15

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

set progress

Set the authorised user's progress on a specified achievement. You cannot remove existing progress from a user, to do this you must reset the progress entirely. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: POST https://frank:password@api.opendesktop.org/v1/achievements/progress/321 postdata: progress="also good"

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>

reset progress

Reset the authorised user's progress on a specified achievement. Only authenticated users are allowed to access this method. Authentication is done by sending a Basic HTTP Authorisation header.

Example: DELETE https://frank:password@api.opendesktop.org/v1/achievement/progress/15

<?xml version="1.0"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message></message>
  </meta>
</ocs>


CategoryHomepage buil