anyMeta API Documentation

accesscontrol.user.thing.add

Add a special permission for an user has on a thing.

Arguments

idThe thing on which to give the user a special permission
usr_idThe user who gets the permission on the thing
aco_sectionThe section of the permission (eg. 'edit' or 'linkto')
aco_valueThe 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

/services/rest/?method=accesscontrol.user.thing.add&amp;id=510&amp;usr_id=0&amp;aco_section=linkto&amp;aco_value=blogposting

back to top

accesscontrol.user.thing.remove

Remove a special permission that an user has on a thing.

Arguments

gut_idThe 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&amp;gut_id=0

back to top

action.render

Render an action, or a specific stage for an action.

Arguments

actionThe action
stageThe stage (optional)
render_outerRender the action div itself (for dynamic loading of new actions)
run_on_loadEcho 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_idThe newly created post
object_idThe 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

/services/rest/?method=anymeta.annotates.add&amp;subject_id=1040.169806&amp;post_left=10&amp;post_top=30&amp;post_width=40&amp;post_height=50&amp;post_text=leukhoor&amp;role=annotate

back to top

anymeta.annotates.edit

Edit a post of a picture. You have to be logged on to use this method.

Arguments

subject_idThe post which should be edited
object_idThe 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

/services/rest/?method=anymeta.annotates.edit&amp;subject_id=1040.169806&amp;post_left=10&amp;post_top=30&amp;post_width=40&amp;post_height=50&amp;post_text=leukhoor&amp;role=annotate

back to top

anymeta.annotates.getInfo

Fetch a list of annotates belonging to an attachment

Arguments

object_idThe 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&amp;object_id=1015.3343

back to top

anymeta.annotates.remove

remove a post of a picture. You have to be logged on to use this method.

Arguments

subject_idThe post which should be removeed
object_idThe 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&amp;subject_id=1040.546&amp;object_id=1040.169806

back to top

anymeta.attachment.create

Create an attachment

Arguments

dataBase64 data string
mimeMime type
titleOptional title of the attachment
connectCreate connections from/to the attachment.
modifier_idWho 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

/services/rest/?method=anymeta.attachment.create&amp;data=x&amp;mime=image/jpeg&amp;connect[0][object]=12345&amp;connect[0][predicate]=figure&amp;connect[0][subject]=SELF

back to top

anymeta.attachment.insert

Insert an attachment

Arguments

dataThe 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

/services/rest/?method=anymeta.attachment.insert

back to top

anymeta.cache.flush

Flush a value in the cache using the given key or Thing id.

Arguments

thg_idThing id, or:
keyCache 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

/services/rest/?method=anymeta.cache.flush&amp;key=a.b

back to top

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

fieldConfig 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&amp;field=anymeta.site.uri

back to top

anymeta.config.set

Set the value a configuration key. Returns true if successful.

Arguments

fieldConfig key, in the form of module.key1.key2.
valueConfig 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&amp;field=pubsub.xmpp.domain&amp;value=pubsub.anymeta.net

back to top

anymeta.edge.add

Adds an object to a subject.

Arguments

idthing id
objectthe id or uri of the object
predicatepredicate, use 'related' for keywords and tags
orderoptional order nr for the new edge
valueoptional value nr for the new edge
captionoptional caption for the new edge
date_startoptional start date for the new edge
date_endoptional end date for the new edge
object_kindkind for object creation
object_typetype for object creation
object_titletitle for object creation
object_uriuri for attachment of new object
modifier_idoptional 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&amp;id=481&amp;object=

back to top

anymeta.edge.addConnect

Add parent and child edges to a thing according to a 'connect' argument.

Arguments

idthing id
connectthe 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

idthing id
object[]the ids of the objects, must be an array so use object[]
predicatepredicate for the new edges, use 'related' for keywords and tags
remove_kindwhen 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&amp;id=481&amp;predicate=related&amp;object[]=

back to top

anymeta.edge.attribute.get

Fetches an attribute of a specific edge. In case of the caption the wiki formatted text will be returned.

Arguments

idthing id
edgethe id of the edge queried
fieldthe field requested, one of date_start, date_end, value, data and caption
langoptional 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

/services/rest/?method=anymeta.edge.attribute.get&amp;id=481&amp;edge=1234&amp;field=caption&amp;lang=en

