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.edge.add
Adds an object to a subject.
Arguments
| id | thing id |
|---|---|
| object | the id of the object |
| predicate | predicate, used to reorder missing edge ids |
| 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 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 craeted object (axo: xxx). |
| 99 | User not authenticated. |
Known Problems
This method should only work with a POST
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 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
This method should only work with a POST
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.messages.getInfo
Get a single message.
Arguments
| messsage_id | The id of the message you want to read. |
|---|
Example Response
<rsp stat="ok" method="anymeta.messages.getInfo"> <message id="36" read="0" type="message"> <from id="37"> <realname>Marc Worrell</realname> </from> <to id="467"> <realname>Bas van Rijen</realname> </to> <date>2005-03-10 19:04:50</date> <subject>Hello there</subject> <text>An example of a body text, as sent by Marc to Bas</text> </message> </rsp>
Error Codes
| 1 | Message not found. Either the message_id was not valid, or the message was not yours. |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
Known Problems
REST Demo
/services/rest/?method=anymeta.messages.getInfo&message_id=36
anymeta.messages.getReceivedList
Fetch the list of received messages.
Arguments
Example Response
<rsp stat="ok" method="anymeta.messages.getReceivedList"> <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. |
|---|
Known Problems
REST Demo
anymeta.messages.getSentList
Fetch the list of sent messages.
Arguments
Example Response
<rsp stat="ok" method="anymeta.messages.getSentList"> <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. |
|---|
Known Problems
REST Demo
anymeta.messages.remove
Remove a single message. There must be a valid user logged on.
Arguments
| message_id | Id of the message to be deleted. |
|---|
Example Response
<rsp stat="ok" method="anymeta.messages.remove"> <message id="42" status="removed" /> </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. |
Known Problems
REST Demo
/services/rest/?method=anymeta.messages.remove&message_id=36
anymeta.messages.send
Send a message to an user. You have to be logged on to use this method.
Arguments
| user_id | The user id of the recipient (or email address) |
|---|---|
| subject | The subject of the message |
| text | The text of the message |
| kind | (optional) The kind of the message, either the default "message" or "notify" |
Example Response
<rsp stat="ok" method="anymeta.messages.send"> <message status="sent" /> </rsp>
Error Codes
| 2 | Message could not be sent. |
|---|---|
| 99 | Could not log on. Either the username was unknown or the password was wrong. |
Known Problems
REST Demo
/services/rest/?method=anymeta.messages.send&subject=About%20this&text=A%message
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.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 |
| 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. |
|---|---|
| 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.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.info
Retrieve extended user info
Arguments
| person_id | The id of the user |
|---|
Example Response
<rsp stat="ok" method="anymeta.user.info"> </rsp>
Error Codes
| 1 | Missing the 'person_id' parameter or 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
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. |
| 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
query.execute
Executes an anyMeta search query
Arguments
| 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_ilk | ilk |
| 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_incremental | incremental |
| 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
rating.rate
Rate a thing, returns the new average rating of the thing
Arguments
| thing_id | thing id to rate |
|---|---|
| rating_nr | which rating is rated (0..7) (defaults to 0) |
| rating | the rating (0..256) |
Example Response
<rsp stat="ok" method="rating.rate"> <rating id="5995"> <id>5995</id> <rating_nr>0</rating_nr> <avg>1.5</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) |
| 99 | User not logged in. You have to be logged on or passed the captcha to use this method |