Thalia Business Layer APIs
v. 1.3
There are two sets of Thalia back-end APIs. They are both implemented using the java servlet technology. The first set is the more traditional. It uses the HTTP Get and Post method. Inputs are passed to the API through HTTP request parameters and the APIs return the results in XML format. The second is the new REST style API. It utilizes four of the HTTP methods: Get for retrieval, Post for create, Put for update, and Delete for deletion. Inputs are passed in XML format in the HTTP request body and the API return the results in XML format. We are looking to fully utilize the REST style API in our front end and phase out the traditional set of APIs.
Thalia REST API
Because most of the browsers and other web tools still don't support Put and Delete, our APIs will take an optional parameter method which can be delete or put to bypass the client limitations.
In a RESTful design, the objects and their functions in an application are divided as resources and are identified as URIs which is uniquely addressable using the http syntax and self-descriptive. It separates the server from its client and can handle request from any client that uses the resource syntax.
The resources we identified in our application are library, libraries, authz(authorization), authzs, bulk (for bulk operations), category, categories (for tagging), item, and items, map, maps (for collection and slideshow), user, and users. Each URI supports one or more of the four HTTP methods.
Our REST API uses https for client authentication.
library:
Method: GET
URI:
Wiki Markup |
---|
baseuri/library/\[library id\] |
Wiki Markup |
---|
baseuri/library/\[library id\]/items |
baseuri/library
Description: retrieve information about the library identified by the library id. If the items option is specified in the uri, the items inside the album are also displayed. The third url will return the current user's default library. If the user is a domain user, his/her personal library id will be returned. If the user is a guest, the public library id will be returned. Note, only the library id will be returned for the third url, not the full xml text.
Error conditions:
If the library id does not exist, a status *"*error getting library 25eefdb4-ed1f-11db-b242-453c40fc1275 : Node does not exist: workspace://HST/25eefdb4-ed1f-11db-b242-453c40fc1275" will be returned.
If the id does not point to a library, a status "id e796eb50-ede6-11db-acd7-85ce9f1fbf15 is not a library" will be returned.
If the user does not have rights to view this library, a status "error getting library 08049d62-ede7-11db-acd7-85ce9f1fbf15 : Access Denied. You do not have the appropriate permissions to perform this operation" will be returned.
Input: none
Sample output 1:
<status result="true">
<library>
<id>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</id>
<title>Public</title>
<description>Public Library</description>
<createdBy>thaliaAdmin</createdBy>
<createDate>05-04-2007 06:53 PM </createDate>
<modifiedBy>thaliaAdmin</modifiedBy>
<modifiedDate>05-05-2007 08:53 PM </modifiedDate>
<items>1</items>
</library>
</status>
Sample output 2:
<status result="true">
<library>
<id>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</id>
<title>Public</title>
<description>Public Library</description>
<createdBy>thaliaAdmin</createdBy>
<createDate>2007-04-18T15:56:33.625-04:00</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>2007-04-19T12:48:13.203-04:00</modifiedDate>
<items>1</items>
<item-list>
<item>
<libraryid>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<id>c33eec3a-ee95-11db-acd7-85ce9f1fbf15</id>
<title>flowers</title>
<description>Spring flowers</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 04:53 PM </createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-05-2007 05:13 PM </modifiedDate>
<thumbnail>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c60a1a39-ee95-11db-acd7-85ce9f1fbf15/thumbnail__</thumbnail>
<medium>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c611462d-ee95-11db-acd7-85ce9f1fbf15/medium__</medium>
<large>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c6160120-ee95-11db-acd7-85ce9f1fbf15/large__</large>
</item>
<count>1</count>
</item-list>
</library>
</status>
Sample Output 3:
<status result="true">
<defaultlibrary>0234fca3-f41c-11db-a4b1-1f881e9789dc</defaultlibrary>
</status>
Method: DELETE
Wiki Markup |
---|
URI: baseuri/library/\[library id\] |
Description: delete the album identified by the album id.
Error conditions:
If the library id is missing, a status "no library provided" will be returned.
If the user is a guest, a status "Guest is not allowed to delete libraries" will be returned. If the library id does not exist, a status *"*error getting library 25eefdb4-ed1f-11db-b242-453c40fc1275 : Node does not exist: workspace://HST/25eefdb4-ed1f-11db-b242-453c40fc1275" will be returned.
If the id does not point to a library, a status "id e796eb50-ede6-11db-acd7-85ce9f1fbf15 is not a library" will be returned.
If the id points to a personal library, a status "can not delete personal library" will be returned.
If the id points to a public library, a status "can not delete Public library" will be returned.
If the user does not have rights to delete this library, a status "error deleting library 08049d62-ede7-11db-acd7-85ce9f1fbf15 : Access Denied. You do not have the appropriate permissions to perform this operation" will be returned.
Input: noneSample output 1:
<status result="true">
</status>
Sample output 2:
<status result="false">
<error> can not delete a personal library</error>
</status>
Method: POST
Uri: baseuri/library
Description: create a library. After the library is created, an authorization is created which gives the user admin rights on the library. It supports creating multiple libraries.
Error Conditions:
If the input xml is empty or if it is mal-formatted, a status "Invalid XML input" will be returned.
If the library title is missing, a status "Must specify library title" will be returned.
If the user is a guest, a status "Guest is not allowed to add libraries" will be returned.
Input: library has two fields, title and description. Title is mandatory.
Sample input:
<library>
<title>test</title>
<description>a test library</description>
</library>
Sample output 1:
<status result="true">
<library>
<id>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</id>
<title>test</title>
<description>a test library</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 05:53 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 08:03 PM</modifiedDate>
<items>0</items>
</library>
</status>
Sample output 2:
<status result="false">
<error>Must specifiy library title</error>
</status>
Method: PUT
Wiki Markup |
---|
Uri: base/uri/library/\[library id\] |
Description: modified a library. Both title and description can be modified:
Error conditions:
If the library id is missing, a status "No library provided" will be returned.
If the xml input is empty or of wrong format, a status "Invalid XML input" is returned.
If the library title is missing, a status "Must specify library title" will be returned.
If the user is a guest, a status "Guest is not allowed to update libraries" will be returned. If the library id does not exist, a status *"*error getting library 25eefdb4-ed1f-11db-b242-453c40fc1275 : Node does not exist: workspace://HST/25eefdb4-ed1f-11db-b242-453c40fc1275" will be returned.
If the id does not point to a library, a status "id e796eb50-ede6-11db-acd7-85ce9f1fbf15 is not a library" will be returned.
If the id points to a public library, a status "can not update the Public library" will be returned.
If the user does not have rights to delete this library, a status "error updating library 08049d62-ede7-11db-acd7-85ce9f1fbf15 : Access Denied. You do not have the appropriate permissions to perform this operation" will be returned.
Input: library has two fields, title and description. Title is mandatory
Sample input:
<library>
<title>Spring 2006</title>
<description>Pictures we took in Spring 2006</description>
</library>
Sample output:
<status result="true">
</status>
libraries:
Method: GET
Uri:
baseuri/libraries
baseuri/libraries/all
Description: retrieves information on all libraries the user can see. If the all option is specified, items inside each library will also be displayed.
Input: none
Sample output:
<status result="true">
<library-list>
<library>
<id>ea5632ac-ede6-11db-acd7-85ce9f1fbf15</id>
<title>dongq's Library</title>
<description>dongq's Personal Library</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 04:53 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 17:53 PM</modifiedDate>
<items>2</items>
</library>
<library>
<id>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</id>
<title>Public</title>
<description>Public Library</description>
<createdBy>thaliaAdmin</createdBy>
<createDate>05-04-2007 04:53 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 04:57 PM</modifiedDate>
<items>1</items>
</library>
<library>
<id>db5ad200-ee9d-11db-acd7-85ce9f1fbf15</id>
<title>Spring 2006</title>
<description>Pictures we took in Spring 2006</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 04:00 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 05:53 PM </modifiedDate>
<items>0</items>
</library>
</library-list>
</status>
authz:
Method: GET
Wiki Markup |
---|
Uri: baseuri/authz/role/\[role name\]/qualifier/\[qualifier id\] |
Description: retrieves if the user has the authorization to do function X with the qualifier Y. Role names are admin, read, download, and write. Qualifier id is the id of a library, a collection, or slideshow
Error Conditions:
If the role or qualifier is missing, a status "Not enough parameters" will be returned.
If the role is not one of the recognized three, a status "Error getting authorization: xxx is not recognized" will be returned
Input: none
Sample output:
<status result="true" />
Method: DELETE
Uri: baseuri/authz
Description: deletes an authorization identified. It supports deleting multiple authorizations.
Error Condition:
If the input xml file is empty or is mal-formatted, a status "Invalid XML input" will be returned.
If the client is a guest, a status "Guest is not allowed delete authorizations" will be returned.
If one of the authorization triplet is missing, a status "Error deleting authorization: information missing" will be returned.
If the role is not one of the recognized three, a status "Error deleting authorization: xxx is not recognized."
Input: authz has three parts: user, role, and qualifier. All three are mandatory. User is the user name, role is one of "read", "write", "download", or "admin". Qualifier is the id of a library, collection or slideshow. We have a special user account "public" which refers to everybody including guests.
Sample input:
<authz user="dtanner" role="write" qualifier="db5ad200-ee9d-11db-acd7-85ce9f1fbf15"/>
Sample output:
<status result="true" />
Method: POST
Uri: baseuri/authz
Description: creates an authorization. It supports creating multiple authorizations.
Error conditions:
If the input xml file is empty or is mal-formatted, a status "Invalid XML input" will be returned.
If the client is a guest, a status "Guest is not allowed to create authorizations" will be returned.
If one of the authorization triplet is missing, a status "Error creating authorization: information missing" will be returned.
If the role is not one of the recognized three, a status "Error creating authorization: xxx is not recognized."
If the qualifier does not exist, a status "Error creating authorization: Node does not exist."
If the qualifier is not of type library, collection, or slideshow, a status "Error creating authorization: xxx is not of the type library, collection, or slideshow" will be returned.
Input: authz has three parts: user, role, and qualifier. All three are mandatory. User is the user name, role is one of "read", "write", "download", or "admin". Qualifier is the id of a library, collection, slideshow. We have a special user account "public" which opens the access to everybody including guests.
Sample input:
<authz user="dtanner" role="write" qualifier="db5ad200-ee9d-11db-acd7-85ce9f1fbf15"/>
Sample output:
<status result="true" />
Wiki Markup |
---|
*authzs:*
Method: GET
Uri:
baseuri/authzs/functions
baseuri/authzs/qualifier/\[qualifier id\]
baseuri/authzs/qualifier/\[qualifier id\]/user/\[user name\]
Error conditions:
If the qualifier id is missing, "No qualifier specified" status will be return.
Description: The first uri retrieves all the available functions. The second uri retrieves all authorizations on a specific library, collection, or slideshow. The third one is similar to the second, but the result is filtered by the user name. We have a special user account "public" which refers to everybody including guests. |
Input: none
Sample output 1:
<status result="true">
<function-list>
<function>admin</function>
<function>write</function>
<function>read</function>
</function-list>
</status>
Sample output 2:
<status result="true">
<authorization_list>
<authz user="dongq" role="admin" qualifier="db5ad200-ee9d-11db-acd7-85ce9f1fbf15" />
<authz user="dtanner" role="write" qualifier="db5ad200-ee9d-11db-acd7-85ce9f1fbf15" />
</authorization_list>
</status>
bulk:
Method: POST
Uri: baseuri/bulk
Description: Bulk importing items into the libraries. There are two types of bulk importing: generic and HST. The generic bulk importing only imports the files, not the metadata. The HST imports includes a metadata file of a specific format and we parse the meta data files to get the meta data fields and map it to our metadata. For the ones can not be mapped, we create categories and applied them to the items. The default metadata file name is AssetMetadata.txt unless it if specified in the xml input. If no metadata file is found in the directory, we do the generic import. The bulk import base directory is specified in the xml file as "bulkPath". The detail of the bulk import operation is logged as BulkResultxxx.xml. The xxx is the date time stamp.
Error Conditions:
If the user is a guest, a status of "Guest is not allowed to do bulk import" is returned.
If the xml input can't be parsed, a status of "Invalid XML input" is returned.
If the bulk import directory is not specified, a status of "Bulk image directory is not provided" is returned.
If the bulk import directory does not exist, a status of "Bulk image directory does not exist" is returned.
If an existing library id is specified, but the library id doesn't exist, a status of "Error: node does not exist" is returned.
If an existing library id is specified, but the library id doesn't point to a library, a status of "Error: id xxx is not of the type library".
If an existing library id is specified, but the user does not have write permission to it, a status of "The user doesn't have permission to write to library xxxx" will be returned.
If the meta data file can not be read for some reason, the status indicating the IOException will be returned.
The above errors will make the bulk import stop. Individual item import errors (such as image does not exist, categories failed to create, the meta data contain illegal characers) will be logged in the log file, but the import will continue.
Wiki Markup |
---|
Input:
The bulk upload has several fields: _directory, metadatafile, itemsperlibrary, id, title,_ and _description_. Only the _directory_ field is mandatory. It should be a relative path under the base import directory. metadatafile is the name of the metadata file for HST import. If this field is missing we will try the default meta data file before doing the generic import. Itemsperlibrary specifies how many items maximum should each library holds. If the field is missing, all items go to the same library. If the field present, we will creare \[librarytitle\]-1, \[librarytitle\]-2 , etc to split the items among several libraries. Id is the id of an existing library to import to. If id is present, title and description fields are ignored. If the id is not present, we will try to create a new library using the title and description. If title is not present, we will use the directory name.
|
Sample input:
<bulk>
<directory>hst</directory>
<metadatafile>davinci.txt</metadatafile>
<title>hst library</title>
<itemsperlibrary>200</itemsperlibrary>
</bulk>
Sample output:
<status result="true">
<summary>
<processed>909</processed>
<succeed>709</succeed>
<failed>200</failed>
</summary>
</status>
Wiki Markup |
---|
*categories*:
Method: GET
Uri: baseuri/categories
baseuri/categories/category/\[category id\]
baseuri/categories/item/\[item id\] |
Description: the first url will retrieve all the top level categories. The second url will retrieve all the subcategories under the specified category. The third url will retrieve all the categories applied to the specified item.
Error Conditions:
If the item id is missing in the third url, a status of "Item id is missing" will be returned.
If the item id doesn't exist, a status of "Error : node does not exist" will be returned.
If the item id doesn't point to an item, a status of "Error : id xxx is not of the type item" will be returned.
If the category id is missing in the second url, a status of "Category id is missing" will be returned.
If the syntax does not match the above specified, a status of "Invalid syntax" will be returned.
Input: none
Sample output:
<status result="true">
<category-list>
<category id="b73854cc-f271-11db-b5bc-05f275694451" name="animal" />
<category id="c1b4f679-f271-11db-b5bc-05f275694451" name="people" />
</category-list>
</status>
category:
Method: POST
Uri: baseuri/category
Description: Creates a top level category or a subcategory. It supports creating multiple categories.
Error Conditions:
If the xml input is empty or mal-formated, a status "Invalid XML input" will be returned.
If the request user is not a domain admin, a status "xxx is not authorized to create new categories" will be returned.
If the category name is missing in the input xml, a status "Category name is missing" will be returned.
If the category's parent id doesn't exist in the system, a status of "Error : node does not exist" will be returned.
If the parent id doesn't point to a category, a status of "Error : id xxx is not of the type category" will be returned.
If the category already exist, a status of "Category xxx already exists" will be returned.
Input: category has two fields, parentid and name. name is mandatory. Parentid is optional. If the parentid is missing, it means we want to create a top-level category. Otherwise, we will create a subcategory under the parentid.
Sample Input 1:
<category name="amimal"/>
Sample Input 2:
<category parentid=" b73854cc-f271-11db-b5bc-05f275694451" name="dog"/>
Sample output:
<status result="true"/>
<category id= "b73854cc-f271-11db-b5bc-05f275694451" name="animal"/>
</status>
Note the id in output show the id of the category itself, it is not the parentid.
Wiki Markup |
---|
Method: PUT
Uri: baseuri/category/\[category id\]/item/\[itemid\] |
Description: Tags the item specified by itemid with the category specified by categoryid.
Error conditions:
If the category id is missing, a status "No category Id provided" will be returned.
If the url doesn't have all the required parts, a status "Invalid syntax" will be returned.
If the request user is a guest, a status of "Guest is not allowed to tag items" will be returned.
If the item id doesn't exist in the system, a status of "Error : node does not exist" will be returned.
If the item id doesn't point to an item, a status of "Error : id xxx is not of the type item" will be returned.
If the category id doesn't exist in the system, a status of "Error : node does not exist" will be returned.
If the category id doesn't point to an item, a status of "Error : id xxx is not of the type category" will be returned.
If the user doesn't have permission to untag, a status "Error tagging item: Access Denied. You do not have the appropriate permissions to perform this operation" will be returned.
If the category is already applied to the item, a status "Category already applied to item" will be returned.
Input: none
Sample output:
<status result="true"/>
</status>
Wiki Markup |
---|
Method: DELETE
Uri:
baseuri/category/\[category id\]
baseuri/category/\[category id\]/item/\[item id\] |
Description: The first url deletes a category identified by the category id. The second url deletes the category specified by the category id from the item specified by the itemid (untagging).
Error conditions for url1:
If the request user is not a domain admin, a status "xxx is not authorized to delete categories" will be returned.
If the category id doesn't exist in the system, a status of "Error : node does not exist" will be returned.
If the parent id doesn't point to a category, a status of "Error : id xxx is not of the type category" will be returned.
Error conditions for url2:
If the request user is a guest, a status of "Guest is not allowed to remove item tags" will be returned.
If the item id doesn't exist in the system, a status of "Error : node does not exist" will be returned.
If the item id doesn't point to an item, a status of "Error : id xxx is not of the type item" will be returned.
If the user doesn't have permission to untag, a status "Error removing tag: Access Denied. You do not have the appropriate permissions to perform this operation" will be returned.
If the tag is not on the item, a status "Item doesn't have this tag" will be returned.
Sample output:
<status result="true"/>
</status>
Wiki Markup |
---|
*item:*
Method: GET
Uri: baseuri/item/\[item id\]
baseuri/item/\[item id\]/download |
Description: The first url retrieve information on the item identified by the item id. The second url downloads the binary content (image) of the item identified the the item id.
Error Conditions:
If the item id is not provided in the uri, a status "No item provided" is returned.
If the item does not exists, a status "Error getting item xxx: Node does not exist." Is returned.
If the id does not point to an item, a status "Id xxx is not an item" is returned.
If the client does not have permission to view this item, a status "Error getting item xxxx: Access denied. You do not have the appropriate permission to perform this operation."
Input: none
Sample output for url 1:
<status result="true">
<item>
<librar-id>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<id>c33eec3a-ee95-11db-acd7-85ce9f1fbf15</id>
<title>flowers</title>
<description>Spring flowers</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 04:53 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>200705-04-2007 04:55 PM</modifiedDate>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c60a1a39-ee95-11db-acd7-85ce9f1fbf15/thumbnail__</thumbnail>
<medium>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c611462d-ee95-11db-acd7-85ce9f1fbf15/medium__</medium>
<large>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c6160120-ee95-11db-acd7-85ce9f1fbf15/large__</large>
</item>
</status>
Sample output for url 2: the image or an error message
Wiki Markup |
---|
Method: PUT
Uri: baseuri/item/\[item id\] |
Description: Modified the item identified by the item id.
Error Conditions:
If the item id is not provided in the uri, a status "No item provided" is returned.
If the input xml text is empty or is mal-formatted, a status "Invalid XML input" is returned.
If the client is guest, a status "Guest is not allowed to update items" is returned.
If the item does not exists, a status "Error getting item xxx: Node does not exist." Is returned.
If the id does not point to an item, a status "Id xxx is not an item" is returned.
If the client does not have permission to view this item, a status "Error getting item xxxx: Access denied. You do not have the appropriate permission to perform this operation."
Input: Items have the following field: libraryId, id and Dublin core metadata fields (title, description, contributor, coverage, creator, date, format, language, publisher, rights, source, subject, type).
Sample input:
<item>
<id>c33eec3a-ee95-11db-acd7-85ce9f1fbf15</id>
<title>flowers</title>
<description>Spring flowers</description>
<contributor>Qing Dong</contributor>
<format>jpge</format>
</item>
Sample output:
<status result="true">
</status>
Method: POST
Uri:
baseuri/item
baseuri/item/import
baseuri/item/move
Description: The first url uploads an item. The second url imports items that are already on the server. The second url supports multiple imports. The third url moves an item to another library. The detail is supplied by the xml text and it supports multi-moves.
Error Conditions for url 1:
If the request is not a multipart request, a status "Not multipart request" is returned.
If the file is not updated as "master", a status "No file uploaded" is returned.
If the item metadata is not present or if it is mal-formatted, a status "Invalid XML input" is returned.
If the client is a guest, a status "Guest is not allowed to upload content" is returned.
If the library id is not present, a status "Library ID is not specified" is returned.
If the library id does not exist, a status "Error: node does not exist" is returned.
If the library id does not point to a library, a status "Error id xxx is not of the type library" is returned.
Input: Items have the following field: libraryId, id and Dublin core metadata fields (title, description, contributor, coverage, creator, date, format, language, publisher, rights, source, subject, type). Only libraryId is mandatory.
Error Conditions for url 2:
If the items metadata is not present or if it is mal-formatted, a status "Invalid XML input" is returned.
If the server file name is not present in the url, a status "Missing file name" is returned.
If the client is a guest, a status "Guest is not allowed to upload content" is returned.
If the library id is not present, a status "Library ID is not specified" is returned.
If the library id does not exist, a status "Error: node does not exist" is returned.
If the library id does not point to a library, a status "Error id xxx is not of the type library" is returned.
Input: Items have the following field: libraryId, id and Dublin core metadata fields (title, description, contributor, coverage, creator, date, format, language, publisher, rights, source, subject, type). Only libraryId is mandatory. We have three additional fields in url2 to support import: serverfilename, clientfilename, mimetype. We assume that the serverfilename is on the temp directory on the server and the temp directory is defined in web.xml.
Error Condition for url 3:
If the items metadata is not present or if it is mal-formatted, a status "Invalid XML input" is returned.
If the item id does not exist, a status "Error: node does not exist" is returned.
If the item id does not point to an item, a status "Error id xxx is not of the type item" is returned.
If the target library id does not exist, a status "Error: node does not exist" is returned.
If the target library id does not point to a library, a status "Error id xxx is not of the type library" is returned.
If the user doen;t have permission to move the item, a status "Error moving item xxxx:
Access denied. You do not have the appropriate permission to perform this operation" is returned.
Sample input for url 1:
<item>
<libraryid>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</libraryid>
<title>flowers</title>
<description>Spring flowers</description>
<contributor>Jane Smith</contributor>
<creator>John Smith</creator>
<date>3-3-2006</date>
<format>jpeg</format>
<language>English</language>
<publisher>none</publisher>
<rights>unspecified</rights>
<source>personal album</source>
<type>none</type>
</item>
Sample input for url 2:
<item-list>
<item>
<libraryid>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<serverfilename>xyz.jpg</serverfilename>
<clientfilename>sophie.jpg</clientfilename>
<mimetype>image/jpeg</mimetype>
</item>
<item>
<libraryid>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<serverfilename>xyz1.jpg</serverfilename>
<clientfilename>bella.jpg</clientfilename>
<mimetype>image/jpeg</mimetype>
<item>
</item-list>
Sample input for url 3: (please not that the library id here is the target library to which the item will be moved. It is not the item's parent library id)
<item-list>
<item>
<libraryid> e876eb2a-ede6-11db-acd7-85ce9f1fbf15</libraryid>
<id>1c095c3c-eedd-11db-acd7-85ce9f1fbf15</id>
</item>
<item>
<libraryid>734mv08ur -ede6-11db-acd7-85ce9f1fbf15</libraryid>
<id>5mdo4-eedd-11db-acd7-85ce9f1fbf15</id>
</item>
</item-list>
Sample output for url 1:
<status result="true">
<item>
<libraryid>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</libraryid>
<id>1c095c3c-eedd-11db-acd7-85ce9f1fbf15</id>
<title>flowers</title>
<description>Spring flowers</description>
<createdBy>state</createdBy>
<createDate>05-01-2007 04:53 PM </createDate>
<modifiedBy>state</modifiedBy>
<modifiedDate>05-01-2007 04:53 PM</modifiedDate>
<contributor>Jane Smith</contributor>
<creator>John Smith</creator>
<date>3-3-2006</date>
<format>jpeg</format>
<language>English</language>
<publisher>none</publisher>
<rights>unspecified</rights>
<source>personal album</source>
<type>none</type>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1cfc95eb-eedd-11db-acd7-85ce9f1fbf15/thumbnail__</thumbnail>
<medium>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1d03c1df-eedd-11db-acd7-85ce9f1fbf15/medium__</medium>
<large>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1d087cd2-eedd-11db-acd7-85ce9f1fbf15/large__</large>
</item>
</status>
Sample output for url 2:
<status-list>
<status result="true">
<item>
<libraryid>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<id>397f2fd8-f820-11db-9b7e-ed7f80aef056</id>
<title>sophie.jpg</title>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 06:12 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 06:12 AM </modifiedDate>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/3adb3d79-f820-11db-9b7e-ed7f80aef056/thumbnail__</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/3ae9955d-f820-11db-9b7e-ed7f80aef056/medium__</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/3af0c150-f820-11db-9b7e-ed7f80aef056/large__</large>
</item>
</status>
<status result="true">
<item>
<libraryid>8a43ffae-f271-11db-b5bc-05f275694451</libraryid>
<id>53aab64d-f820-11db-9b7e-ed7f80aef056</id>
<title>bella.jpg</title>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 06:12 PM </createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-04-2007 06:12 PM</modifiedDate>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/5576eadc-f820-11db-9b7e-ed7f80aef056/thumbnail__</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/557e15d0-f820-11db-9b7e-ed7f80aef056/medium__</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/558541c3-f820-11db-9b7e-ed7f80aef056/large__</large>
</item>
</status>
</status-list>
Sample output for url 3:
<status-list>
<status result="true">
</status>
<status result="true">
</status>
</status-list>
Wiki Markup |
---|
Method: DELETE
Uri: baseuri/item/\[item id\]
Baseuri/item |
Description: The first uri deletes the item identified by item id. The second uri supports bulk delete and the bulk info is passed in via xml.
Error Conditions:
If the item id is not provided in the uri, and no info is passed via xml, a status "No item provided" is returned.
If the client is guest, a status "Guest is not allowed to delete items" is returned.
If the item does not exists, a status "Error getting item xxx: Node does not exist" is returned.
If the id does not point to an item, a status "Id xxx is not an item" is returned.
If the client does not have permission to view this item, a status "Error getting item xxxx: Access denied. You do not have the appropriate permission to perform this operation."
Input for uri 1: none
Input for uri 2:
<item-list>
<item>
<id>147b148f-f8d3-11db-9b7e-ed7f80aef056</id>
</item>
<item>
<id>c99691b6-f858-11db-9b7e-ed7f80aef056</id>
</item>
<item>
<id>b0146ae7-f858-11db-9b7e-ed7f80aef056</id>
</item>
</item-list>
Sample output for uri 1:
<status result="true">
</status>
Sample output for uri 2:
<status-list>
<status result="true">
</status>
<status result="true">
</status>
<status result="true">
</status>
</status-list>
items:
Method: GET
Wiki Markup |
---|
Uri:
baseuri/items/library/\[library id\]
baseuri/items/category/\[categoryid\] |
Description: The first url gets all the items in the library identified by album id.
The second url gets all the items tagged by the category specified by category id.
Error Condition for url 1:
If the uri syntax is incorrect, a status "Invalid syntax" is returned.
If the library Id is not specified in the uri, a status "Library ID is not specified" is returned.
If the library does not exists, a status "Error : Node does not exist." Is returned.
If the id does not point to a library, a status "Id xxx is not a library" is returned.
Error Condition for url 2:
If the uri syntax is incorrect, a status "Invalid syntax" is returned.
If the category Id is not specified in the uri, a status "Category ID is not specified" is returned.
If the category does not exists, a status "Error finding category : Node does not exist." Is returned.
If the id does not point to a category, a status "Error: Id xxx is not a category" is returned.
Input: none
Sample output:
<status result="true">
<item-list>
<item>
<libraryid>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</libraryid>
<id>c33eec3a-ee95-11db-acd7-85ce9f1fbf15</id>
<title>cat</title>
<description>My Cat Sam</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 04:12 PM</createDate>
<modifiedBy>state</modifiedBy>
<modifiedDate>05-04-2007 06:12 PM</modifiedDate>
<contributor>Qing Dong</contributor>
<format>jpge</format>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c60a1a39-ee95-11db-acd7-85ce9f1fbf15/thumbnail__</thumbnail>
<medium>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c611462d-ee95-11db-acd7-85ce9f1fbf15/medium__</medium>
<large>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/c6160120-ee95-11db-acd7-85ce9f1fbf15/large__</large>
</item>
<item>
<libraryid>e876eb2a-ede6-11db-acd7-85ce9f1fbf15</libraryid>
<id>1c095c3c-eedd-11db-acd7-85ce9f1fbf15</id>
<title>flowers</title>
<description>Spring flowers</description>
<createdBy>state</createdBy>
<createDate>05-06-2007 06:19 PM</createDate>
<modifiedBy>state</modifiedBy>
<modifiedDate>05-06-2007 08:12 PM</modifiedDate>
<contributor>Jane Smith</contributor>
<creator>John Smith</creator>
<date>3-3-2006</date>
<format>jpeg</format>
<language>English</language>
<publisher>none</publisher>
<rights>unspecified</rights>
<source>personal album</source>
<type>none</type>
<mimeType>image/jpeg</mimeType>
<size>615466</size>
<thumbnail>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1cfc95eb-eedd-11db-acd7-85ce9f1fbf15/thumbnail__</thumbnail>
<medium>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1d03c1df-eedd-11db-acd7-85ce9f1fbf15/medium__</medium>
<large>http://localhost:8180/alfresco/guestDownload/direct/workspace/HST/1d087cd2-eedd-11db-acd7-85ce9f1fbf15/large__</large>
</item>
<count>2</count>
</item-list>
</status>
Method: PUT
Uri: baseuri/search
Description: searching for items given search criteria.
Error Conditions:
If the search xml input is not valid, a status of "Invalid XML input" will be returned
Input:
Search can be performed on any Dublin core fields: description, title, contributor, coverage, creator, date, format, language, publisher, rights, source, subject, type. Search can also be performed on audit field createdby and parent field libraryid. Search can also be performed on a list of categories. All the fields above can be combined. Search can also be performed on a keyword. If a keyword is present, it will ignore all other fields and search all fields with the keyword value. The xml can also have sort parameters_: title, create date, modify date, mime type._
Sample input 1:
<search>
<keyword>flower</keyword>
<sort>title</sort>
</search>
Sample input 2:
<search>
<title>flower</title>
<language>English</language>
<createdby>dongq</createdby>
<libraryid>0b8269e3-fa08-11db-bb62-4745336857f3</libraryid>
<category-list>
<category id="38f1c784-0254-11dc-9cde-4fc3a815cc06"/>
<category id="6f50b1da-0254-11dc-9cde-4fc3a815cc06"/>
</category-list>
<sort>create date</sort>
</search>
Sample output:
<status result="true">
<item-list>
<item>
<libraryid>031260f2-fa08-11db-bb62-4745336857f3</libraryid>
<id>21d8fa92-fff5-11db-9cde-4fc3a815cc06</id>
<title>Sophie</title>
<description>Sophie in Summer</description>
<createdBy>dongq</createdBy>
<createDate>05-11-2007 03:23 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-11-2007 03:23 PM</modifiedDate>
<mimeType>image/pjpeg</mimeType>
<size>51236</size>
<contributor>Qing Dong</contributor>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/22c9c341-fff5-11db-9cde-4fc3a815cc06/thumbnail</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/22d33925-fff5-11db-9cde-4fc3a815cc06/medium</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/22d7f418-fff5-11db-9cde-4fc3a815cc06/large</large>
</item>
<item>
<libraryid>031260f2-fa08-11db-bb62-4745336857f3</libraryid>
<id>2a644c56-fa08-11db-bb62-4745336857f3</id>
<title>bella</title>
<description>Bella in Summer</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 02:24 AM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-14-2007 04:05 PM</modifiedDate>
<mimeType>image/pjpeg</mimeType>
<size>388546</size>
<contributor>Qing Dong</contributor>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/2b46e436-fa08-11db-bb62-4745336857f3/thumbnail</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/2b4b9f2a-fa08-11db-bb62-4745336857f3/medium</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/2b57860d-fa08-11db-bb62-4745336857f3/large</large>
</item>
<item>
<libraryid>0b8269e3-fa08-11db-bb62-4745336857f3</libraryid>
<id>8db5cd0c-fda3-11db-ac65-756002f21ce0</id>
<title>kids</title>
<description>Bella, Sophie, and Mia</description>
<createdBy>dongq</createdBy>
<createDate>05-08-2007 04:34 PM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-14-2007 04:08 PM</modifiedDate>
<mimeType>image/pjpeg</mimeType>
<size>74213</size>
<contributor>Qing Dong</contributor>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/8f5e25eb-fda3-11db-ac65-756002f21ce0/thumbnail</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/8f67c2df-fda3-11db-ac65-756002f21ce0/medium</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/8f6ec7c2-fda3-11db-ac65-756002f21ce0/large</large>
</item>
<item>
<libraryid>0b8269e3-fa08-11db-bb62-4745336857f3</libraryid>
<id>58f07e88-fa08-11db-bb62-4745336857f3</id>
<title>Kids and Cats</title>
<description>Bella, Sophie, and the cats</description>
<createdBy>dongq</createdBy>
<createDate>05-04-2007 02:26 AM</createDate>
<modifiedBy>dongq</modifiedBy>
<modifiedDate>05-14-2007 04:09 PM</modifiedDate>
<mimeType>image/pjpeg</mimeType>
<size>615466</size>
<contributor>Qing Dong</contributor>
<thumbnail>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/59ce3468-fa08-11db-bb62-4745336857f3/thumbnail</thumbnail>
<medium>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/59d5605c-fa08-11db-bb62-4745336857f3/medium</medium>
<large>http://isda-thalia-1.mit.edu:8180/alfresco/guestDownload/direct/workspace/HST/59d7d15f-fa08-11db-bb62-4745336857f3/large</large>
</item>
<count>4</count>
</item-list>
</status>
Wiki Markup |
---|
*map:*
Method: GET
Uri: baseuri/map/\[map id\] |
Description: retrieves information about the map identified by map id. The map text it self is an embedded xml text enclosed by the cdata block
Error Conditions:
If the map id is not specified in the uri, a status of "No map Id provided" will be returned.
If the map id does not exist, a status of "Error: Node does not exist" will be returned.
If the map id does not point to a map object, a status of "Error: id xxx is not of the type collection".
If the user doesn't have rights to see this map, a status of "Error: Access Denied. You do not have the appropriate permissions to perform this operation".
Input: None
Wiki Markup |
---|
Sample output:
_<__status result__="__true__">_
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>_
_ _ _ _ _<__id__>__941d92ea-fa08-11db-bb62-4745336857f3__</__id__>_
_ _ _ _ _<__title__>__test map__</__title__>_
_ _ _ _ _<__createdBy__>__dongq__</__createdBy__>_
_ _ _ _ _<__createDate__>__05-04-2007 03:50 PM__</__createDate__>_
_ _ _ _ _<__modifiedBy__>__dongq__</__modifiedBy__>_
_ _ _ _ _<__modifiedDate__>>__05-04-2007 03:54 PM__</__modifiedDate__>_
_ __ _ _<__map__>_
_ _ _<\!\[CDATA\[_
_ _ _<__page__>_
_ __ _ _<__item__>_
_ _ _ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ _ _ _ _<__title__>__bella and Sam__</__title__>_
_ _ _ _ _</__item__>_
_ _ _ _ _</__page__>_
_ _ _\]\]>_
_ _ _ _ _</__map__>_
_ _ _ _ _</__displaymap__>_
_</__status__>_
|
Method: POST
Uri: baseuri/map
Description:
Creates a map. After a map is created, an authorization will be created to give the user admin rights to the map. It will return the xml text for the newly created map.
Error Conditions:
If the user is a guest, a status of "Guest is not allowed to add collections" will be returned.
If can't parse the xml input, a status of "Invalid XML input" will be returned.
If the map's type or title is not specified, a status of "Title or type is missing".
Wiki Markup |
---|
Input: the display map has the following fields: type (can be collection, slideshow, or savedsearch), title and description. The text enclosed in the <map> element (including <map>) is extracted and saved as map content. Because the map content itself is xml, it needs to be enclosed in the xml cdata block. The map content is not parse and is saved and returned as it is passed in.
Sample input:
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>__ _
_ _ _ _ _<__title__>__test map__</__title__>__ _
_ __ _ _<__map__>_
_ _ _<\!\[CDATA\[_
_ _ _<__page__>_
_ __ _ _<__item__>_
_ _ _ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ _ _ _ _<__title__>__bella and Sam__</__title__>_
_ _ _ _ _</__item__>_
_ _ _ _ _</__page__>_
_ _ _\]\]>_
_ _ _ _ _</__map__>_
_ _ _ _ _</__displaymap__>_ |
Wiki Markup |
---|
Sample output:
_<__status result__="__true__">_
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>_
_ _ _ _ _<__id__>__941d92ea-fa08-11db-bb62-4745336857f3__</__id__>_
_ _ _ _ _<__title__>__test map__</__title__>_
_ _ _ _ _<__createdBy__>__dongq__</__createdBy__>_
_ _ _ _ _<__createDate__>__05-04-2007 03:50 PM__</__createDate__>_
_ _ _ _ _<__modifiedBy__>__dongq__</__modifiedBy__>_
_ _ _ _ _<__modifiedDate__>__05-05-2007 01:50 PM__</__modifiedDate__>_
_ __ _ _<__map__>_
_ _ _<\!\[CDATA\[_
_ _ _<__page__>_
_ __ _ _<__item__>_
_ _ _ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ _ _ _ _<__title__>__bella and Sam__</__title__>_
_ _ _ _ _</__item__>_
_ _ _ _ _</__page__>_
_ _ _\]\]>_
_ _ _ _ _</__map__>_
_ _ _ _ _</__displaymap__>_
_</__status__>_
|
Wiki Markup |
---|
Method: DELETE
Uri: baseuri/map/\[map id\] |
Description: Deletes the map identified by map id.
Error Conditions:
If the user is a guest, a status of "Guest is not allowed to delete collections" will be returned.
If the map id is not specified in the uri, a status of "No map Id provided" will be returned.
If the map id does not exist, a status of "Error: Node does not exist" will be returned.
If the map id does not point to a map object, a status of "Error: id xxx is not of the type collection".
If the user doesn't have rights to see this map, a status of "Error: Access Denied. You do not have the appropriate permissions to perform this operation".
Sample input: None
Sample output:
<status result="true">
</status>
Wiki Markup |
---|
Method: PUT
Uri: baseuri/map/\[map id\] |
Description: Modifies the map identified by map id.
Error Conditions:
If the user is a guest, a status of "Guest is not allowed to update collections" will be returned.
If the map id is not specified in the uri, a status of "No map Id provided" will be returned.
If can't parse the xml input, a status of "Invalid XML input" will be returned.
If the map's type or title is not specified, a status of "Title or type is missing".
If the map id does not exist, a status of "Error: Node does not exist" will be returned.
If the map id does not point to a map object of the correct type, a status of "Error: id xxx is not of the type collection".
If the user doesn't have rights to see this map, a status of "Error: Access Denied. You do not have the appropriate permissions to perform this operation".
Input: the display map has the following fields: type (can be collection, slideshow, or savedsearch), id, title and description. The text enclosed in the <map> element (including <map>) is extracted and saved as map content. . Because the map content itself is xml, it needs to be enclosed in the xml cdata block. The map content is not parse and is saved and returned as it is passed in.
Wiki Markup |
---|
Sample input:
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>_
_ _ _ _ _<__id__>__941d92ea-fa08-11db-bb62-4745336857f3__</__id__>_
_ _ _ _ _<__title__>__test map modified__</__title__>__ _
_ __ _ _<__map__>_
_ _ _<\!\[CDATA\[_
_ _ _<__page__>_
_ __ _ _<__item__>_
_ _ _ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ _ _ _ _<__title__>__bella and Sam__</__title__>_
_ _ _ _ _</__item__>_
_ _ _ _ _</__page__>_
_ _ _\]\]>_
_ _ _ _ _</__map__>_
_ _ _ _ _</__displaymap__>_
|
Sample output:
<status result="true" />
maps:
Method: GET
Wiki Markup |
---|
Uri: baseuri/maps/collection
baseuri/maps/slideshow
baseuri/maps/savedsearch
baseuri/maps/item/\[item id\] |
Description:
URI 1, 2, 3, get display maps of the corresponding type.
URI 4 get all the display maps that reference the specific item
Error Conditions:
If a unknown map type is specified, a status "Unknown map type" is returned.
Input: None
Wiki Markup |
---|
Sample output for uri 1-3:
_<__status result__="__true__">_
_<__map-list__>_
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>_
_ _ _ _ _<__id__>__a7f76808-fa78-11db-bb62-4745336857f3__</__id__>_
_ _ _ _ _<__title__>__test map 2__</__title__>_
_ _ _ _ _<__createdBy__>__dongq__</__createdBy__>_
_ _ _ _ _<__createDate__>__05-04-2007 3:50 PM__</__createDate__>_
_ __ _ _<__modifiedBy__>__dongq__</__modifiedBy__>_
_ _ _ _ _<__modifiedDate__>__05-04-2007 3:50 PM__</__modifiedDate__>_
_<__map__>_
_ _ _<\!\[CDATA\[_
_<__page__>_
_<__item__>_
_ _ _ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ __ _ _<__title__>__bella and Sam__</__title__>_
_ __ _ _</__item__>_
_ _ _ _ _</__page__>_
_ __\]\]>_
_ __ _ _</__map__>_
_</__displaymap__>_
_<__displaymap__>_
_ _ _ _ _<__type__>__COLLECTION__</__type__>_
_ _ _ _ _<__id__>__941d92ea-fa08-11db-bb62-4745336857f3__</__id__>_
_ _ _ _ _<__title__>__test map 2__</__title__>_
_ _ _ _ _<__createdBy__>__dongq__</__createdBy__>_
_ __ _ _<__createDate__>__05-04-2007 02:27 AM__</__createDate__>_
_ _ _ _ _<__modifiedBy__>__dongq__</__modifiedBy__>_
_ _ _ _ _<__modifiedDate__>__05-04-2007 04:53 PM__</__modifiedDate__>_
_ __<__map__>_
_ _ _ __<\!\[CDATA\[_
_<__page__>_
_ __<__item__>_
_ __ _ _<__id__>__d8c8c9ee-f9f6-11db-b13f-3fb3f7e47bf8__</__id__>_
_ __ _ _<__title__>__bella and Sam 2__</__title__>_
_ _ _ _ _</__item__>_
_ _ _ _ _</__page__>_
_ _ _ __\]\]>_
_ _ _ _ _</__map__>_
_</__displaymap__>_
_</__map-list__>_
_</__status__>_
|
Sample output for uri 4:
<status result="true">
<collections>
<displaymap>
<type>COLLECTION</type>
<id>8fd4237d-fd7f-11db-ac65-756002f21ce0</id>
<title>test map 2</title>
</displaymap>
<displaymap>
<type>COLLECTION</type>
<id>163828b2-fda2-11db-ac65-756002f21ce0</id>
<title>test map 3</title>
</displaymap>
</collections>
<slideshows>
<displaymap>
<type>SLIDESHOW</type>
<id>df04d083-fd7f-11db-ac65-756002f21ce0</id>
<title>test slideshow</title>
</displaymap>
</slideshows>
</status>
user:
Method: GET
Wiki Markup |
---|
Uri: baseuri/user/\[user name\] |
Description: retrieves information about the user identified by the user name.
Error Conditions:
If the user name is not provided in the url, a status "No user provided" will be returned
If the client is a guest, a status "Guest is not allowed to retrieve user info" will be returned.
If the user does not exist, a status "User xxx does not exist" will be returned.
Input: none
Sample output:
<status result="true">
<user>
<name>dtanner</name>
<firstname>David</firstname>
<lastname>Tanner</lastname>
<emailaddress>dtanner@mit.edu</emailaddress>
<organization>MIT</organization>
<isAdmin>false</isAdmin>
</user>
</status>
Method: POST
Uri: baseuri/user
Description: Registers a user. It supports registering multiple users. After a user is registered, a user space and personal library will be created. The user will have permission to create libraries, collections, and slideshows. The user will also have write access to the public library.
Error Conditions:
If the xml input is empty or mal-formated, a status "Invalid XML input" will be returned.
If the user name is not provided, a status "User name is not provided" will be returned.
If the user name is the same as the special "public" account, a status "public is a reserved user name" will be returned.
If the client is not a domain admin, a status "xxx is not authorized to register new users in domain" will be returned.
If the user already exists in the domain, a status "User xxx already exists" will be returned.
Input: user fields are name, firstname, lastname, emailaddress, organization, isAdmin. Only the name field is mandatory. Organization defaults to MIT, and isAdmin defaults to false.
Sample Input:
<user>
<name>jsmith</name>
<firstname>John</firstname>
<lastname>Smith</lastname>
<emailaddress>jsmith@mit.edu</emailaddress>
</user>
Sample output:
<status result="true">
</status>
Wiki Markup |
---|
Method: PUT
Uri: baseuri/user/\[user name\] |
Description: Modified the user identified by the user name.
Error Conditions:
If the user name is missing in the url, a status "No user provided" will return.
If the xml input is empty or mal-formated, a status "Invalid XML input" will be returned.
If the user name in the xml is different from the user name in the uri, a status "User name can not be modified" will be returned.
If the client is not a domain admin, a status "xxx is not authorized to update user information in domain" will be returned.
Input:
user fields are name, firstname, lastname, emailaddress, organization, isAdmin. Only the name field is mandatory. Organization defaults to MIT, and isAdmin defaults to false.
Sample input:
<user>
<name>jsmith</name>
<firstname>John</firstname>
<lastname>Smith</lastname>
<emailaddress>jsmith@mit.edu</emailaddress>
<isAdmin>true</isAdmin>
</user>
Sample output:
<status result="true">
</status>
Method: DELETE
Wiki Markup |
---|
Uri: baseuri/user/\[user name\] |
Description: Delete the user identified by the user name.
Error Conditons:
If the user name is missing in the url, a status "No user provided" will return.
If the client is not a domain admin, a status "xxx is not authorized to unregister user in domain" will be returned.
If the user does not exist, a status "Error unregistering user xxxx : user does not exist." will be returned.
Input: none
Sample output:
<status result="true>
</status>
users:
Method: GET
Uri: baseuri/users
Description: Retrieves all the users in the domain.
Error Conditions:
If the client is a guest, a status "Guest is not allowed retrieve user info" will be returned.
Input: none
Sample output:
<status result="true">
<user-list>
<user>
<name>dongq</name>
<organization>MIT</organization>
<isAdmin>true</isAdmin>
</user>
<user>
<name>dtanner</name>
<organization>MIT</organization>
<isAdmin>false</isAdmin>
</user>
<user>
<name>state</name>
<organization>MIT</organization>
<isAdmin>false</isAdmin>
</user>
<user>
<name>jsmith</name>
<firstname>John</firstname>
<lastname>Smith</lastname>
<emailaddress>jsmith@mit.edu</emailaddress>
<organization>MIT</organization>
<isAdmin>true</isAdmin>
</user>
</user-list>
</status>