back to top

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

idthing id
edgethe id of the edge queried
fieldthe field to be set, one of date_start, date_end, value and caption
valuenew value for the field
langoptional language for the caption
accoptional accuracy for date_start and date_end

Example Response

<rsp method="anymeta.edge.attribute.set" stat="ok">
	<result>The new &lt;em&gt>caption&lt;/em&gt; 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

/services/rest/?method=anymeta.edge.attribute.set&amp;id=481&amp;edge=1234&amp;field=caption&amp;lang=en

back to top

anymeta.edge.order

Sets the order of edges of a subject.

Arguments

idthing id
edgeedge id(s)
orderoptional order nrs for the corresponding edges
predicatepredicate, 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&amp;id=551&amp;edge[]=12345&amp;edge[]=8956

back to top

anymeta.edge.remove

Removes an edge between a subject and an object.

Arguments

idthing id
edgeedge id(s)
objectobject id of edge (when no edge given)
predicatepredicate 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&amp;id=551&amp;edge=12345

back to top

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&amp;msg=hello+world

back to top

anymeta.geo.address

Get the coordinates of a given address

Arguments

addressTextual 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

/services/rest/?method=anymeta.geo.address&amp;

back to top

anymeta.html.scomp

Render a scomp and return the HTML produced.

Arguments

nameName of the scomp to be rendered

Example Response

<rsp stat="ok"  method="anymeta.html.scomp">
	<html>
		&lt;p&gt;Hello World!&lt/p&gt;
	</html>
</rsp>

Error Codes

1 Missing the name argument, please supply a scomp to render.

REST Demo

/services/rest/?method=anymeta.html.scomp&amp;name=Captcha

back to top

anymeta.images.getUriList

Get a list of images with their ids and uris.

Arguments

widthMax width of the images
heightMax height of the images
filterFilter to apply (eg. crop,grey)
countNumber of images to return
idOptional 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

/services/rest/?method=anymeta.images.getUriList&amp;width=200&amp;height=200&amp;filter=crop,grey&amp;count=10

back to top

anymeta.messages.getInfo

Get a single message.

Arguments

messsage_idThe 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&amp;message_id=36

back to top

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

/services/rest/?method=anymeta.messages.getList

back to top

anymeta.messages.remove

Remove one or more messages via a POST call if a valid user is logged on.

Arguments

message_idArray 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&amp;message_id=[36,37]

back to top

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&amp;message_id=[36,37]

back to top

anymeta.messages.send

Send a message to an user. You have to be logged on to use this method.

Arguments

user_idThe user id of the recipient (or email address)
subjectThe subject of the message
textThe 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&amp;subject=About%20this&amp;text=A%message

back to top

anymeta.messages.setStatus

sets the status of one or more messages

Arguments

messsage_idThe IDs of the messages you want to alter
typeThe type (read, archive, trash) you want to set.
flagThe 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

/services/rest/?method=anymeta.messages.setStatus&amp;message_id=36&amp;status_type=archive&amp;flag=0

back to top

anymeta.metadata.addKeyword

add keyword

Arguments

thing_idthing_id
keywordthg_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&amp;thg_id=4315&amp;keyword[]=37

back to top

anymeta.metadata.listKeyword

Search metadata

Arguments

thg_idthing_id
filtertrue/false

Example Response

<rsp stat="ok" method="anymeta.metadata.listKeyword">
</rsp>

REST Demo

/services/rest/?method=anymeta.metadata.listKeyword&amp;thg_id=134&amp;filter=true

back to top

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

/services/rest/?method=anymeta.notifications.get

back to top

anymeta.pivot.ids

Pivots some things.

Arguments

idsThe 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&amp;queue_id=x&amp;

back to top

anymeta.predicates.delete

Delete an edge

Arguments

edge_idThe edge to be deleted
thing_idThe thing of the thing/object to be deleted (when not supplying an edge)
object_idThe 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&amp;edge_id=x

back to top

anymeta.predicates.get

Retrieves predicate of a thing.

Arguments

idthing id
fieldthing field (string), or an array of fields
langlanguage, defaults to default language of editable thing
wikifyOutput 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&amp;id=551&amp;field=text.title&amp;lang=pt

back to top

anymeta.predicates.set

