![]() The metadata is an XML document which main element is and which structure is described in http: ///xml/CXL.html#res-meta. Metadata This command returns the metadata of the resource referenced by the provided identifier. The following sections describe operations that can be performed on any resource, regardless of the type of resources. The authentication information must be sent with every request. A valid user ID and password should be used when performing operations on resources that don’t have general permissions for everyone. With GET requests, this parameter is provided in the URL, like for example: /resources/rid= /?cmd=get.resmetaįor POST requests, this parameter can still be provided in the URL, but can also be provided in the body, if the body contains an encoded HTML form.įinally, the HTTP API of the CmapServer uses HTTP Basic Authentication. The real semantics of the operation being performed on the resources is determined by an additional parameter provided with the request called cmd. As a consequence, the only distinction between GET and POST would be that GET is used for operations that don’t require extra information to be sent on the body of the request, while POST is used when the operation requires extra information in the body of the request, like for example, when uploading resources. We agree that it would have been more desirable to have used the other HTTP verbs to have a cleaner API, but due to limitations of HTTP client APIs on browsers, the operations that could have been performed using other HTTP verbs like PUT and DELETE, needed to be overloaded using GET and POST. Only two HTTP verbs are used in the API: GET and POST. The former URL scheme returns HTML representations of folders and Concept Maps, while the latter URL scheme returns XML representations. But to perform operations on the resource, the scheme to be used is the following: This distinction was made to allow HTML based navigation of the CmapServer. The following is the scheme of the URL to a resource: where resource-id is the identifier of the resource. Still, in order to navigate the CmapServer structure, the hierarchical structure as defined by folders and sub-folders must be followed. This is done to allow users to move resources without having to worry about breaking links. Even though the resources in the CmapServer are organized in folders, the URLs and identifiers don’t reflect that hierarchical structure. ![]() Every resource in the CmapServer has a unique identifier, which is a sequence of characters, like for example 1J9Z7K038-10GZ44G-K5N. In this API, resources are referenced by their URLs. In some cases operations can be performed without needing to know the type of resource that the operation is being performed upon, but in other cases, other operations are only permitted for certain type of resources, like for example, changing permissions is only allowed for folders.Īs the most important entity of the architecture is the resource, the most important part of the API is how we refer to those resources. A resource can either be a folder or a file in the CmapServer. In the CmapServer architecture the main entity is the resource, and the API simply allows to perform operations on resources. The API is inspired by the representational state transfer (REST) architectural style. The CmapServer HTTP API intends to provide a simpler method of access to the resources on the CmapServer. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |