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. |
Known Problems
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. |
Known Problems
REST Demo
/services/rest/?method=accesscontrol.user.thing.remove&gut_id=0
anymeta.additions.add
Create an edge from a subject to an object
Arguments
| subject_id | The subject of the relation |
|---|---|
| thing_id | The object of the relation |
| role | The role of the new relation. |
Example Response
<rsp stat="ok" method="anymeta.additions.add"> <addition object_id="6789" subject_id="12345" /> </rsp>
Error Codes
| 1 | The subject does not exist. |
|---|---|
| 4 | Could not create the edge (check permissions and/or the role). |
| 6 | The object does not exist. |
| 99 | User not logged on. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=anymeta.additions.add&thing_id=12345&subject_id=6789&role=resource
anymeta.additions.remove
Remove an object from an subject
Arguments
| thing_id | The thing to be removed from |
|---|
Example Response
<rsp stat="ok" method="anymeta.additions.remove" />
Error Codes
| 1 | The subject is not a thing in the system. |
|---|---|
| 4 | Could not remove this person from the subject. |
| 6 | You are not a person in the system, so you can not disconnect this person |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=anymeta.additions.remove&thing_id=1040.196810&subject_id=1040.9989
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. |
Known Problems
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. |
Known Problems
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. |
Known Problems
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. |
Known Problems
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. |
Example Response
<rsp stat="ok" method="anymeta.attachment.create"> <rsc_uri>http://uri/of/new/thing</rsc_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. |
Known Problems
REST Demo
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 |
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=0 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. |
Known Problems
REST Demo
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
/services/rest/?method=anymeta.edge.attribute.get&id=481&edge=1234&field=caption&lang=en
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
/services/rest/?method=anymeta.edge.attribute.get&id=481&edge=1234&field=caption&lang=en
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 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
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" />
Error Codes
Known Problems
REST Demo
anymeta.geo.address
Arguments
| address | Textual address to search for |
|---|
Example Response
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. |
Known Problems
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. |
|---|
Known Problems
REST Demo
anymeta.html.template
Fetch a template file, return without processing.
Arguments
| file | The filename of the template to be fetched (.tpl, .css or .js) |
|---|
Example Response
<rsp stat="ok" method="anymeta.html.template"> <template> The contents of the requested template, css or javascript file. </template> </rsp>
Error Codes
| 1 | Missing the name argument, please supply a scomp to render. |
|---|---|
| 2 | Could not find template file, or no read permission for the template. |
| 99 | You need to be logged on and have superview/edit right on axo template. |
Known Problems
REST Demo
/services/rest/?method=anymeta.html.template&file=scp_dv.tpl
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 |
|---|
Known Problems
REST Demo
/services/rest/?method=anymeta.images.getUriList&width=200&height=200&filter=crop,grey&count=10
anymeta.interests.add
Add something to your interests list. You have to be logged on to use this method.
Arguments
| thing_id | The thing id to add to your interests list |
|---|---|
| role | The role of the new interest, one of: interest, holiday, lived, worked. |
| date_start | The start date or year of the interest. |
| date_end | The end date or year of the interest. |
Example Response
<rsp stat="ok" method="anymeta.interests.add"> <interest id="1208.6782" /> </rsp>
Error Codes
| 1 | Thing does not exist or is unpublished. |
|---|---|
| 2 | This is you. You are trying to add yourself as your contact. |
| 3 | The thing was already in your interests list. |
| 4 | Could not add this thing to your interests. |
| 5 | Unknown role, the role must be one of: interest, holiday, lived, worked. |
| 6 | You are not a person in the system, so you do not have an interest list. |
| 7 | The interest is not a thing in the system. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
anymeta.interests.remove
Remove someone from your interests list. You have to be logged on to use this method.
Arguments
| thing_id | The thing id to be removed from your interests list |
|---|---|
| ref_id | Only remove this reference from your interests list |
Example Response
<rsp stat="ok" method="anymeta.interests.remove" />
Error Codes
| 1 | Thing not found, the thing does not exist or is disabled. |
|---|---|
| 4 | Could not remove this thing from your interests. |
| 6 | You are not a person in the system, so you do not have an interests list. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=anymeta.interests.remove&thing_id=196810
anymeta.memberships.add
Add someone as an member. You have to be logged on to use this method.
Arguments
| person_id | The person id to add as a member |
|---|---|
| role | The role of the new contact, one of: knows, friend. |
Example Response
<rsp stat="ok" method="anymeta.memberships.add"> <member subject_id="1040.805" user_id="123" realname="George de Keijzer" /> </rsp>
Error Codes
| 1 | The member is not a person in the system. |
|---|---|
| 3 | The user was already a member. |
| 4 | Could not add this person as a member. |
| 5 | Unknown role, the role must be one of: relevant or essential. |
| 6 | You are not a person in the system, so you can not add yorself as a member. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=anymeta.memberships.add&thing_id=1040.169806&role=member
anymeta.memberships.remove
Remove someone from the subject. You have to be logged on to use this method.
Arguments
| thing_id | The thing to be removed from |
|---|
Example Response
<rsp stat="ok" method="anymeta.memberships.remove" />
Error Codes
| 1 | The subject is not a thing in the system. |
|---|---|
| 4 | Could not remove this person from the subject. |
| 6 | You are not a person in the system, so you can not disconnect this person |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=anymeta.memberships.remove&thing_id=1040.196810
anymeta.metadata.addKeyword
add keyword
Arguments
| thing_id | thing_id |
|---|---|
| keyword | Array |
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. |
Known Problems
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>
Error Codes
Known Problems
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>
Error Codes
Known Problems
REST Demo
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. |
Known Problems
REST Demo
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 |
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. |
Known Problems
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. |
Known Problems
REST Demo
/services/rest/?method=anymeta.predicates.set&id=551&field=text.title&value=newTitle&lang=pt
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 |
| filesize | show only things that match the given filesize |
| md5 | show only things that match the given md5 |
| mime | show only things that match the given mimetype |
| is_picture | set to 1 to only show things that are pictures |
| is_user | set to 1 to only show things that have an authentication record |
| fields | comma separated list of fields to include in result set |
| subject | subject for filtering on link access rules (found ids are valid objects) |
| predicate | predicate for filtering on link/linkto access rules |
| object | subject for filtering on linkto access rules (found ids are valud subjects) |
Example Response
<rsp stat="ok" method="anymeta.search.live"> <result realname="Bas van Rijen" person_id="805"/> </rsp>
Error Codes
Known Problems
REST Demo
/services/rest/?method=anymeta.search.live&search=bas&kind=person
anymeta.search.textmatch
Search users by textmatch.
Arguments
| q_mm | searchterm |
|---|
Example Response
<rsp stat="ok" method="anymeta.additions.add"> <result user_id="123" realname="Bas van Rijen" email"bas@mediamatic.nl" person_id="805" /> </rsp>
Error Codes
Known Problems
REST Demo
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" />
Error Codes
Known Problems
REST Demo
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>
Error Codes
Known Problems
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. |
Known Problems
REST Demo
/services/rest/?method=anymeta.test.login&email=test@anymeta.net&password=secret
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. |
Known Problems
REST Demo
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. |
Known Problems
REST Demo
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. |
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. |
Known Problems
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 | 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 | Could not delete the thing. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
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
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
Adds a type to 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. |
Example Response
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 system:useradmin. |
Known Problems
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. |
Known Problems
REST Demo
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. |
Known Problems
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. |
Known Problems
REST Demo
/services/rest/?method=backupthing.add&id=1¬e=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. |
Known Problems
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. |
Known Problems
REST Demo
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. |
Known Problems
REST Demo
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. |
Known Problems
REST Demo
captcha.check
Try to logon with either user credentials or with a turing test
Arguments
| username | The username of the user logging on |
|---|---|
| password | The password of the above user |
| key | The captcha key identifying the image used |
| code | The code on the captcha image |
Example Response
<rsp stat="ok" method="captcha.check" />
Error Codes
| 1 | Could not load the Captcha module. |
|---|---|
| 2 | No credentials or captcha check given. |
| 3 | Captcha code/key combination is invalid. |
| 4 | Username/password combination is invalid. |
Known Problems
REST Demo
contact.add
Add someone to your contacts list. You have to be logged on to use this method.
Arguments
| object_id | The person id to add to your contact list |
|---|---|
| predicate | The predicate of the new contact, one of: knows, friend. |
Example Response
<rsp stat="ok" method="contact.add"> <contact object_id="169806" /> </rsp>
Error Codes
| 1 | The contact is not a person in the system. |
|---|---|
| 2 | This is you. You are trying to add yourself as your contact. |
| 3 | The user was already in your contacts. |
| 4 | Could not add this person to your contacts. |
| 5 | Unknown predicate, the predicate must be one of: interest, knows, friend. |
| 6 | You are not a person in the system, so you do not have a contact list. |
| 7 | You cannot do this right now. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=contact.add&object_id=169806&predicate=knows
contact.change
Change the predicate of a relationship.
Arguments
| object_id | The person id on your contact list |
|---|---|
| edg_id | Edge id of the relation to the contact |
| predicate | The new predicate of the contact, one of: knows, friend. |
Example Response
<rsp stat="ok" method="contact.change"> <contact user_id="123" object_id="169806" /> </rsp>
Error Codes
| 1 | The contact is not a person in the system. |
|---|---|
| 2 | This is you. You are trying to add yourself as your contact. |
| 4 | Could not change the predicate of this contact. |
| 5 | Unknown predicate, the predicate must be one of: interest, knows, friend. |
| 6 | You are not a person in the system, so you do not have a contact list. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=contact.change&object_id=169806&predicate=knows&edg_id=50034
contact.list
List the contacts of you or another user.
Arguments
| user_id | The user to get the contacts of (defaults to the current user) |
|---|---|
| show | Set to "private" to see all contacts and predicates, "public" for normal access |
Example Response
<rsp stat="ok" method="contact.list"> <contacts show="private"> <item object_id="303" edg_id="562" predicate="FRIEND">Jan Janssen</item> <item object_id="800" edg_id="171" predicate="KNOWS">Piet Pietersen</item> </contacts> </rsp>
Error Codes
| 99 | User not logged in. You have to be logged on to use this method. |
|---|
Known Problems
REST Demo
contact.remove
Remove someone from your contacts list. You have to be logged on to use this method.
Arguments
| object_id | The person id to be removed from your contact list |
|---|---|
| edg_id | The edge id of the relation to the contact |
Example Response
<rsp stat="ok" method="contact.remove" />
Error Codes
| 1 | The contact is not a person in the system. |
|---|---|
| 2 | This is you. You are trying to remove yourself from your contacts. |
| 4 | Could not remove this person from your contacts. |
| 6 | You are not a person in the system, so you do not have a contact list. |
| 99 | User not logged in. You have to be logged on to use this method. |
Known Problems
REST Demo
/services/rest/?method=contact.remove&object_id=1235&edg_id=8721
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. |
Example Response
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. |
Known Problems
REST Demo
/services/rest/?method=forum.sms.incoming&thing_id=x&data=array
query.execute
Executes an anyMeta search query
Arguments
| see | See query.execute for documentation of 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 | Could not load the Query module |
|---|---|
| 99 | No access. You re not authorized to access module:query. |
Known Problems
REST Demo
/services/rest/?method=googlemaps.query.execute&q_mm=mediamatic
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 |
Known Problems
REST Demo
/services/rest/?method=identity.add&thg_id=37&raw=1A3B5C7E&type=RFID
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 |
Known Problems
REST Demo
/services/rest/?method=identity.add&thg_id=37&raw=1A3B5C7E&type=RFID
identity.add
Add a new identities to a thing.
Arguments
| thg_id | thing id |
|---|---|
| type | type of identity |
| raw | normalized identity data to remove (either this is required or sha1) |
| sha1 | checksum of identity to remove |
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 |
Known Problems
REST Demo
/services/rest/?method=identity.remove&thg_id=37&raw=1A3B5C7E&type=RFID
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 |
Known Problems
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 |
Known Problems
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 |
Known Problems
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. |
Known Problems
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 |
|---|
Known Problems
REST Demo
pubsub.items
Retrieve item(s) for a PubSub node
Arguments
| node | Node identifier |
|---|
Example Response
<rsp stat="ok" method="pubsub.notify"> <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 |
Known Problems
REST Demo
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 XML payload |
| 99 | No access for to use module PubSub |
Known Problems
REST Demo
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 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 |
| 99 | You don't have permission to create the new thing |
Known Problems
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 |
|---|
Example Response
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 |
Known Problems
REST Demo
pubsub.subscribers.byresource
Given a subscriber, get its resources (nodes).
Arguments
| uri | URI of the resource |
|---|
Example Response
Error Codes
| 1 | Could not load the PubSub module |
|---|---|
| 2 | Required arguments missing |
| 99 | No access for to use module PubSub |
Known Problems
REST Demo
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 |
Known Problems
REST Demo
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 |
Known Problems
REST Demo
query.execute
Executes an anyMeta search query
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_typeany | Any type |
| q_typeexclude | Do not include these types in output |
| q_kindtype | q_kindtype |
| 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_editstate | editstate |
| 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 |
Example Response
<rsp stat="ok" method="query.execute"> <item>53207</item> </rsp>
Error Codes
| 1 | Could not load the Query module |
|---|---|
| 99 | No access. You re not authorized to access module:query. |
Known Problems
REST Demo
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.
Arguments
Example Response
Error Codes
| 1 | could not load the Sistersite module |
|---|