Changes/retrieves predicate of a thing.

Arguments

idthing id
fieldthing field
valuenew value
langlanguage (optional)
namescomp 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

/services/rest/?method=anymeta.predicates.set&amp;id=551&amp;field=text.title&amp;value=newTitle&amp;lang=pt

back to top

anymeta.props.add

Add a single property

Arguments

thing_idThe thing to be updated.
property(Flattened) Key of the property to be added
valueValue 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_idThe 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_idThe thing to be updated.
propsList 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&amp;thing_id=x&amp;props=foo

back to top

anymeta.props.set

Update the props of a thing

Arguments

thing_idThe thing to be updated.
propsAssociative 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&amp;thing_id=x&amp;props[foo]=bar

back to top

anymeta.queue.run

Run a task from the queue

Arguments

queue_idThe 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&amp;queue_id=x&amp;

back to top

anymeta.resend.confirmation

Resend confirmation email to an existing user

Arguments

emailemail

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&amp;email=user@example.com

back to top

anymeta.search.favorites

Get list of your favorites from your home site.

Arguments

returnformatThe 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

/services/rest/?method=anymeta.search.favorites

back to top

anymeta.search.live

Live text search, used for simple full text searches like the autocompletion.

Arguments

searchstring to search for
kindfilter for kind
typefilter 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&amp;search=bas&amp;kind=person

back to top

anymeta.services.list

Lists all API services for this Anymeta instance.

Arguments

REST Demo

/services/rest/?method=anymeta.services.list

back to top

anymeta.systemuser.info

Retrieve extended user info

Arguments

emailThe 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&amp;email=gearman

back to top

anymeta.tags.add

Adds tags to a subject. The tags are given as text. Double quoted strings are taken as a single tag. All keywords and tags are returned. When an added tag is the same as a keyword, then the keyword is added instead.

Arguments

idthing id
tagthe text of the tag(s).

Example Response

<rsp method="anymeta.tags.add" stat="ok">
	<item>
		<edg_id>70</edg_id>
		<subject>101</subject>
		<object>84</object>
		<order>9999</order>
		<title>anymeta</title>
		<title_short/>
		<kind>TAG</kind>
		<type>
			<bitmap>0</bitmap>
			<symbolic/>
			<id/>
		</type>
	</item>
	<item>
		<edg_id>71</edg_id>
		<subject>101</subject>
		<object>102</object>
		<title>security</title>
		<title_short/>
		<kind>TAG</kind>
		<type>
			<bitmap>0</bitmap>
			<symbolic/>
			<id/>
		</type>
	</item>
</rsp>

Error Codes

1 The subject you refering to is not in the system.
2 Missing the required id parameter.
3 No permission to add an edge to the subject given.
4 Could not update the subject.
99 User not authenticated.

Known Problems

This method should only work with a POST

REST Demo

/services/rest/?method=anymeta.tags.add&amp;id=481&amp;tag=

back to top

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&amp;msg=hello+world

back to top

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

/services/rest/?method=anymeta.test.error

back to top

anymeta.test.login

Try to log on as the given user.

Arguments

emailThe username (e-mail address) of the user
passwordThe 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&amp;email=test@anymeta.net&amp;password=secret

back to top

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

uriuri 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&amp;uri=http%3A%2F%2Fwww.example.org%2Fid%2F10

back to top

anymeta.thing.dump

Full XML/JSON dump of a thing.

Arguments

idThe 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

/services/rest/?method=anymeta.thing.dump&amp;id=481

back to top

anymeta.thing.duplicate

Duplicate a thing. Give it a thing ID, and it will return the thing ID of the new thing.

Arguments

thing_idThe 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&amp;thing_id=x

back to top

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

dataThe 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

/services/rest/?method=anymeta.thing.insert&amp;data=array

back to top

anymeta.thing.isEditable

Check if the given thing is editable. Returns result => true if the thing is editable, result => false otherwise.

Arguments

idId 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

idId of the thing
keep_subscriptionDo 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

idId of the thing
rsc_urinew 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_idThe thing to be updated. Can be a resource URI
dataThe update data array, in any_thing_update() syntax.
langThe 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&amp;thing_id=x&amp;data=array

back to top

anymeta.things.delete

Delete a thing

Arguments

