accesscontrol.user.thing.add
Add a special permission for an user has on a thing.
Arguments
| id | The thing on which to give the user a special permission |
|---|---|
| usr_id | The user who gets the permission on the thing |
| aco_section | The section of the permission (eg. 'edit' or 'linkto') |
| aco_value | The value of the permission (eg. 'delete', '-all-') |
Example Response
<rsp stat="ok" method="accesscontrol.user.thing.add"> <id>510</id> <usr_id>67</usr_id> <gut_id>46501</gut_id> <name>Jan Janssen><name> <aco_section>linkto</aco_section> <aco_value>blogposting</aco_value> </rsp>
Error Codes
| 1 | Missing the 'id' parameter or id is not a valid thing id |
|---|---|
| 2 | Missing the 'usr_id' parameter or usr_id is not a valid user id |
| 3 | Missing the 'aco_section' or 'aco_value' parameter |
| 4 | You need edit permission on the thing to remove a special access rule. |
| 5 | Could not add the permission. |
| 99 | User not logged on. You have to be logged on to use this method. |
REST Demo
accesscontrol.user.thing.remove
Remove a special permission that an user has on a thing.
Arguments
| gut_id | The id of the special permission to be deleted |
|---|
Example Response
<rsp stat="ok" method="accesscontrol.user.thing.remove"> </rsp>
Error Codes
| 1 | Missing the 'gut_id' parameter or gut_id is not a number |
|---|---|
| 2 | The special access rule does not exist. |
| 3 | You need edit permission on the thing to remove a special access rule. |
| 4 | Could not remove the permission. |
| 99 | User not logged on. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=accesscontrol.user.thing.remove&gut_id=0
action.render
Render an action, or a specific stage for an action.
Arguments
| action | The action |
|---|---|
| stage | The stage (optional) |
| render_outer | Render the action div itself (for dynamic loading of new actions) |
| run_on_load | Echo javascript code that will trigger the action after it returned, default false |
Error Codes
| 1 | Missing action |
|---|---|
| 2 | Action not found |
| 3 | Action not available |
anymeta.annotates.add
Add a post to a picture. You have to be logged on to use this method.
Arguments
| subject_id | The newly created post |
|---|---|
| object_id | The picture which points to the post |
Example Response
<rsp stat="ok" method="anymeta.annotates.add"> <annotate subject_id="1040.805" object_id="1040.123" /> </rsp>
Error Codes
| 1 | The subject you want add to is not in the system. |
|---|---|
| 4 | Could not add this thing. |
| 5 | Unknown role, the role must be one of: relevant or essential. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.annotates.edit
Edit a post of a picture. You have to be logged on to use this method.
Arguments
| subject_id | The post which should be edited |
|---|---|
| object_id | The annotated object |
Example Response
<rsp stat="ok" method="anymeta.annotates.edit"> <annotate subject_id="1040.805" object_id="1040.123" /> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | The subject is not in the system. |
| 4 | Could not edit this thing. |
| 5 | Unknown role, the role must be one of: relevant or essential. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.annotates.getInfo
Fetch a list of annotates belonging to an attachment
Arguments
| object_id | The id of the attachment. |
|---|
Example Response
<rsp stat="ok" method="anymeta.annotates.getInfo"> <message id="36" read="0" type="message"> <from id="37"> <realname>Marc Worrell</realname> </from> <to id="467"> <realname>Bas van Rijen</realname> </to> <date>2005-03-10 19:04:50</date> <subject>Hello there</subject> <text>An example of a body text, as sent by Marc to Bas</text> </message> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
REST Demo
/services/rest/?method=anymeta.annotates.getInfo&object_id=1015.3343
anymeta.annotates.remove
remove a post of a picture. You have to be logged on to use this method.
Arguments
| subject_id | The post which should be removeed |
|---|---|
| object_id | The annotated object |
Example Response
<rsp stat="ok" method="anymeta.annotates.remove"> <annotate subject_id="1040.805" object_id="1040.123" /> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | The subject is not in the system. |
| 4 | Could not remove this thing. |
| 5 | Unknown role, the role must be one of: relevant or essential. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=anymeta.annotates.remove&subject_id=1040.546&object_id=1040.169806
anymeta.attachment.create
Create an attachment
Arguments
| data | Base64 data string |
|---|---|
| mime | Mime type |
| title | Optional title of the attachment |
| connect | Create connections from/to the attachment. |
| modifier_id | Who is the actual modifier (needs special permission). |
Example Response
<rsp stat="ok" method="anymeta.attachment.create"> <rsc_uri>http://uri/of/new/thing</rsc_uri> <attachment_uri>http://uri/to/use/in/html/tags</attachment_uri> </rsp>
Error Codes
| 1 | No data supplied or invalid base64 data |
|---|---|
| 2 | No mime supplied |
| 3 | Creating the attachment failed |
| 4 | Creating edges to/from the attachment failed |
| 5 | Wrong request method, not allowed to modify data |
| 6 | Cannot post a regular WWW form, supply a mime type |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.attachment.insert
Insert an attachment
Arguments
| data | The insert data array. |
|---|
Example Response
<rsp stat="ok" method="anymeta.attachment.insert"> <rsc_id>id of new thing</rsc_uri> <rsc_uri>uri of new thing</rsc_uri> <title>foo.jpg</title> </rsp>
Error Codes
| 1 | Wrong request method, not allowed to modify data |
|---|---|
| 2 | No data supplied |
| 3 | Creating the attachment failed |
| 4 | You are trying to upload an unreadable file, please try again. |
| 5 | You don't have permission to upload files. |
| 6 | You are trying to uploading a file that is too big, please try again. |
| 7 | You are trying to upload a wrong kind of file, please try again. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.cache.flush
Flush a value in the cache using the given key or Thing id.
Arguments
| thg_id | Thing id, or: |
|---|---|
| key | Cache key (if "thg_id" is set, the "key"-parameter will be ignored). |
Example Response
<rsp stat="ok" method="anymeta.cache.flush?thg_id=1">
<result>true</result>
</rsp>Error Codes
| 1 | Missing required "thg_id"- and key" argument. |
|---|---|
| 2 | Given thg_id is unknown to the system. |
| 3 | Failed to access the cache. |
| 99 | Permission denied: you must be a system administrator. |
REST Demo
anymeta.config.get
Get the value of one or more configuration values for the specified fields, or false if the field is not set. When a single field is given, returns just the value for the field. If multiple fields are given, returns an associative array with the keys corresponding to the fields.
Arguments
| field | Config key, in the form of module.key1.key2. Can be an array. |
|---|
Example Response
<rsp stat="ok" method="anymeta.config.get"">
<result>http://www.anymeta.net/</result>
</rsp>Error Codes
| 1 | Missing required arguments. |
|---|---|
| 99 | Permission denied: need admin:use system:sysconfig. |
REST Demo
/services/rest/?method=anymeta.config.get&field=anymeta.site.uri
anymeta.config.set
Set the value a configuration key. Returns true if successful.
Arguments
| field | Config key, in the form of module.key1.key2. |
|---|---|
| value | Config value, as a string. |
Example Response
<rsp stat="ok" method="anymeta.config.set"">
<result>true</result>
</rsp>Error Codes
| 1 | Missing required arguments. |
|---|---|
| 2 | Invalid request method. |
| 99 | Permission denied: need admin:use system:sysconfig. |
REST Demo
/services/rest/?method=anymeta.config.set&field=pubsub.xmpp.domain&value=pubsub.anymeta.net
anymeta.edge.add
Adds an object to a subject.
Arguments
| id | thing id |
|---|---|
| object | the id or uri of the object |
| predicate | predicate, use 'related' for keywords and tags |
| order | optional order nr for the new edge |
| value | optional value nr for the new edge |
| caption | optional caption for the new edge |
| date_start | optional start date for the new edge |
| date_end | optional end date for the new edge |
| object_kind | kind for object creation |
| object_type | type for object creation |
| object_title | title for object creation |
| object_uri | uri for attachment of new object |
| modifier_id | optional id or uri for actual modifier (requires special permissions) |
Example Response
<rsp method="anymeta.edge.add" stat="ok"> <edg_id>1176</edg_id> <subject>481</subject> <object>735</object> <predicate>RELATED</predicate> <predicate_id/> <date_start/> <date_end/> <value/> <order>9999</order> <title>My Other New Article</title> <title_short/> <kind>ARTICLE</kind> <type> <bitmap>0</bitmap> <symbolic/> <id/> </type> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | Missing the required parameters of id and edge/object info |
| 3 | No permission to add an edge from the subject to the existing object. |
| 4 | No permission to create the object |
| 5 | Unknown predicate |
| 6 | Duplicate edge and no duplicates allowed (use duplicate=1 when you want a duplicate edge) |
| 7 | No permission to view the object |
| 8 | Invalid kind for new object |
| 9 | No permission to add an edge to the subject. |
| 10 | No permission to add an edge to the newly created object (axo: xxx). |
| 11 | Error during update, might be a permission problem. |
| 12 | You cannot do this right now. |
| 99 | User not authenticated. |
REST Demo
/services/rest/?method=anymeta.edge.add&id=481&object=
anymeta.edge.addConnect
Add parent and child edges to a thing according to a 'connect' argument.
Arguments
| id | thing id |
|---|---|
| connect | the connect array (or semicolon-separated string). Every element is a string of "id,predicate,[c|p][,order]". |
Example Response
<rsp method="anymeta.edge.addConnect" stat="ok"></rsp>
Error Codes
| 1 | Missing required arguments. |
|---|---|
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
anymeta.edge.addList
Adds (or removes) multiple objects to a subject.
Arguments
| id | thing id |
|---|---|
| object[] | the ids of the objects, must be an array so use object[] |
| predicate | predicate for the new edges, use 'related' for keywords and tags |
| remove_kind | when set, then first remove all objects with this kind and the given predicate |
| remove[] | when set, then remove these object ids before attaching the new objects |
Example Response
<rsp method="anymeta.edge.addList" stat="ok"> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | Missing the required parameters of id, the predicate and edge/object info |
| 3 | No permission to change edges of the subject given. |
| 4 | Unknown predicate |
| 7 | No permission to view the object |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.edge.addList&id=481&predicate=related&object[]=
anymeta.edge.attribute.get
Fetches an attribute of a specific edge. In case of the caption the wiki formatted text will be returned.
Arguments
| id | thing id |
|---|---|
| edge | the id of the edge queried |
| field | the field requested, one of date_start, date_end, value, data and caption |
| lang | optional language for the caption |
Example Response
<rsp method="anymeta.edge.attribute.get" stat="ok"> <result>The caption of the edge</result> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | Missing the required parameters of id and edge/field info |
| 3 | No permission to view the subject given. |
| 99 | User not authenticated. |
Known Problems
REST Demo
anymeta.edge.attribute.set
Set an attribute of a specific edge. In case of setting the caption the value must be in wiki format, the html format will be returned.
Arguments
| id | thing id |
|---|---|
| edge | the id of the edge queried |
| field | the field to be set, one of date_start, date_end, value and caption |
| value | new value for the field |
| lang | optional language for the caption |
| acc | optional accuracy for date_start and date_end |
Example Response
<rsp method="anymeta.edge.attribute.set" stat="ok"> <result>The new <em>>caption</em> on the edge</result> </rsp>
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | Missing the required parameters of id and edge/field info |
| 3 | No permission to edit the edge. |
| 4 | Unknown edge, or not an edge of the subject. |
| 5 | Unknown field, use one of date_start, date_end, value and caption |
| 6 | Could not update the subject, an error occured. |
| 99 | User not authenticated. |
Known Problems
REST Demo
anymeta.edge.order
Sets the order of edges of a subject.
Arguments
| id | thing id |
|---|---|
| edge | edge id(s) |
| order | optional order nrs for the corresponding edges |
| predicate | predicate, used to reorder missing edge ids |
Example Response
<rsp stat="ok" method="anymeta.edge.order" />
Error Codes
| 1 | The object you refering to is not in the system. |
|---|---|
| 2 | Missing the required parameters of id and edge/object info |
| 3 | No permission to change the subject. |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.edge.order&id=551&edge[]=12345&edge[]=8956
anymeta.edge.remove
Removes an edge between a subject and an object.
Arguments
| id | thing id |
|---|---|
| edge | edge id(s) |
| object | object id of edge (when no edge given) |
| predicate | predicate of object (when no edge given) |
Example Response
<rsp stat="ok" method="anymeta.edge.remove" />
Error Codes
| 1 | The object you referring is not in the system. |
|---|---|
| 2 | Missing the required parameters of id and edge/object info |
| 3 | No permission to change the subject. |
| 99 | User not authenticated. |
REST Demo
/services/rest/?method=anymeta.edge.remove&id=551&edge=12345
anymeta.error.log
Log errors from outside the system
Arguments
Example Response
<rsp stat="ok" method="anymeta.error.log" />
REST Demo
/services/rest/?method=anymeta.error.log&msg=hello+world
anymeta.geo.address
Get the coordinates of a given address
Arguments
| address | Textual address to search for |
|---|
Error Codes
| 1 | Could not connect to address service. |
|---|---|
| 2 | Address service: Empty address. |
| 3 | Address service: Unknown address. |
| 4 | Address service: Unavailable address. |
| 5 | Address service: Bad api key. |
| 6 | Address service: Miscellaneous error. |
REST Demo
anymeta.html.scomp
Render a scomp and return the HTML produced.
Arguments
| name | Name of the scomp to be rendered |
|---|
Example Response
<rsp stat="ok" method="anymeta.html.scomp"> <html> <p>Hello World!</p> </html> </rsp>
Error Codes
| 1 | Missing the name argument, please supply a scomp to render. |
|---|
REST Demo
anymeta.images.getUriList
Get a list of images with their ids and uris.
Arguments
| width | Max width of the images |
|---|---|
| height | Max height of the images |
| filter | Filter to apply (eg. crop,grey) |
| count | Number of images to return |
| id | Optional listpublish to use |
Example Response
<rsp stat="ok" method="anymeta.images.getUriList"> <item><id>300</id><uri>http://www.mediamatic.net/image/300-40-40-crop,grey.jpg</uri></item> <item><id>864</id><uri>http://www.mediamatic.net/image/864-40-40-crop,grey.jpg</uri></item> </srp>
Error Codes
| 1 | Unknown list id, please supply the id of a listpublish, listedit or set |
|---|
REST Demo
anymeta.messages.getInfo
Get a single message.
Arguments
| messsage_id | The id of the message you want to read. |
|---|
Example Response
<rsp stat="ok" method="anymeta.messages.getInfo"> <message id="36" read="0" type="message"> <from id="37"> <realname>Marc Worrell</realname> </from> <to id="467"> <realname>Bas van Rijen</realname> </to> <date>2005-03-10 19:04:50</date> <subject>Hello there</subject> <text>An example of a body text, as sent by Marc to Bas</text> </message> </rsp>
Error Codes
| 1 | Message not found. Either the message_id was not valid, or the message was not yours. |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
REST Demo
/services/rest/?method=anymeta.messages.getInfo&message_id=36
anymeta.messages.getList
Fetches all messages in a specific folder
Arguments
Example Response
<rsp stat="ok" method="anymeta.messages.getList"> <messages> <message date="2005-03-10 18:34:54" id="33" read="0" subject="Long time no see" user_id="23" /> <message date="2005-03-10 19:04:09" id="34" read="0" subject="How are you" user_id="1513" /> <message date="2005-03-10 19:04:48" id="35" read="0" subject="Are you sure?" user_id="584" /> <message date="2005-03-10 19:04:50" id="36" read="0" subject="Do you remember?" user_id="46" /> </messages> </rsp>
Error Codes
| 99 | User not logged in. |
|---|
REST Demo
anymeta.messages.remove
Remove one or more messages via a POST call if a valid user is logged on.
Arguments
| message_id | Array of message(s) to be deleted. |
|---|
Example Response
<?xml version="1.0" encoding="utf-8" ?> <rsp method="anymeta.messages.remove" stat="ok"> <message> <item> <id>36</id> <status>removed</status> </item> </message> <error> <item> <id>37</id> <status>error</status> <reason>Non existing message id, or the message might not be yours</reason> </item> </error> </rsp>
Error Codes
| 1 | Message not found. Did you supply the required argument "message_id"? |
|---|---|
| 99 | User not logged in. |
REST Demo
/services/rest/?method=anymeta.messages.remove&message_id=[36,37]
anymeta.messages.removeAll
Removes all trashed messages
Arguments
| ??? | ??? |
|---|
Example Response
<?xml version="1.0" encoding="utf-8" ?> <rsp method="anymeta.messages.removeAll" stat="ok"> <message> <item> <id>36</id> <status>removed</status> </item> </message> <error> <item> <id>37</id> <status>error</status> <reason>Non existing message id, or the message might not be yours</reason> </item> </error> </rsp>
Error Codes
| 1 | Message not found. Did you supply the required argument "message_id"? |
|---|---|
| 99 | User not logged in. |
REST Demo
/services/rest/?method=anymeta.messages.removeAll&message_id=[36,37]
anymeta.messages.send
Send a message to an user. You have to be logged on to use this method.
Arguments
| user_id | The user id of the recipient (or email address) |
|---|---|
| subject | The subject of the message |
| text | The text of the message |
| from_uri | (optional) The resource URI of the user user the message is from. You must have proper permissions to send a message on someone else's behalf. |
| from_email | (optional) The e-mail adddress the message appears to originate from. |
| message_id | (optional) The message that is a draft. Will be either updated or sent." |
Example Response
<rsp stat="ok" method="anymeta.messages.send"> <message status="sent" /> </rsp>
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Message could not be sent. |
| 3 | You cannot do this right now. |
| 4 | Non-existing "from" argument, give a resource URI |
| 5 | No permission to send messages on someone else's behalf |
| 6 | Cannot send a message to a non-existing local resource |
| 7 | Sending to a non-local resource needs a from_email field |
| 98 | Could not send message: account is not confirmed. |
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
REST Demo
/services/rest/?method=anymeta.messages.send&subject=About%20this&text=A%message
anymeta.messages.setStatus
sets the status of one or more messages
Arguments
| messsage_id | The IDs of the messages you want to alter |
|---|---|
| type | The type (read, archive, trash) you want to set. |
| flag | The flag you want to set. (0 or 1) |
Example Response
<rsp stat="ok" method="anymeta.messages.setStatus"> </rsp>
Error Codes
| 1 | Message not found. Either the message_id was not valid, or the message was not yours. |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
REST Demo
anymeta.metadata.addKeyword
add keyword
Arguments
| thing_id | thing_id |
|---|---|
| keyword | thg_id, thg_id, ... |
Example Response
<rsp stat="ok" method="anymeta.metadata.addKeyword"> </rsp>
Error Codes
| 1 | The thing you want to add to is not in the system. |
|---|---|
| 99 | User not logged in or has no link rights. |
REST Demo
/services/rest/?method=anymeta.metadata.addKeyword&thg_id=4315&keyword[]=37
anymeta.metadata.listKeyword
Search metadata
Arguments
| thg_id | thing_id |
|---|---|
| filter | true/false |
Example Response
<rsp stat="ok" method="anymeta.metadata.listKeyword"> </rsp>
REST Demo
/services/rest/?method=anymeta.metadata.listKeyword&thg_id=134&filter=true
anymeta.notifications.get
Get the open session notifications
Arguments
Example Response
<rsp stat="ok" method="anymeta.notifications.get"> <item><class>error</class><message>This is a test notification</message></item> </rsp>
REST Demo
anymeta.pivot.ids
Pivots some things.
Arguments
| ids | The ids of the things to pivot. |
|---|
Example Response
<rsp stat="ok" method="anymeta.pivot.ids"> <result/> </rsp>
Error Codes
| 1 | Not logged in |
|---|---|
| 2 | Not authorized: you need access:use system:pivot |
| 3 | Missing ids argument |
| 4 | Task not found |
REST Demo
/services/rest/?method=anymeta.pivot.ids&queue_id=x&
anymeta.predicates.delete
Delete an edge
Arguments
| edge_id | The edge to be deleted |
|---|---|
| thing_id | The thing of the thing/object to be deleted (when not supplying an edge) |
| object_id | The subject of the thing/object to be deleted (when not supplying an edge) |
Example Response
<rsp stat="ok" method="anymeta.predicates.delete"> <edge id="100" status="deleted" /> </rsp>
Error Codes
| 1 | You should supply the edge or thing/object of the edge. |
|---|---|
| 4 | Could not delete the edge. |
| 5 | Could not disconnect the object from the thing. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=anymeta.predicates.delete&edge_id=x
anymeta.predicates.get
Retrieves predicate of a thing.
Arguments
| id | thing id |
|---|---|
| field | thing field (string), or an array of fields |
| lang | language, defaults to default language of editable thing |
| wikify | Output the text fields as wiki (default: true) |
Example Response
<rsp stat="ok" method="anymeta.predicates.get">
<result>Looks good!</result>
</rsp>Error Codes
| 1 | You are not allowed to fetch the data. |
|---|---|
| 2 | Unknown predicate or things has an edit version. |
| 99 | User not authenticated. |
REST Demo
/services/rest/?method=anymeta.predicates.get&id=551&field=text.title&lang=pt
anymeta.predicates.set
Changes/retrieves predicate of a thing.
Arguments
| id | thing id |
|---|---|
| field | thing field |
| value | new value |
| lang | language (optional) |
| name | scomp name (optional) |
Example Response
<rsp stat="ok" method="anymeta.predicates.set"">
<result>Looks good!</result>
</rsp>Error Codes
| 1 | The object you are refering to is not in the system. |
|---|---|
| 2 | Field and Values arguments have different lengths |
| 3 | Missing one of the parameters id, field of value |
| 99 | User not authenticated. |
REST Demo
anymeta.props.add
Add a single property
Arguments
| thing_id | The thing to be updated. |
|---|---|
| property | (Flattened) Key of the property to be added |
| value | Value of the new property |
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 3 | Missing the key of the new property |
| 4 | Missing the value of the new property |
| 5 | You need edit rights on the thing |
anymeta.props.delete
Delete a property
Arguments
| thing_id | The thing to be deleted. |
|---|---|
| property | (Flattened) Key of the property to be deleted |
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 3 | Missing the key of the property to delete |
| 4 | You need edit rights on the thing |
anymeta.props.get
Get the props of a thing. Use a dot (.) to get a sub-property.
Arguments
| thing_id | The thing to be updated. |
|---|---|
| props | List of props, or a single prop. |
Example Response
<rsp stat="ok" method="anymeta.props.get"> <rsc_uri>http://optional/url/of/new/thing</rsc_uri> <rsc_uri>http://url/of/another/new/thing</rsc_uri> </rsp>
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 3 | Invalid update data supplied |
| 4 | You need edit rights on the thing |
REST Demo
/services/rest/?method=anymeta.props.get&thing_id=x&props=foo
anymeta.props.set
Update the props of a thing
Arguments
| thing_id | The thing to be updated. |
|---|---|
| props | Associative array of props. |
Example Response
<rsp stat="ok" method="anymeta.props.set"> <rsc_uri>http://optional/url/of/new/thing</rsc_uri> <rsc_uri>http://url/of/another/new/thing</rsc_uri> </rsp>
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 3 | Invalid update data supplied |
| 4 | You need edit rights on the thing |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=anymeta.props.set&thing_id=x&props[foo]=bar
anymeta.queue.run
Run a task from the queue
Arguments
| queue_id | The queue id of the task to run |
|---|
Example Response
<rsp stat="ok" method="anymeta.queue.run"> <result/> </rsp>
Error Codes
| 1 | Not logged in |
|---|---|
| 2 | Not authorized: you need access:use system:runqueue |
| 3 | Missing queue_id argument |
| 4 | Task not found |
REST Demo
/services/rest/?method=anymeta.queue.run&queue_id=x&
anymeta.resend.confirmation
Resend confirmation email to an existing user
Arguments
Example Response
<rsp method="anymeta.resend.confirmation" stat="ok"> </rsp>
Error Codes
| 1 | Missing the required email parameter. |
|---|---|
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.resend.confirmation&email=user@example.com
anymeta.search.favorites
Get list of your favorites from your home site.
Arguments
| returnformat | The return format of the 'items' array. Either 'default', 'withkindtype' or 'ids' for a list of thing ids or uris. |
|---|
Example Response
<rsp stat="ok" method="anymeta.search.favorites">...</rsp>
Error Codes
| 1 | User does not exist |
|---|---|
| 2 | This is not a user. |
| 99 | Must be logged in to use this API call. |
REST Demo
anymeta.search.live
Live text search, used for simple full text searches like the autocompletion.
Arguments
| search | string to search for |
|---|---|
| kind | filter for kind |
| type | filter for type |
Example Response
<rsp stat="ok" method="anymeta.search.live"> <result realname="Bas van Rijen" person_id="805"/> </rsp>
REST Demo
/services/rest/?method=anymeta.search.live&search=bas&kind=person
anymeta.services.list
Lists all API services for this Anymeta instance.
Arguments
REST Demo
anymeta.systemuser.info
Retrieve extended user info
Arguments
| The e-mail of the system user. |
Example Response
<rsp stat="ok" method="anymeta.systemuser.info"></rsp>
Error Codes
| 1 | You need to have admin:use system:sysconfig permission to run this. |
|---|---|
| 2 | Not a system user. |
REST Demo
/services/rest/?method=anymeta.systemuser.info&email=gearman
anymeta.test.echo
A simple testing method which echos its parameters as a success response.
Arguments
Example Response
<rsp stat="ok" method="anymeta.test.echo" />
REST Demo
/services/rest/?method=anymeta.test.echo&msg=hello+world
anymeta.test.error
A simple testing method which returns a failure. Useful when you want to test negative responses in your application.
Arguments
Example Response
<rsp stat="fail"> <err code="0" msg="This is just a test of the error message." /> <method>anymeta.test.error</method> </rsp>
REST Demo
anymeta.test.login
Try to log on as the given user.
Arguments
| The username (e-mail address) of the user | |
| password | The password of the user |
Example Response
<rsp method="anymeta.test.login" stat="ok"> <user id="123"> <username>Biwo Parijvel</username> </user> </rsp>
Error Codes
| 1 | Missing username and/or password parameter |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
REST Demo
/services/rest/?method=anymeta.test.login&email=test@anymeta.net&password=secret
anymeta.thing.discover
Search for a thing using a identity search. Will return the title and kind of thing found if the thing exists somewhere (local or non-local) in the openci network.
Arguments
| uri | uri of resource |
|---|
Example Response
<rsp stat="ok" method="anymeta.thing.discover"> <item> <rsc_uri>http://hostname/id/123</rsc_uri> <title>Title of the thing</title> <subtitle>Subtitle of the thing</subtitle> <kind>Kind of the thing</kind> <modify_date>2009-12-12 12:33:00</modify_date> </item> </rsp>
Error Codes
| 1 | Missing uri |
|---|---|
| 2 | Not a valid http uri |
| 3 | Not found |
| 99 | No access. |
REST Demo
/services/rest/?method=anymeta.thing.discover&uri=http%3A%2F%2Fwww.example.org%2Fid%2F10
anymeta.thing.dump
Full XML/JSON dump of a thing.
Arguments
| id | The thing id or URI |
|---|
Example Response
<rsp method="anymeta.thing.dump" stat="ok">...data...</rsp>
Error Codes
| 1 | Missing the required parameters of id and edge/object info |
|---|---|
| 2 | The object you refering to is not available in the system. |
| 3 | You are not allowed to fetch the data. |
REST Demo
anymeta.thing.duplicate
Duplicate a thing. Give it a thing ID, and it will return the thing ID of the new thing.
Arguments
| thing_id | The thing to be duplicated. Can be a resource URI (which must already be imported). |
|---|
Example Response
<rsp stat="ok" method="anymeta.thing.duplicate"> <thg_id>id_of_new_thing</thg_uri> <rsc_uri>http://optional/url/of/new/thing</rsc_uri> </rsp>
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=anymeta.thing.duplicate&thing_id=x
anymeta.thing.insert
Create a new thing. It uses any_thing_insert to create a thing and then any_thing_update to add extra attributes, edges, etc.
Arguments
| data | The create data array. |
|---|
Example Response
<rsp stat="ok" method="anymeta.thing.insert"> <rsc_id>id of new thing</rsc_uri> <rsc_uri>uri of new thing</rsc_uri> <edit_uri>uri where you can edit this thing</edit_uri> </rsp>
Error Codes
| 1 | Missing data array |
|---|---|
| 2 | Insert failed (permission issue) |
| 3 | Update failed (permission issue) |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.thing.isEditable
Check if the given thing is editable. Returns result => true if the thing is editable, result => false otherwise.
Arguments
| id | Id of the thing |
|---|
Example Response
<rsp stat="ok" method="anymeta.thing.isEditable"> <result>true</result> </rsp>
Error Codes
| 1 | Missing argument (id) |
|---|
anymeta.thing.makeAuthoritative
Make non-authoritative things authoritative, keeping subscriptions
Arguments
| id | Id of the thing |
|---|---|
| keep_subscription | Do not drop the subscriptions on the thing (default = false) |
Example Response
<rsp stat="ok" method="anymeta.thing.makeAuthoritative"> <result>ok</result> </rsp>
Error Codes
| 1 | Missing argument (id) |
|---|---|
| 2 | Thing does not exist |
| 3 | Thing is already authoritative |
| 98 | User does not have sufficient rights |
| 99 | Not authenticated |
anymeta.thing.makeNonAuthoritative
Make authoritative things non-authoritative, keeping subscriptions
Arguments
| id | Id of the thing |
|---|---|
| rsc_uri | new uri of this thing |
Example Response
<rsp stat="ok" method="anymeta.thing.makeNonAuthoritative"> <result>ok</result> </rsp>
Error Codes
| 1 | Missing argument(s) id and/or rsc_uri |
|---|---|
| 2 | Thing does not exist |
| 3 | Thing is already non-authoritative |
| 98 | User does not have sufficient rights |
| 99 | Not authenticated |
anymeta.thing.update
Update a thing
Arguments
| thing_id | The thing to be updated. Can be a resource URI |
|---|---|
| data | The update data array, in any_thing_update() syntax. |
| lang | The language the update needs to be performed in |
Example Response
<rsp stat="ok" method="anymeta.thing.update"> <rsc_uri>http://optional/url/of/new/thing</rsc_uri> <rsc_uri>http://url/of/another/new/thing</rsc_uri> </rsp>
Error Codes
| 1 | No thing_id supplied |
|---|---|
| 2 | Thing not found |
| 3 | Invalid update data supplied |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=anymeta.thing.update&thing_id=x&data=array
anymeta.things.delete
Delete a thing
Arguments
| thing_id | The thing to be deleted |
|---|---|
| followup_id | The (optional) id of the thing that is used to followup the deleted thing |
| secure | Set to 1 to securely delete the thing (ie. without undo) |
Example Response
<rsp stat="ok" method="anymeta.things.delete"> <thing id="100" status="deleted" /> </rsp>
Error Codes
| 1 | The subject is not a thing in the system. |
|---|---|
| 4 | Resource not found. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
anymeta.trust.set
Changes predicate of a thing.
Arguments
| id | thing id |
|---|---|
| trust | array of "group", "field", "level", the trust to set |
Example Response
<rsp stat="ok" method="anymeta.trust.set"">
<result>1</result>
</rsp>Error Codes
| 1 | The object you are refering to is not in the system. |
|---|---|
| 3 | Missing one of the parameters id, trust |
| 4 | Wrong argument format |
| 99 | User not authenticated. |
REST Demo
anymeta.type.add
Adds a type to a subject.
Arguments
| id | thing id of subject |
|---|---|
| type | the id or name of the type to add |
Example Response
<rsp method="anymeta.type.add" stat="ok"> <symbolic> <item>GALLERY</item> <item>NEWS</item> </symbolic> <id> <item>2038</item> <item>33</item> </id> </rsp>
Error Codes
| 1 | Missing the required parameters of id and/or type. |
|---|---|
| 2 | Unknown type, please specify the id or name of a known type. |
| 3 | No permission to add the type to the subject. |
| 4 | No permission to edit the subject. |
| 5 | Error adding the type to the subject. |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.type.add&id=481&type=gallery
anymeta.type.addrem
Adds and removes types from a subject.
Arguments
| id | thing id of subject |
|---|---|
| add | the ids or names of the types to add |
| rem | the ids or names of the types to remove |
Example Response
<rsp method="anymeta.type.addrem" stat="ok"> <symbolic> <item>GALLERY</item> <item>NEWS</item> </symbolic> <id> <item>2038</item> <item>33</item> </id> </rsp>
Error Codes
| 1 | Missing the required parameters of id and/or type. |
|---|---|
| 2 | Unknown type, please specify the id or name of a known type. |
| 3 | No permission to add the type to the subject. |
| 4 | No permission to edit the subject. |
| 5 | Error adding the type to the subject. |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.type.addrem&id=481&add=gallery&rem=
anymeta.type.remove
Removes a type from a subject.
Arguments
| id | thing id of subject |
|---|---|
| type | the id or name of the type to remove |
Example Response
<rsp method="anymeta.type.remove" stat="ok"> <symbolic> <item>NEWS</item> </symbolic> <id> <item>33</item> </id> </rsp>
Error Codes
| 1 | Missing the required parameters of id and/or type. |
|---|---|
| 2 | Unknown type, please specify the id or name of a known type. |
| 3 | No permission to remove the type to the subject. |
| 4 | No permission to edit the subject. |
| 5 | Error removing the type from the subject. |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.type.remove&id=481&type=gallery
anymeta.user.check
Check existence of user
Arguments
Example Response
<rsp method="anymeta.user.check" stat="ok"> <item> <id>70</id> <uri>http://www.example.com/person-70-nl.html</subject> <name>User Despred</name> </item> </rsp>
Error Codes
| 1 | Missing the required email parameter. |
|---|---|
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
REST Demo
/services/rest/?method=anymeta.user.check&email=user@example.com
anymeta.user.create
Create a new user
Arguments
| fullname | Full name of the new user. |
|---|---|
| E-mail address of the new user. | |
| enabled | Whether this account should be enabled. Defaults to true when confirm option is not used. |
| confirm | Whether this user still needs to confirm his account. Defaults to system setting. |
| password | Use this password instead of generating one. |
| sendconfirm | Whether to send a confirmation/welcome e-mail to user. Defaults to true. |
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | E-mail address is already taken |
| 3 | Error occurred during thing creation. Permission issue? |
| 4 | Error occurred during account creation. Permission issue? |
| 99 | No access. you need admin:use on module:memberadministration. |
REST Demo
/services/rest/?method=anymeta.user.create&fullname=Arjan&email=arjan@mediamatic.nl
anymeta.user.info
Retrieve extended user info
Arguments
| person_id | The id of the user. Leave empty to get info for currently logged on user. |
|---|
Example Response
<rsp stat="ok" method="anymeta.user.info"> </rsp>
Error Codes
| 1 | Person id is not a member |
|---|---|
| 99 | User not logged on. You have to be logged on to use this method. |
REST Demo
authentication.user.change.password
Change the password of the user
Arguments
| password | The new password |
|---|---|
| old_password | The old password |
Example Response
<rsp stat="ok" method="authentication.user.change.password"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (password or old_password) |
|---|---|
| 2 | Password is to simple |
REST Demo
authentication.user.change.username
Change the user's username for logon (e-mail address)
Arguments
| The new username |
Example Response
<rsp stat="ok" method="authentication.user.change.username"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (email) |
|---|---|
| 2 | Invalid e-mail address |
| 3 | Changing username failed (duplicate) |
REST Demo
/services/rest/?method=authentication.user.change.username&email=test@example.com
authentication.user.create.onetimelogon
Create a one-time logon URL for the given or current user.
Arguments
| user_id | Create logon URI for this user. Optional; if given you need admin:use module:memberadministration rights. |
|---|---|
| goto | URL to redirect to after auto-logon. |
Example Response
<rsp stat="ok" method="authentication.user.create.onetimelogon"> <result/> </rsp>
Error Codes
| 1 | No rights to create logon URI |
|---|---|
| 2 | User does not exist |
| 99 | Not authenticated |
REST Demo
/services/rest/?method=authentication.user.create.onetimelogon
authentication.user.create.person
Create a user from a person. The user will be informed by email that an account is created for the user.
Arguments
| email address of the new user, also used to send the email informing the user | |
| person_id | id of the person to make a person of |
| message | personal message to be send to the user |
Example Response
<rsp stat="ok" method="authentication.user.create.person"> <result/> </rsp>
Error Codes
| 1 | User is not authenticated |
|---|---|
| 2 | Missing argument |
| 3 | person_id is not the id of a PERSON or person_id is already an user |
| 4 | User is not allowed to edit this person |
| 5 | could not send email |
| 6 | User with email already exists |
| 7 | Failed to create user |
REST Demo
authentication.user.exists
See if a user with a specific email exists
Arguments
| email to look for |
Example Response
<rsp stat="ok" method="authentication.user.exists"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (email) |
|---|
REST Demo
/services/rest/?method=authentication.user.exists&email=test@example.com
authentication.user.get.pref
Get a preference of a user
Arguments
| preference | Name of the preference |
|---|---|
| user_id | User id of the user, defaults to logged in user |
Example Response
<rsp stat="ok" method="authentication.user.get.pref"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (preference or value) |
|---|---|
| 2 | User is not authenticated |
| 3 | You have no rights to set preferences for the user |
| 4 | Thing is not a user (or does not exist) |
REST Demo
/services/rest/?method=authentication.user.get.pref&preference=anymeta.language&
authentication.user.logoff
Logs the user off.
Arguments
Example Response
<rsp stat="ok" method="authentication.user.logoff"> <result>true</result> </rsp>
REST Demo
authentication.user.logon
Log on user with username and password.
Arguments
| username | e-mail address of the user |
|---|---|
| password | password of the user |
Example Response
<rsp stat="ok" method="authentication.user.logon"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (password or username) |
|---|---|
| 2 | Logon failed |
| 3 | Confirm is needed |
| 4 | Logon denied |
REST Demo
/services/rest/?method=authentication.user.logon&email=test@example.com&password=testpasword
authentication.user.register
Create a new person and register it as a user
Arguments
| email address of the user | |
| password | password of the user |
| sendconfirm | send confirmation email to the user |
| data | thing data to set |
Example Response
<rsp stat="ok" method="authentication.user.register"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (email) |
|---|---|
| 2 | Failed to create user |
| 3 | Username already exists |
| 4 | Logon failed |
REST Demo
authentication.user.reset.password
Reset the password for the user
Arguments
| email address of the user |
Example Response
<rsp stat="ok" method="authentication.user.reset.password"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (email) |
|---|---|
| 2 | Unknown e-mail address |
REST Demo
/services/rest/?method=authentication.user.reset.password&email=test@example.com
authentication.user.set.password
Set the password for the user. Either provide the old password, or an onetime link
Arguments
| email address of the user | |
| old_password | previous password of the user |
| password | The new password of the user |
| onetime | Onetime key |
Example Response
<rsp stat="ok" method="authentication.user.set.password"> <result/> </rsp>
Error Codes
| 1 | Missing required argument (email, password and old_password or onetime) |
|---|
REST Demo
authentication.user.set.pref
Set a preference of the current user, an array can be sent to set many options at once.
Arguments
| preference | Name of the preference, can be an associative array |
|---|---|
| value | Value to set the preference to |
| user_id | User id of the user, defaults to logged in user |
Example Response
<rsp stat="ok" method="authentication.user.set.pref"> <result/> </rsp>
Error Codes
| 1 | Missing required argument either preference or value |
|---|---|
| 2 | User is not authenticated or no permission to set preferences for user_id |
| 3 | You have no rights to set preferences for the user |
| 4 | Thing is not a user (or does not exist) |
REST Demo
/services/rest/?method=authentication.user.set.pref&preference=anymeta.language&value[]=nl
authentication.user.verify.sha1
Verify user account comparing the hashed password.
generate the checksum by sha1 hashing the md5sum of the password eg:
echo -n "password" | md5sum | /usr/bin/cut -d ' ' -f 1 | tr -d '\n' | sha1sum
Arguments
| handle | username, email or ID |
|---|---|
| sha1pass | sha1sum of the password to check |
| nonce | optional string appended to the md5sum before calculating sha1 |
Example Response
<rsp stat="ok" method="authentication.user.verify.sha1"> <item><id>77</id></item> </rsp>
Error Codes
| 1 | No match for this username and password combination. |
|---|---|
| 2 | Missing or invalid 'handle' parameter |
| 3 | Missing of invalid 'sha1pass'. |
| 4 | Invalid nonce - possible replay attack |
| 99 | User not logged on. You have to be logged on to use this method. |
REST Demo
backupthing.add
Make a backup of a thing.
Arguments
| id | The id of the thing to be backed up |
|---|---|
| note | Note for this backup |
Example Response
<rsp stat="ok" method="backupthing.add"> <backup> <bck_id>200</bck_id> <note>This version was quite complete</note> <modify_date>2006-10-11 10:23:34</modify_date> </backup> </rsp>
Error Codes
| 1 | Missing the 'id' parameter or id is not a number |
|---|---|
| 2 | You need edit permission to make a backup. |
| 4 | The previous backup will be identical to this one, no backup has been made. |
| 5 | Could not make a backup. Do you have edit privilege? |
| 6 | Internal error, could not load backup module. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=backupthing.add&id=1&note=A%20test%20backup
backupthing.list
Make a backup of a thing.
Arguments
| id | The id of the thing to be backed up |
|---|---|
| note | Note for this backup |
Example Response
<rsp stat="ok" method="backupthing.list"> <item> <bck_id>200</bck_id> <thg_id>1234</thg_id> <note>This version was quite complete</note> <modify_date>2006-10-11 10:23:34</modify_date> <date>2006-11-22 22:01:08</date> </item> </rsp>
Error Codes
| 1 | Missing the 'id' parameter or id is not a number. |
|---|---|
| 2 | There are no backups for this thing. |
| 3 | Internal error, could not load backup module. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
backupthing.remove
Remove a thing to a previous backup.
Arguments
| id | The id of the thing to be backed up |
|---|---|
| bck_id | The id of the backup |
Example Response
<rsp stat="ok" method="backupthing.remove"> </rsp>
Error Codes
| 1 | Missing the 'id' or the 'bck_id' parameter or id is not a number. |
|---|---|
| 2 | You need edit permission to remove a backup. |
| 3 | Could not find the backup. |
| 4 | Internal error, could not load backup module. |
| 5 | Could not remove the backup. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=backupthing.remove&id=1&bck_id=1234
backupthing.restore
Revert a thing to a previous backup.
Arguments
| id | The id of the thing to be backed up |
|---|---|
| bck_id | The id of the backup |
Example Response
<rsp stat="ok" method="backupthing.restore"> </rsp>
Error Codes
| 1 | Missing the 'id' or the 'bck_id' parameter or id is not a number. |
|---|---|
| 2 | You need edit permission to restore a backup. |
| 3 | Could not find the backup. |
| 4 | Internal error, could not load backup module. |
| 5 | Could not restore the backup. |
| 99 | User not logged in. You have to be logged on to use this method. |
REST Demo
/services/rest/?method=backupthing.restore&id=1&bck_id=1234
blog.postable.list
List all blogs in which the current user can post.
Arguments
Example Response
<rsp stat="ok" method="blog.postable.list"> <item> <id>123</id> <title>My blog</title> <html>My blog</html> </item> </rsp>
Error Codes
| 1 | Could not load the Blog module. |
|---|---|
| 99 | You must be logged in to use this method. |
REST Demo
facebookgraph.disconnect
Disconnect a user from Facebook
Arguments
| id | id to disconnect, optional if not set the current logged in user will be disconnected |
|---|
Example Response
<rsp stat="ok" method="facebookgraph.disconnect">
</rsp>Error Codes
| 99 | Not authorized |
|---|---|
| 1 | FacebookGraph module is not installed |
| 2 | Error during unlinking |
forum.note.add
Add a comment.
Arguments
| title | Title of the comment. Required. |
|---|---|
| parent_id | Parent of the comment. Required. |
| text | Text of the comment. |
| E-mail address of anonymous user. | |
| name | Name of anonymous user. |
| figure | Attachment ids (optional, comma separated) |
Error Codes
| 1 | Forum module not loaded. |
|---|---|
| 3 | Missing required arguments |
| 4 | Parent id unknown |
| 99 | Not authorized |
forum.note.preview
Preview a comment.
Arguments
| title | Title of the comment |
|---|---|
| text | Text of the comment. |
| E-mail address non-authorized author. | |
| name | Name of non-authorized author. |
| figure | Attachment ids (optional, comma separated) |
Error Codes
| 1 | Forum module not loaded. |
|---|---|
| 3 | Missing required arguments |
| 99 | Not authorized |
REST Demo
/services/rest/?method=forum.note.preview&thing_id=x&data=array
forum.sms.incoming
Attach incoming sms to a topic.
Arguments
| mobile | The thing to be updated. Can be a resource URI |
|---|---|
| date | The date of the sms. |
| code | The sms prefix-code |
| text | The SMS text. |
Error Codes
| 1 | Forum module not loaded. |
|---|---|
| 2 | Request does not allow to modify data |
| 3 | Missing required arguments |
| 4 | Could not process SMS. |
| 99 | No access. You need to have admin:use on module:forum. |
REST Demo
/services/rest/?method=forum.sms.incoming&thing_id=x&data=array
forum.turn.into.story
Turns a note into a new story
Arguments
| thg_id | The thing id of the note that should be turned into a story |
|---|
Error Codes
| 1 | Forum module not loaded. |
|---|---|
| 2 | Request does not allow to create data |
| 3 | User doesn't have permissions to create a story |
| 4 | Missing required arguments |
| 99 | Not authenticated. |
Known Problems
made by a front-ender
REST Demo
googlemaps.query.execute
Executes an anyMeta search query, augmented with geographical data
Arguments
| fields | An array of thing fields (e.g. text.title, name.full, text.intro, ...) to return in the result. long and lat will always be returned. |
|---|---|
| start | The offset in the result set |
| paglen | The maximum number of results |
| see | For the rest, see query.execute for documentation of the query arguments. |
Example Response
<rsp stat="ok" method="googlemaps.query.execute">
<item>
<id>74</id>
<title>Mediamatic HQ</title>
<kind>LOCATION</kind>
<type>
<item>COUNTRY</item>
</type>
<lat>52.3624</lat>
<long>4.8914</long>
</item>
</rsp>Error Codes
| 1 | Need at least one "q_" argument |
|---|---|
| 2 | Could not load the Query module |
| 3 | Invalid value for fields |
| 99 | No access. You re not authorized to access module:query. |
REST Demo
identity.add
Add a new identities to a thing.
Arguments
| thg_id | thing id |
|---|---|
| raw | normalized identity data to add |
| type | type of identity |
| confirmed | bool, set confirmed flag |
| private | bool, only store hash, not data |
Example Response
<rsp stat="ok" method="identity.add"> </rsp>
Error Codes
| 1 | thg_id parameter must be a valid thing id |
|---|---|
| 2 | You don't have permission to see this thing |
| 3 | Could not load the Identity module |
| 4 | Missing request arguments |
| 5 | Failed to add the identity to the thing |
| 99 | No access. You re not authorized to access module:identity |
REST Demo
/services/rest/?method=identity.add&thg_id=37&raw=1A3B5C7E&type=RFID
identity.add.uri
Add a new identities to a thing.
Arguments
| thg_id | thing id |
|---|---|
| raw | normalized identity data to add |
| type | type of identity |
| confirmed | bool, set confirmed flag |
| private | bool, only store hash, not data |
Example Response
<rsp stat="ok" method="identity.add.uri"> </rsp>
Error Codes
| 1 | thg_id parameter must be a valid thing id |
|---|---|
| 2 | You don't have permission to see this thing |
| 3 | Could not load the Identity module |
| 4 | Missing request arguments |
| 5 | Failed to add the identity to the thing |
| 99 | No access. You re not authorized to access module:identity |
REST Demo
/services/rest/?method=identity.add.uri&thg_id=37&raw=1A3B5C7E&type=RFID
identity.delete
Deletes an identities from a thing.
Arguments
| thg_id | thing id (required) |
|---|---|
| type | type of identity (required) |
| raw | normalized identity data to remove (either this is required or sha1) |
| sha1 | checksum of identity to remove (see above) |
Example Response
<rsp stat="ok" method="identity.delete"></rsp>
Error Codes
| 1 | thg_id parameter must be a valid thing id |
|---|---|
| 2 | You don't have permission to see this thing |
| 3 | Could not load the Identity module |
| 4 | Missing request arguments |
| 5 | Failed to remove the identity from the thing |
| 99 | No access. You re not authorized to access module:identity |
REST Demo
/services/rest/?method=identity.delete&thg_id=37&raw=1A3B5C7E&type=RFID
identity.identify
Search for a thing using a identity search. Will return the first thing found, and create a local copy of it if it came from a nonlocal site. This API call is guaranteed to always return an id and a title, if the thing exists somewhere in the openci network. Therefore this call is the preferred method of identification of a user (for IkTags, for instance). It is also possible to directly pass in a URI or thing ID, in which case the identity search will be skipped. Extended (public) information is returned about the thing, including its texts, name, address info, and keywords.
Arguments
| type | identity type (e.g. "rfid") |
|---|---|
| raw | raw identifier (e.g. "urn:rfid:DEADBEEF") |
| uri | uri of resource |
| thg_id | thing id of resource |
Example Response
<rsp stat="ok" method="identity.identify"> <item> <rsc_id>123</thg_id> <rsc_uri>http://hostname/id/123</thg_uri> <authoritative>1</authoritative> <title>Title of the thing</title> <subtitle>Subtitle of the thing</subtitle> <modify_date>2009-12-12 12:33:00</modify_date> </item> </rsp>
Error Codes
| 1 | could not load the Identity module |
|---|---|
| 2 | trying to subscribe to local identity |
| 3 | subscription failed |
| 4 | resource not found |
| 99 | No access. You re not authorized to access module:identity |
REST Demo
/services/rest/?method=identity.identify&type=rfid&raw=urn:rfid:DEADBEEF
identity.list
Searches identities. Any combination of arguments is possible.
Arguments
| thg_id | thing id |
|---|---|
| type | identity type |
| raw | raw identifier |
| local | search only local |
| sha1 | identifier checksum |
Example Response
<rsp stat="ok" method="identity.list"> <item> <thg_id>123</thg_id> <type>rfid</type> <raw>04D7AE71</raw> <sha1>bfd480cc0013c68e5e9e2da1943757906d0b4b47</sha1> <confirmed>1</confirmed> </item> </rsp>
Error Codes
| 1 | could not load the Identity module |
|---|---|
| 99 | No access. You re not authorized to access module:identity |
REST Demo
identity.search
Searches identities. Any combination of arguments is possible.
Arguments
| thg_id | thing id |
|---|---|
| type | identity type |
| raw | raw identifier |
| local | search only local |
| sha1 | identifier checksum |
Example Response
<rsp stat="ok" method="identity.search"> <item> <thg_id>123</thg_id> <type>rfid</type> <raw>04D7AE71</raw> <sha1>bfd480cc0013c68e5e9e2da1943757906d0b4b47</sha1> <confirmed>1</confirmed> </item> </rsp>
Error Codes
| 1 | could not load the Identity module |
|---|---|
| 99 | No access. You re not authorized to access module:identity |
REST Demo
identity.search.uri
Searches identities. Any combination of arguments is possible.
Arguments
| thg_id | thing id |
|---|---|
| type | identity type |
| raw | raw identifier |
| local | search only local |
| sha1 | identifier checksum |
Example Response
<rsp stat="ok" method="identity.search.uri"> <item> <thg_id>123</thg_id> <type>rfid</type> <raw>04D7AE71</raw> <sha1>bfd480cc0013c68e5e9e2da1943757906d0b4b47</sha1> <confirmed>1</confirmed> </item> </rsp>
Error Codes
| 1 | could not load the Identity module |
|---|---|
| 99 | No access. You re not authorized to access module:identity |
REST Demo
mailinglist.resetmailing
Reset a mailing list.
Arguments
| thg_id | Thing id of the mailinglist |
|---|
Example Response
<rsp stat="ok" method="mailinglist.resetmailing"> </rsp>
Error Codes
| 1 | Missing thing id argument or no such id with MAILING type known by the system |
|---|---|
| 99 | Not authorized |
member.administration.mark.spammer
(Un)Mark an user as spammer.
Arguments
| thg_id | The thg_id of the user |
|---|---|
| spammer | Boolean-> true: spammer, false: not a spammer (default false) |
Error Codes
| 99 | Not authorized |
|---|---|
| 1 | Missing thg_id argument, this must be the thg_id of the spammer |
| 2 | User not found using the given id |
| 3 | Something went wrong |
migrate.thing
Accept a full thing-dump for migration into this site.
Arguments
| dump | Full thing dump. |
|---|
Error Codes
| 1 | Missing required arguments. |
|---|---|
| 99 | Access denied, need admin:user module:migrate |
REST Demo
migrate.to
Migrate an authoritative thing away to another site.
Arguments
| id | Thing id or URI of the authoritative thing. |
|---|---|
| target | Target URI. Must be a sistersite. |
Error Codes
| 1 | Missing required arguments. |
|---|---|
| 2 | Thing does not exist. |
| 3 | Can only migrate an authoritative thing. |
| 4 | Sistersite error |
| 5 | Migrating users is not supported. |
| 6 | Thing has an axo that is blacklisted for migration. |
| 99 | Access denied, need edit rights to migrate a thing. |
REST Demo
/services/rest/?method=migrate.to&id=1&target=http://dev/null
modules.disable
Disable one or more modules.
Arguments
| modules | Array of modules to disable. |
|---|
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Invalid request method |
| 3 | Action failed |
| 99 | No access. You have to be the sysadmin. |
REST Demo
/services/rest/?method=modules.disable&modules[0]=Status
modules.enable
Enable one or more modules.
Arguments
| modules | Array of modules to enable. |
|---|
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Invalid request method |
| 3 | Action failed |
| 99 | No access. You have to be the sysadmin. |
REST Demo
modules.install
Install one or more modules.
Arguments
| modules | Array of modules to install. |
|---|
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Invalid request method |
| 3 | Action failed |
| 99 | No access. You have to be the sysadmin. |
REST Demo
/services/rest/?method=modules.install&modules[0]=Status
modules.list
List modules and their statuses. Returns a list of all module information including their installed status. Any combination of arguments is possible.
Arguments
Error Codes
| 1 | Operation failed |
|---|---|
| 99 | No access. You have to be the sysadmin. |
REST Demo
modules.uninstall
Uninstall one or more modules.
Arguments
| modules | Array of modules to uninstall. |
|---|
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Invalid request method |
| 3 | Action failed |
| 99 | No access. You have to be the sysadmin. |
REST Demo
/services/rest/?method=modules.uninstall&modules[0]=Status
notification.create
Create a notification for your activity stream.
Arguments
| notification | The notification. |
|---|
Example Response
<rsp stat="ok" method="notification.create"> </rsp>
Error Codes
| 99 | Not authorized |
|---|---|
| 0 | Missing notification argument |
| 1 | Missing object_id |
| 2 | Missing verb |
| 3 | Could not load the Notifications module |
| 4 | Sending notification failed. |
notification.remove
Remove a notification from your activity stream.
Arguments
| notification_id | notification id |
|---|
Example Response
<rsp stat="ok" method="notification.remove"> </rsp>
Error Codes
| 1 | Missing arguments |
|---|---|
| 2 | Could not load the Notifications module |
| 3 | Could not load the notification |
| 4 | Permission denied |
notifications.incoming
Process a notification coming from another site.
Arguments
| notification | JSON-formatted activity notification (see json-activity spec) |
|---|---|
| recipient | URL for the recipient (optional). |
Error Codes
| 1 | could not load the Notifications module |
|---|---|
| 2 | Missing required arguments |
| 3 | Malformed notification object |
| 99 | Not authorized to post notifications. |
REST Demo
notifications.list
Show a user's notifications.
Arguments
| user_id | The users id; defaults to yourself. User id is only for sysadmins. |
|---|
Error Codes
| 1 | could not load the Notifications module |
|---|---|
| 99 | Not authorized to view this users activity stream. |
REST Demo
oauth.discover
Discover OAuth endpoints
Arguments
| uri | Server URI to search on |
|---|
Example Response
<rsp stat="ok" method="oauth.discover"> <consumer_key>xxxxx</consumer_key> <request>http://...</request> <authorize>http://...</authorize> <access>http://...</access> </rsp>
Error Codes
| 1 | Could not load the OAuth module |
|---|---|
| 2 | Missing URI argument |
| 99 | No access. You re not authorized to access module:oauth. |
REST Demo
/services/rest/?method=oauth.discover&uri=http://www.slashdot.org/
openid.whitelist.get
Get the OpenID whitelist.
Arguments
Example Response
<rsp stat="ok" method="openid.whitelist.get"> <item>http://www.mediamatic.nl/</item> <item>http://www.mediamatic.net/</item> <item>yahoo.com</item> </rsp>
Error Codes
| 1 | could not load the OpenID module |
|---|
REST Demo
query.search
Perform a full search of the site and its connected sites. The return format is a dict with an 'items' array compatible with the other anymeta.search.* functions; with a HTML item for display inside an autocomleter dialog. The dict also contains 'total', 'start' and 'paglen'.
Arguments
| paglen | The maximum size of the returned result set (default: 1000) |
|---|---|
| start | The offset of the current result set (default: 0) |
| q_kind | The kind of the thing (e.g. PERSON, ARTICLE, ...) |
| q_type | Symbolic name of the type of the thing |
| q_mm | Search term for fulltext searching |
Error Codes
| 1 | Need at least one 'q_..' argument |
|---|---|
| 2 | Could not load the Query module |
| 4 | Unsupported query argument |
REST Demo
pubsub.items
Retrieve item(s) for a PubSub node
Arguments
| node | Node identifier |
|---|
Example Response
<rsp stat="ok" method="pubsub.items"> <result>ok</result> </rsp>
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required argument missing |
| 3 | Node not found |
| 99 | No access for to use module PubSub |
pubsub.notify
PubSub notification handler
Arguments
| uri | XMPP uri of this notification |
|---|
Example Response
<rsp stat="ok" method="pubsub.notify"> <result>ok</result> </rsp>
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Request method does not allow resource creation |
| 3 | Required arguments missing |
| 4 | Error parsing Link: header in PubSub delete+followup |
| 5 | Missing rel=alternate in PubSub delete+followup |
| 6 | Fatal error processing payload |
| 99 | No access for to use module PubSub |
pubsub.publish.generic
Send out a generic notification over the XMPP network for a specific node. The node is an identifier like "status/2134", where 2134 is a thing id for which you need edit:publish node:status/2134 rights.
Arguments
| node | Node identifier. Required argument, e.g. ikcam/223 |
|---|---|
| payload | Valid XML which will be sent as payload. |
| item_id | Item id; optional, default "current". |
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required arguments missing |
| 3 | Resource not found for this node. |
| 4 | Parse error in payload. |
| 99 | Not allowed to publish to this node. |
pubsub.publish.simple
Send out a notification over the XMPP network for a specific node. The node is an identifier like "status/2134", where 2134 is a thing id for which you need edit:publish node:status/2134 rights.
Arguments
| node | Node identifier. Required argument, e.g. ikcam/223 |
|---|---|
| title | Notification title. Required. |
| subtitle | Notification subtitle. Required. |
| image | Image URL. Optional. |
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required arguments missing |
| 3 | Resource not found for this node. |
| 99 | Not allowed to publish to this node. |
pubsub.publish.thing
Send out a notification over the XMPP network for a specific thing.
Arguments
| node | Node identifier. Required argument, e.g. ikcam/223 |
|---|---|
| payload | Valid XML which will be sent as payload. |
| item_id | Item id; optional, default "current". |
Error Codes
| 1 | Could not load the PubSub module. |
|---|---|
| 2 | Required arguments missing. |
| 3 | Invalid thing. |
| 99 | Not allowed to publish this thing. |
pubsub.subscribe
Subscribe to a resource uri
Arguments
| uri | Resource URI to subscribe to |
|---|---|
| force | Set to 1 to force subscription, even if it already exists |
Example Response
<rsp stat="ok" method="pubsub.subscribe"> <id>1234</id> <uri>http://www.example.com/id/10</uri> <title>The title of the thing (may be empty!)</title> </rsp>
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Missing uri or xmpp_uri argument |
| 3 | Uri argument is not a http uri |
| 4 | Could not subscribe to the resource uri |
| 5 | Wrong request method, not allowed to modify data |
| 6 | Cannot not subscribe to a local resource uri |
| 7 | Subscribe to XMPP uri failed |
| 8 | You don't have permission to create the new thing |
| 99 | You need admin:use on module:pubsub to subscribe |
REST Demo
/services/rest/?method=pubsub.subscribe&uri=http%3A%2F%2Fwww.example.org%2Fid%2F10
pubsub.subscribers.bynode
Given a node ID, get the subscribers.
Arguments
| uri | URI of the resource |
|---|
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required arguments missing |
| 3 | Non-existent resource |
| 4 | Cannot get subscribers from a non-local resource |
| 99 | No access for to use module PubSub |
pubsub.subscribers.bysubscriber
Given a subscriber, get its resources (nodes).
Arguments
| jid_entity |
|---|
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required arguments missing |
| 99 | No access for to use module PubSub |
pubsub.subscribers.subscribe
Add a subscriber to a resource
Arguments
| node | Node identifier to add the subscriber to. Can be empty: subscribe to all nodes. |
|---|---|
| jid | JID of the subscriber |
Example Response
<rsp stat="ok" method="pubsub.subscribers.subscribe"> <status>subscribed</status> </rsp>
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Request method does not allow resource creation |
| 3 | Required arguments missing |
| 4 | Non-existent resource |
| 5 | Cannot subscribe on a non-local resource |
| 6 | Failed to update subscriber administration |
| 99 | No access to use module PubSub |
pubsub.subscribers.unsubscribe
Add a subscriber to a resource
Arguments
| uri | Resource URI to add the subscriber to |
|---|---|
| jid | JID of the subscriber |
Example Response
<rsp stat="ok" method="pubsub.subscribers.unsubscribe"> <status>none</status> </rsp>
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Request method does not allow resource creation |
| 3 | Required arguments missing |
| 4 | Non-existent resource |
| 5 | Subscriber does not exist |
| 6 | Failed to update subscriber administration |
| 99 | No access to use module PubSub |
pubsub.unsubscribe
Unsubscribe from a resource uri, or from an xmpp uri
Arguments
| uri | Resource URI to unsubscribe from |
|---|---|
| xmpp_uri | XMPP URI to unsubscribe from |
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Missing uri or xmpp_uri argument |
| 3 | Resource not found |
| 4 | Subscription not found |
| 5 | Wrong request method, not allowed to modify data |
| 6 | Unsubscription failed |
| 99 | You need admin:use on module:pubsub to unsubscribe |
REST Demo
/services/rest/?method=pubsub.unsubscribe&uri=http%3A%2F%2Fwww.example.org%2Fid%2F10
query.execute
Executes an anyMeta search query. Given a query, it returns a list of matching thing IDs. You'll have to fetch the things yourself using /thing/
Arguments
| See query.search |
Example Response
<rsp stat="ok" method="query.execute"> <item>53207</item> </rsp>
REST Demo
query.search
Perform a full search on this site. The return format is a dict with an 'items' array compatible with the other anymeta.search.* functions; with a HTML item for display inside an autocomleter dialog. The dict also contains 'total', 'start' and 'paglen'.
Arguments
| returnformat | The return format of the 'items' array. Either 'default' or 'ids' for a list of thing ids or uris. |
|---|---|
| paglen | The maximum size of the returned result set (default: 1000) |
| start | The offset of the current result set (default: 0) |
| q_kind | The kind of the thing (e.g. PERSON, ARTICLE, ...) |
| q_type | Symbolic name of the type of the thing |
| q_typeany | Any type (OR) |
| q_typeexclude | Do not include these types in output |
| q_theme | q_theme |
| q_keyword | q_keyword |
| q_tag | q_tag |
| q_subject | q_subject |
| q_subjectany | q_subjectany |
| q_object | q_object |
| q_objectany | q_objectany |
| q_spred | q_spred |
| q_opred | q_opred |
| q_person | q_person |
| q_institution | q_institution |
| q_location | q_location |
| q_inset | q_inset |
| q_x | x |
| q_y | y |
| q_dist | q_dist |
| q_rating | q_rating |
| q_match | q_match |
| q_sort | q_sort |
| q_return_edge | q_return_edge |
| q_mm | Search term for searching in all text fields |
| q_text | Search terms for searching in thing text |
| q_title | Search terms for searching in title |
| q_axo | axo |
| q_source | source |
| q_published | published |
| q_shared | shared |
| q_owner | owned_by_text |
| q_modifier | modified_by_text |
| q_creator | created_by_text |
| q_owner_id | owned_by |
| q_modifier_id | modified_by |
| q_creator_id | created_by |
| q_owner_aro | owned_by_aro |
| q_modifier_aro | modified_by_aro |
| q_creator_aro | created_by_aro |
| q_symbolic | symbolic_name |
| q_birth_city | birth_city |
| q_birth_country | birth_country |
| q_decease_city | decease_city |
| q_decease_country | decease_country |
| q_person_name | person_name_text |
| q_person_lastname | person_lastname_text |
| q_person_firstname | person_firstname_text |
| q_address | address_text |
| q_city | address_city |
| q_country | address_country |
| q_postcode | address_postcode |
| q_exclude | exclude |
| q_mime | mime |
| q_picture | is_picture |
| q_edg_owned_by | edg_owned_by |
| q_modify_date | modify_date |
| q_create_date | create_date |
| q_date | date |
| q_date_start | date_start |
| q_date_end | date_end |
| q_pub_date | pub_date |
| q_pub_date_start | pub_date_start |
| q_pub_date_end | pub_date_end |
| q_id | ID of listpublish thing to use as query base |
Error Codes
| 1 | Need at least one 'q_..' argument |
|---|---|
| 2 | Could not load the Query module |
| 3 | Invalid return format |
REST Demo
rating.rate
Rate a thing, returns the new average rating of the thing
Arguments
| thing_id | thing id to rate |
|---|---|
| rating_nr | which rating is rated (0..7) (defaults to 0) |
| rating | the rating (0..256) |
Example Response
<rsp stat="ok" method="rating.rate"> <rating id="5995"> <id>5995</id> <rating_nr>0</rating_nr> <avg>0.75</avg> <count>200</count> </rating> </rsp>
Error Codes
| 1 | Rating system has been disabled |
|---|---|
| 2 | No such thing id |
| 3 | Rating outside the 0..256 range or missing |
| 4 | You are not allowed to rate this item (for this rating nr) |
| 5 | Rating Nr outside the range or missing |
| 99 | User not logged in. You have to be logged on to use this method |
REST Demo
/services/rest/?method=rating.rate&thing_id=5995&rating=255
sistersite.add
Add a sistersite.
Arguments
| uri | URI of the sistersite. |
|---|---|
| title | Title of the sistersite |
| order | Order in the sistersite list (optional) |
Error Codes
| 1 | Missing required arguments |
|---|---|
| 99 | Permission denied. You need admin:use module:sistersite to add sistersites. |
REST Demo
/services/rest/?method=sistersite.add&uri=http://example.com/
sistersite.list
List complete sistersite configuration. For each site, it returns its display name, sort order, URI, and whether it has an OAuth relation configured to the site. If the requesting user does not have admin:use module:sistersite permissions, a list is returned without the sensitive sistersite information.
Arguments
REST Demo
sistersite.remove
Remove a sistersite from the administration.
Arguments
| uri | URI of the sistersite. |
|---|
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Sistersite not found |
| 99 | Permission denied. You need admin:use module:sistersite to delete a sistersite. |
REST Demo
sistersite.update
Update properties of a sistersite.
Arguments
| uri | URI of the requesting sistersite. Required attribute, used to identity which sistersite needs updating. |
|---|---|
| title | Title of the sistersite. |
| order | Order of the sistersite. |
| token | Access token on the requesting sistersite. |
| token_secret | Token secret on the requesting sistersite. |
Error Codes
| 1 | Missing required arguments |
|---|---|
| 2 | Sistersite not found |
| 99 | Permission denied. You need admin:use module:sistersite to update any sistersites. |
REST Demo
translation.reimport
Re-import all label files that are on the service.
Arguments
Error Codes
| 1 | Not enough rights to perform this action. |
|---|---|
| 2 | Server error |
wizard.default.thing
Default a thing
Arguments
| kind | Kind of the new thing (required) |
|---|---|
| types | An array of type(s) of the new thing. |
Example Response
<rsp stat="ok" method="wizard.default.thing"> <thing id="100" status="ok" /> </rsp>
Error Codes
| 1 | Missing required arguments |
|---|---|
| 99 | User not logged in. You have to be logged on to use this method. |