thing_idThe thing to be deleted
followup_idThe (optional) id of the thing that is used to followup the deleted thing
secureSet 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

/services/rest/?method=anymeta.things.delete&amp;thing_id=x

back to top

anymeta.trust.set

Changes predicate of a thing.

Arguments

idthing id
trustarray 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

/services/rest/?method=anymeta.trust.set&amp;id=551&amp;group=address.name&amp;level=EVERYONE&amp;predicate=null

back to top

anymeta.type.add

Adds a type to a subject.

Arguments

idthing id of subject
typethe 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&amp;id=481&amp;type=gallery

back to top

anymeta.type.addrem

Adds and removes types from a subject.

Arguments

idthing id of subject
addthe ids or names of the types to add
remthe 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&amp;id=481&amp;add=gallery&amp;rem=

back to top

anymeta.type.remove

Removes a type from a subject.

Arguments

idthing id of subject
typethe 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&amp;id=481&amp;type=gallery

back to top

anymeta.user.check

Check existence of user

Arguments

emailemail

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&amp;email=user@example.com

back to top

anymeta.user.create

Create a new user

Arguments

fullnameFull name of the new user.
emailE-mail address of the new user.
enabledWhether this account should be enabled. Defaults to true when confirm option is not used.
confirmWhether this user still needs to confirm his account. Defaults to system setting.
passwordUse this password instead of generating one.
sendconfirmWhether 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&amp;fullname=Arjan&amp;email=arjan@mediamatic.nl

back to top

anymeta.user.info

Retrieve extended user info

Arguments

person_idThe 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

/services/rest/?method=anymeta.user.info&amp;person_id=1

back to top

authentication.user.change.password

Change the password of the user

Arguments

passwordThe new password
old_passwordThe 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

/services/rest/?method=authentication.user.change.password&amp;email=test@example.com&amp;password=testpasword

back to top

authentication.user.change.username

Change the user's username for logon (e-mail address)

Arguments

emailThe 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&amp;email=test@example.com

back to top

authentication.user.create.onetimelogon

Create a one-time logon URL for the given or current user.

Arguments

user_idCreate logon URI for this user. Optional; if given you need admin:use module:memberadministration rights.
gotoURL 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

back to top

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

emailemail address of the new user, also used to send the email informing the user
person_idid of the person to make a person of
messagepersonal 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

/services/rest/?method=authentication.user.create.person&amp;person_id=1234&amp;message=I have created an account

back to top

authentication.user.exists

See if a user with a specific email exists

Arguments

emailemail 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&amp;email=test@example.com

back to top

authentication.user.get.pref

Get a preference of a user

Arguments

preferenceName of the preference
user_idUser 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&amp;preference=anymeta.language&amp;

back to top

authentication.user.logoff

Logs the user off.

Arguments

Example Response

<rsp stat="ok" method="authentication.user.logoff">
 <result>true</result>
</rsp>

REST Demo

/services/rest/?method=authentication.user.logoff

back to top

authentication.user.logon

Log on user with username and password.

Arguments

usernamee-mail address of the user
passwordpassword 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&amp;email=test@example.com&amp;password=testpasword

back to top

authentication.user.register

Create a new person and register it as a user

Arguments

emailemail address of the user
passwordpassword of the user
sendconfirmsend confirmation email to the user
datathing 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

/services/rest/?method=authentication.user.register&amp;email=test@example.com&amp;password=testpasword

back to top

authentication.user.reset.password

Reset the password for the user

Arguments

emailemail 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&amp;email=test@example.com

back to top

authentication.user.set.password

Set the password for the user. Either provide the old password, or an onetime link

Arguments

emailemail address of the user
old_passwordprevious password of the user
passwordThe new password of the user
onetimeOnetime 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

/services/rest/?method=authentication.user.set.password&amp;email=test@example.com&amp;password=example&amp;old_password=example2

back to top

authentication.user.set.pref

Set a preference of the current user, an array can be sent to set many options at once.

Arguments

preferenceName of the preference, can be an associative array
valueValue to set the preference to
user_idUser 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&amp;preference=anymeta.language&amp;value[]=nl

back to top

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

handleusername, email or ID
sha1passsha1sum of the password to check
nonceoptional 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

/services/rest/?method=authentication.user.verify.sha1&amp;handle=sysadmin&amp;sha1pass=804d7c63d224cbab0f382b5b1a62e7675f7a0934

back to top

backupthing.add

Make a backup of a thing.

Arguments

idThe id of the thing to be backed up
noteNote 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&amp;id=1&amp;note=A%20test%20backup

back to top

backupthing.list

Make a backup of a thing.

Arguments

idThe id of the thing to be backed up
noteNote 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

/services/rest/?method=backupthing.list&amp;id=1

back to top

backupthing.remove

Remove a thing to a previous backup.

Arguments

idThe id of the thing to be backed up
bck_idThe 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&amp;id=1&amp;bck_id=1234

back to top

backupthing.restore

Revert a thing to a previous backup.

Arguments

idThe id of the thing to be backed up
bck_idThe 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&amp;id=1&amp;bck_id=1234

back to top

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

/services/rest/?method=blog.postable.list

back to top

facebookgraph.disconnect

Disconnect a user from Facebook

Arguments

idid 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

titleTitle of the comment. Required.
parent_idParent of the comment. Required.
textText of the comment.
emailE-mail address of anonymous user.
nameName of anonymous user.
figureAttachment 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

titleTitle of the comment
textText of the comment.
emailE-mail address non-authorized author.
nameName of non-authorized author.
figureAttachment 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&amp;thing_id=x&amp;data=array

back to top

forum.sms.incoming

Attach incoming sms to a topic.

Arguments

mobileThe thing to be updated. Can be a resource URI
dateThe date of the sms.
codeThe sms prefix-code
textThe 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&amp;thing_id=x&amp;data=array

back to top

forum.turn.into.story

Turns a note into a new story

Arguments

thg_idThe 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

/services/rest/?method=forum.turn.into.story&amp;thg_id=x

back to top

googlemaps.query.execute

Executes an anyMeta search query, augmented with geographical data

Arguments

fieldsAn array of thing fields (e.g. text.title, name.full, text.intro, ...) to return in the result. long and lat will always be returned.
startThe offset in the result set
paglenThe maximum number of results
seeFor 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

/services/rest/?method=googlemaps.query.execute&amp;q_mm=mediamatic&amp;fields[]=title&amp;fields[]=LOCATION&amp;fields=type

back to top

identity.add

Add a new identities to a thing.

Arguments

thg_idthing id
rawnormalized identity data to add
typetype of identity
confirmedbool, set confirmed flag
privatebool, 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&amp;thg_id=37&amp;raw=1A3B5C7E&amp;type=RFID

back to top

identity.add.uri

Add a new identities to a thing.

Arguments

thg_idthing id
rawnormalized identity data to add
typetype of identity
confirmedbool, set confirmed flag
privatebool, 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&amp;thg_id=37&amp;raw=1A3B5C7E&amp;type=RFID

back to top

identity.delete

Deletes an identities from a thing.

Arguments

thg_idthing id (required)
typetype of identity (required)
rawnormalized identity data to remove (either this is required or sha1)
sha1checksum 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&amp;thg_id=37&amp;raw=1A3B5C7E&amp;type=RFID

back to top

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

typeidentity type (e.g. "rfid")
rawraw identifier (e.g. "urn:rfid:DEADBEEF")
uriuri of resource
thg_idthing 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&amp;type=rfid&amp;raw=urn:rfid:DEADBEEF

back to top

identity.list

Searches identities. Any combination of arguments is possible.

Arguments

thg_idthing id
typeidentity type
rawraw identifier
localsearch only local
sha1identifier 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

/services/rest/?method=identity.list&amp;thg_id=1

back to top

identity.search.uri

Searches identities. Any combination of arguments is possible.

Arguments

thg_idthing id
typeidentity type
rawraw identifier
localsearch only local
sha1identifier 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

/services/rest/?method=identity.search.uri&amp;thg_id=1

back to top

mailinglist.resetmailing

Reset a mailing list.

Arguments

thg_idThing 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_idThe thg_id of the user
spammerBoolean-> 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

dumpFull thing dump.

Error Codes

1 Missing required arguments.
99 Access denied, need admin:user module:migrate

REST Demo

/services/rest/?method=migrate.thing&amp;dump=......

back to top

migrate.to

Migrate an authoritative thing away to another site.

Arguments

idThing id or URI of the authoritative thing.
targetTarget 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&amp;id=1&amp;target=http://dev/null

back to top

modules.disable

Disable one or more modules.

Arguments

modulesArray 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&amp;modules[0]=Status

back to top

modules.enable

Enable one or more modules.

Arguments

modulesArray 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

/services/rest/?method=modules.enable&amp;modules[0]=Status

back to top

modules.install

Install one or more modules.

Arguments

modulesArray 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&amp;modules[0]=Status

back to top

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

/services/rest/?method=modules.list

back to top

modules.uninstall

Uninstall one or more modules.

Arguments

modulesArray 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&amp;modules[0]=Status

back to top

notification.create

Create a notification for your activity stream.

Arguments

notificationThe 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_idnotification 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

notificationJSON-formatted activity notification (see json-activity spec)
recipientURL 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

/services/rest/?method=notifications.incoming

back to top

notifications.list

Show a user's notifications.

Arguments

user_idThe 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

/services/rest/?method=notifications.list

back to top

oauth.discover

Discover OAuth endpoints

Arguments

uriServer 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&amp;uri=http://www.slashdot.org/

back to top

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

/services/rest/?method=openid.whitelist.get

back to top

pubsub.items

Retrieve item(s) for a PubSub node

Arguments

nodeNode 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

uriXMPP 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

nodeNode identifier. Required argument, e.g. ikcam/223
payloadValid XML which will be sent as payload.
item_idItem 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

nodeNode identifier. Required argument, e.g. ikcam/223
titleNotification title. Required.
subtitleNotification subtitle. Required.
imageImage 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

nodeNode identifier. Required argument, e.g. ikcam/223
payloadValid XML which will be sent as payload.
item_idItem 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

uriResource URI to subscribe to
forceSet 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&amp;uri=http%3A%2F%2Fwww.example.org%2Fid%2F10

back to top

pubsub.subscribers.bynode

Given a node ID, get the subscribers.

Arguments

uriURI 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

nodeNode identifier to add the subscriber to. Can be empty: subscribe to all nodes.
jidJID 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

uriResource URI to add the subscriber to
jidJID 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

uriResource URI to unsubscribe from
xmpp_uriXMPP 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&amp;uri=http%3A%2F%2Fwww.example.org%2Fid%2F10

back to top

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/ or the thing.dump API to get the contents. Easier is to use query.search to get a thing title, image, intro.

Arguments

See query.search

Example Response

<rsp stat="ok" method="query.execute">
	<item>53207</item>
</rsp>

REST Demo

/services/rest/?method=query.execute&amp;q_mm=hello

back to top

rating.rate

Rate a thing, returns the new average rating of the thing

Arguments

thing_idthing id to rate
rating_nrwhich rating is rated (0..7) (defaults to 0)
ratingthe 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&amp;thing_id=5995&amp;rating=255

back to top

sistersite.add

Add a sistersite.

Arguments

uriURI of the sistersite.
titleTitle of the sistersite
orderOrder 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&amp;uri=http://example.com/

back to top

sistersite.authorize

Authorize an existing sistersite. Returns an authorized access token which can be used to access this site from the site mentioned in the uri.

Arguments

uriURI of the requesting sistersite.
consumer_keyConsumer key on the requesting sistersite.
consumer_secretConsumer key on the requesting sistersite.

Error Codes

1 Missing required arguments
2 Sistersite not found
99 Permission denied. You need admin:use module:sistersite to authorize a sistersite.

REST Demo

/services/rest/?method=sistersite.authorize

back to top

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

/services/rest/?method=sistersite.list

back to top

sistersite.remove

Remove a sistersite from the administration.

Arguments

uriURI 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

/services/rest/?method=sistersite.remove

back to top

sistersite.update

Update properties of a sistersite.

Arguments

uriURI of the requesting sistersite. Required attribute, used to identity which sistersite needs updating.
titleTitle of the sistersite.
orderOrder of the sistersite.
tokenAccess token on the requesting sistersite.
token_secretToken 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

/services/rest/?method=sistersite.update&amp;uri=http://example.com/&amp;token=foo&amp;token_secret=bar

back to top

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

kindKind of the new thing (required)
typesAn 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.

REST Demo

/services/rest/?method=wizard.default.thing&amp;kind=PERSON

back to top