Below is FluidDB API function documentation for toplevel=robots.txt, verb=*.
General information about the HTTP API can be found here. Typographic conventions used on this page are listed at bottom.
We couldn't find the exact API information you were looking for. Did you type in the correct URL in your browser's address bar?
| /namespaces: | POST, GET, PUT, DELETE. |
| /objects: | POST, GET, HEAD, PUT, DELETE. |
| /permissions: | POST, GET, PUT, DELETE. |
| /policies: | POST, GET, PUT, DELETE. |
| /tags: | POST, GET, PUT, DELETE. |
| /users: | GET. |
Create a new namespace.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| description | unicode string | True | A description of the namespace. |
| name | unicode string | True | The name of the new namespace. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| URI | unicode string | The URI of the new namespace. |
| id | unicode string | The id of the object that corresponds to the new namespace. |
Create a new namespace called 'people' in the test user's top-level namespace.
POST /namespaces/test HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"description": "A namespace for tags that I'm using to add to people",
"name": "people"
}
HTTP/1.1 201 Created
Content-Length: 110
Location: http://fluiddb.fluidinfo.com/namespaces/test/people
Date: Mon, 02 Aug 2010 12:40:41 GMT
Content-Type: application/json
{"id": "e9c97fa8-05ed-4905-9f72-8d00b7390f9b",
"URI": "http:\/\/fluiddb.fluidinfo.com\/namespaces\/test\/people"}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the namespace already exists. | 412 (Precondition Failed) |
| If a parent namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have CREATE permission on the parent namespace. | 401 (Unauthorized) |
| If the full path of the new namespace is too long. The current maximum path length is 233 characters. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| If the namespace is created successfully. | 201 (Created) |
Get information about the namespaces contained in a namespace.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| returnDescription | Boolean | False | False | If True, also return the namespace description. |
| returnNamespaces | Boolean | False | False | If True, also return the names of the namespaces in this namespace. |
| returnTags | Boolean | False | False | If True, also return the names of the tags in this namespace. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| description | unicode string | A description of the namespace. This field is only present if returnDescription is True in the request. |
| id | unicode string | The id of the FluidDB object corresponding to the namespace. |
| namespaceNames | list of unicode strings | The names of the sub-namespaces in this namespace. This field is only present if returnNamespaces is True in the request. |
| tagNames | list of unicode strings | The names of the tags in this namespace (only present if returnTags is True in the request). |
Retrieve information about the test/people namespace.
GET /namespaces/test/people?returnDescription=True&returnNamespaces=True&returnTags=True HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 118
Date: Mon, 02 Aug 2010 12:43:05 GMT
Content-Type: application/json
{"tagNames": [], "namespaceNames": [], "id": "e9c97fa8-05ed-4905-9f72-8d00b7390f9b",
"description": "A namespace for tags I'm using to add to people"}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the namespace does not exist. | 404 (Not Found) |
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have LIST permission on the namespace. | 401 (Unauthorized) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
Update a namespace.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| description | unicode string | True | A description of the namespace. |
Update the description of the test/people namespace.
PUT /namespaces/test/people HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"description": "Contains tags used to annotate objects representing people"
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 12:46:38 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the namespace does not exist. | 404 (Not Found) |
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have UPDATE permission on the namespace. | 401 (Unauthorized) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If the namespace is updated successfully. | 204 (No Content) |
Delete a namespace.
Delete the test/people namespace.
DELETE /namespaces/test/people HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 12:47:25 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the namespace does not exist. | 404 (Not Found) |
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have DELETE permission on the namespace. | 401 (Unauthorized) |
| If the namespace is not empty. A namespace is empty if it contains no other namespaces or tags. | 412 (Precondition Failed) |
| If the namespace is deleted successfully. | 204 (No Content) |
Methods for creating new objects and for adding tags to objects.
Create a new object.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| about | unicode string | False | The value for the about tag. If you do not want an an about tag on this object, omit this field. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| URI | unicode string | The URI of the new object. |
| id | unicode string | The id of the new object. |
Create an object with an about tag that indicates the object represents the book 'Dune'.
POST /objects HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"about": "book:Dune"
}
HTTP/1.1 201 Created
Content-Length: 134
Location: http://fluiddb.fluidinfo.com/objects/9c8e4b12-4b7d-40d2-865b-d5b1945350b1
Date: Mon, 02 Aug 2010 13:00:29 GMT
Content-Type: application/json
{"id": "9c8e4b12-4b7d-40d2-865b-d5b1945350b1",
"URI": "http:\/\/fluiddb.fluidinfo.com\/objects\/9c8e4b12-4b7d-40d2-865b-d5b1945350b1"}
Create a new object without an about tag.
POST /objects HTTP/1.1 Authorization: Basic XXXXXXXX Content-Length: XXXXXXXX Content-Type: application/json
HTTP/1.1 201 Created
Content-Length: 134
Location: http://fluiddb.fluidinfo.com/objects/741fdbcb-a8c5-449f-a3cf-50c89ee63cdb
Date: Mon, 02 Aug 2010 13:01:05 GMT
Content-Type: application/json
{"id": "741fdbcb-a8c5-449f-a3cf-50c89ee63cdb",
"URI": "http:\/\/fluiddb.fluidinfo.com\/objects\/741fdbcb-a8c5-449f-a3cf-50c89ee63cdb"}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| An error with the request payload. More details. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| A new object was created without error. | 201 (Created) |
The GET method on objects is used to retrieve objects matching a query (on object tags), to retrieve information about a particular object, or to retrieve the value of a tag on a particular object.
Search for objects that match a query.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| query | string | True | A query string specifying what sorts of objects to return. The query language is described here. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| ids | list of unicode strings | A list of object ids matching the query. Each object id is a UUID string (as described here). |
Search for objects in FluidDB (note the URL encoded query argument).
GET /objects?query=has%20ntoll/met%20and%20has%20terrycojones/met HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 209
Date: Mon, 02 Aug 2010 13:14:32 GMT
Content-Type: application/json
{"ids": ["5a4823a4-26b4-495c-9a29-a1e830a1b153", "8b07a7ec-e5f7-46cd-9cd1-9a40c3137762",
"83f2ad81-43db-421a-adc4-974f3a8bca0d", "ac1e937e-dd76-426e-a2b5-06a439a708cc",
"52bc041d-e8f4-4f8d-a66a-a3b5ea5fa156"]}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If no query is given. | 400 (Bad Request) |
| If the query string could not be parsed. | 400 (Bad Request) |
| If the query (or any of its sub-parts) results in too many matching objects. The current limit is 1 million objects. | 413 (Request Entity Too Large) |
| If the requesting user has SEE but not READ permission on a tag whose value is needed to satisfy the query. | 401 (Unauthorized) |
| If the requesting user does not have SEE permission on a tag whose value or existence is needed to satisfy the query. | 404 (Not Found) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error occurred. | 200 (OK) |
To request information on a particular object, include the object ID in the request URI. The return information will indicate which tags are present on the object, though not with the tag values.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| showAbout | string | False | False | If True, return the value of the about tag on the object. If the object does not have an about tag, the response payload will still contain an about key, with, in the case of a JSON payload, a null value. If False, the payload will not have an about key. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| about | unicode string | The about tag on the object, if any. |
| tagPaths | list of unicode strings | The full path names of the tags on this object (for which the requesting user has SEE permission), if any. |
Retrieve information about a specific object (the 'tagPaths' list in the response has been truncated)
GET /objects/5a4823a4-26b4-495c-9a29-a1e830a1b153?showAbout=True HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 1080
Date: Mon, 02 Aug 2010 13:16:09 GMT
Content-Type: application/json
{"about": "twitter.com:uid:5893972", "tagPaths": ["twitter.com\/friends\/fxn"]}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If no object with the given ID exists. | 404 (Not Found) |
| An error with the request payload. More details. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error occurred. | 200 (OK) |
Retrieve the value of a tag from an object. The value is returned in the payload of the response. Please see here for more details.
Return a primitive value type from FluidDB. Note that the Content-Type header in the response is application/vnd.fluiddb.value+json, as given to FluidDB when the value was PUT.
GET /objects/5a4823a4-26b4-495c-9a29-a1e830a1b153/twitter.com/users/screen_name HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK Content-Length: 6 Date: Mon, 02 Aug 2010 13:20:31 GMT Content-Type: application/vnd.fluiddb.value+json "HD42"
Return an opaque value type from FluidDB. Note that the Content-Type header in the response is text/html, because the tag value is of that type, as given to FluidDB when the value was PUT.
GET /objects/366375a5-c811-4c59-a469-0a3efb602411/ntoll/fluidapp/tweetmeet/index.html HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 6666
Date: Mon, 02 Aug 2010 13:25:28 GMT
Content-Type: text/html
<html>
<head>
<title>Hello</title>
</head>
<body>
Hello
</body>
</html>
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the requesting user has SEE but not READ permission for the tag. | 401 (Unauthorized) |
| If the requesting user does not have SEE permission for the tag. | 404 (Not Found) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| If you do not specify an Accept header value that allows the tag value to be returned. | 406 (Not Acceptable) |
| If the object has an instance of the tag and the requesting user has READ permission for the tag. | 200 (OK) |
The HEAD method on objects can be used to test whether an object has a given tag or not, without retrieving the value of the tag.
Test for the existence of a tag on an object.
Retrieve the headers associated with a tag attached to a specific object.
HEAD /objects/366375a5-c811-4c59-a469-0a3efb602411/ntoll/fluidapp/tweetmeet/index.html HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK Content-Length: 0 Date: Mon, 02 Aug 2010 13:26:25 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the requesting user does not have SEE permission for the tag. | 404 (Not Found) |
| If the requesting user has SEE permission for the tag, but the tag is not on the object. | 404 (Not Found) |
| The object has an instance of the tag and the requesting user has SEE permission for the tag. | 200 (OK) |
Create or update a tag on an object.
Create or update a tag on an object. The tag value is sent in the payload of the request. See here for more details.
Write a primitive value type to FluidDB. Note the Content-Type header in the request is set to application/vnd.fluiddb.value+json to indicate to FluidDB that this is a primitive value.
PUT /objects/5a4823a4-26b4-495c-9a29-a1e830a1b153/test/quz HTTP/1.1 Authorization: Basic XXXXXXXX Content-Length: XXXXXXXX Content-Type: application/vnd.fluiddb.value+json "1.234"
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 14:31:47 GMT Content-Type: text/html
Write an opaque value type to FluidDB. Note that the Content-Type header in the request is set to application/pdf indicating to FluidDB that this value is opaque. When this value is retrieved the Content-Type header in the response will be application/pdf. (The body of the request has been truncated.)
PUT /objects/5a4823a4-26b4-495c-9a29-a1e830a1b153/test/quz HTTP/1.1 Authorization: Basic XXXXXXXX Content-Length: XXXXXXXX Content-Type: application/pdf %PDF-1.4 1 0 obj << /Length 2 0 R /Filter /FlateDecode >> stream ...
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 14:33:40 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the requesting user has SEE but not CREATE permission on the tag. | 401 (Unauthorized) |
| If the requesting user does not have SEE permission on the tag. | 404 (Not Found) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If the tag is successfully created / updated on the object. | 204 (No Content) |
Delete a tag from an object. Note that it is not possible to delete a FluidDB object.
Delete a tag from an object.
Delete the test/quz tag from the referenced object.
DELETE /objects/5a4823a4-26b4-495c-9a29-a1e830a1b153/test/quz HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 14:56:52 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the object does not exist. | 404 (Not Found) |
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the object does not have an instance of the tag. | 404 (Not Found) |
| If the object has an instance of the tag and the user has SEE but not DELETE permission on the tag. | 401 (Unauthorized) |
| If the object has an instance of the tag and the user has neither SEE nor DELETE permission on the tag. | 404 (Not Found) |
| The tag is successfully deleted from the object. | 204 (No Content) |
POST is not supported on permissions, because permissions are automatically set from a user's default permissions when a namespace or tag is first created. Use PUT to adjust the permissions on a given namespace or tag.
Get the permissions on a namespace: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is sought. Possible values are: create, update, delete, list, control. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| exceptions | list of unicode strings | The names of the users who are exceptions to the policy. |
| policy | unicode string | The policy (either 'open' or 'closed'). |
Retrieve the 'create' policy for the test namespace.
GET /permissions/namespaces/test?action=create HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 44
Date: Mon, 02 Aug 2010 14:58:28 GMT
Content-Type: application/json
{"policy": "closed", "exceptions": ["test"]}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the namespace. | 401 (Unauthorized) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
Get the permissions on a tag: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is sought. Possible values are: update, delete, control. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| exceptions | list of unicode strings | The names of the users who are exceptions to the policy. |
| policy | unicode string | The policy (either 'open' or 'closed'). |
Retrieve the 'update' policy for the test/quz tag.
GET /permissions/tags/test/quz?action=update HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 44
Date: Mon, 02 Aug 2010 14:59:22 GMT
Content-Type: application/json
{"policy": "closed", "exceptions": ["test"]}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the tag. | 401 (Unauthorized) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
Get the permissions on the set of tag instances: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is sought. Possible values are: see, create, read, delete, control. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| exceptions | list of unicode strings | The names of the users who are exceptions to the policy. |
| policy | unicode string | The policy (either 'open' or 'closed'). |
Retrieve the 'delete' policy for values associated with the test/quz tag.
GET /permissions/tag-values/test/quz?action=delete HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 36
Date: Mon, 02 Aug 2010 14:59:54 GMT
Content-Type: application/json
{"policy": "open", "exceptions": []}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the tag. | 401 (Unauthorized) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
Update the permissions on a namespace: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is to be updated. Possible values are: create, update, delete, list, control. |
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| exceptions | list of unicode strings | True | The names of the users who are exceptions to the policy. |
| policy | unicode string | True | The policy (either 'open' or 'closed'). |
Update the 'create' policy for the test namespace.
PUT /permissions/namespaces/test?action=create HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"policy": "closed",
"exceptions": ["test", "ntoll"]
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:03:42 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the namespace does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the namespace. | 401 (Unauthorized) |
| If the policy is not 'open' or 'closed'. | 400 (Bad Request) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If permissions are changed successfully. | 204 (No Content) |
Update the permissions on a tag: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is to be updated. Possible values are: update, delete, control. |
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| exceptions | list of unicode strings | True | The names of the users who are exceptions to the policy. |
| policy | unicode string | True | The policy (either 'open' or 'closed'). |
Update the 'update' policy for the test/quz tag.
PUT /permissions/tags/test/quz?action=update HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"policy": "closed",
"exceptions": ["test", "ntoll"]
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:04:39 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the tag. | 401 (Unauthorized) |
| If the policy is not 'open' or 'closed'. | 400 (Bad Request) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If permissions are changed successfully. | 204 (No Content) |
Update the permissions on a tag's instances: the open/closed policy, and the set of exceptions to the policy.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| action | string | True | The action whose permissions information is to be updated. Possible values are: see, create, read, delete, control. |
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| exceptions | list of unicode strings | True | The names of the users who are exceptions to the policy. |
| policy | unicode string | True | The policy (either 'open' or 'closed'). |
Update the 'create' policy for values associated with the test/quz tag.
PUT /permissions/tag-values/test/quz?action=create HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"policy": "closed",
"exceptions": ["test", "ntoll"]
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:08:44 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have CONTROL permission on the tag. | 401 (Unauthorized) |
| If the policy is not 'open' or 'closed'. | 400 (Bad Request) |
| If the action argument is missing or invalid. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If permissions are changed successfully. | 204 (No Content) |
POST is not supported on policies because users have a set of policies assigned when they are created.
Get a user's default permission policy for a given category and action. These are the permissions that will be assigned to new tags and namespaces created by the user.
category must be one of 'namespaces', 'tags' or 'tag-values'. The actions available by category are as follows.
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| exceptions | list of unicode strings | The names of the users who are exceptions to the policy. |
| policy | unicode string | The policy (either 'open' or 'closed'). |
Retrieve the default 'create' policy for the test user's namespaces.
GET /policies/test/namespaces/create HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 44
Date: Mon, 02 Aug 2010 15:11:35 GMT
Content-Type: application/json
{"policy": "closed", "exceptions": ["test"]}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the user does not exist. | 404 (Not Found) |
| If the category/action pair is invalid or missing. | 404 (Not Found) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| The policy is returned successfully. | 200 (OK) |
Update a user's default permission policy for a given category and action. These are the permissions that will be assigned to new tags and namespaces created by the user.
The category and action components of the URI are as for GET.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| exceptions | list of unicode strings | True | The names of the users who are exceptions to the policy. |
| policy | unicode string | True | The policy (either 'open' or 'closed'). |
Update the default 'create' policy for the test user's namespaces.
PUT /policies/test/namespaces/create HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"policy": "closed",
"exceptions": ["test"]
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:12:40 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the requesting user is not the user in the URI | 401 (Unauthorized) |
| If the user does not exist. | 404 (Not Found) |
| If the category/action pair is invalid or missing. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| Policy updated successfully. | 204 (No Content) |
Add a tag name to a namespace.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| description | unicode string | True | A description of the tag. |
| indexed | boolean | True | Whether or not tag values should be indexed. |
| name | unicode string | True | The name of the new tag. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| URI | unicode string | The URI of the new object. |
| id | unicode string | The id of the object that corresponds to the new tag. |
Create a new tag called 'rating' in the test users top-level namespace
POST /tags/test HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"description": "Indicates how I rate something on a scale of 1 (worst) to 10 (best).",
"indexed": false,
"name": "rating"
}
HTTP/1.1 201 Created
Content-Length: 110
Location: http://fluiddb.fluidinfo.com/tags/test/rating
Date: Mon, 02 Aug 2010 15:15:00 GMT
Content-Type: application/json
{"id": "56e0c31a-1a4c-4091-8a65-b37af769752a",
"URI": "http:\/\/fluiddb.fluidinfo.com\/tags\/test\/rating"}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the containing namespace or an intermediate namespace does not exist. | 404 (Not Found) |
| If the user does not have CREATE permission on the containing (i.e., deepest) namespace. | 401 (Unauthorized) |
| If the tag already exists. | 412 (Precondition Failed) |
| If the full path of the new tag is too long. The current maximum path length is 233 characters. | 400 (Bad Request) |
| An error with the request payload. More details. | 400 (Bad Request) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| If the tag is created successfully. | 201 (Created) |
Retrieve information about the tag.
| Name | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| returnDescription | Boolean | False | False | If True, return the description of the tag. |
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| description | unicode string | A description of the tag. This field is only present if returnDescription is True in the request. |
| id | unicode string | The id of the FluidDB object corresponding to the tag. |
| indexed | boolean | Whether or not tag values are indexed. |
Retrieve information about the test/rating tag.
GET /tags/test/rating?returnDescription=True HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 200 OK
Content-Length: 108
Date: Mon, 02 Aug 2010 15:15:59 GMT
Content-Type: application/json
{"indexed": false, "id": "56e0c31a-1a4c-4091-8a65-b37af769752a",
"description": "Indicates how I rate something on a scale of 1 (worst) to 10 (best)."}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
Note that this is not the same as determining whether the tag appears on a particular object. In that case, the SEE permission is checked. So while any user can check if a tag exists, without the SEE permission they cannot tell if there is an instance of the tag on an object.
Update information about a tag in a namespace.
The request payload must be sent in application/json format with the following fields:
| Field name | Field type | Mandatory | Description |
|---|---|---|---|
| description | unicode string | True | A description of the tag. |
Update the description of the test/rating tag.
PUT /tags/test/rating HTTP/1.1
Authorization: Basic XXXXXXXX
Content-Length: XXXXXXXX
Content-Type: application/json
{
"description": "Indicates rating from 1 (bad) -> 10 (good)"
}
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:16:59 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have UPDATE permission on the tag. | 401 (Unauthorized) |
| An error with the request payload. More details. | 400 (Bad Request) |
| If the operation completes successfully. | 204 (No Content) |
Delete a tag. The tag name is removed from its containing namespace and all occurences of the tag on objects are deleted.
Delete the test/rating tag.
DELETE /tags/test/rating HTTP/1.1 Authorization: Basic XXXXXXXX
HTTP/1.1 204 No Content Date: Mon, 02 Aug 2010 15:17:38 GMT Content-Type: text/html
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If an intermediate namespace does not exist. | 404 (Not Found) |
| If the tag does not exist. | 404 (Not Found) |
| If the requesting user does not have DELETE permission on the tag. | 401 (Unauthorized) |
| If the operation completes successfully. | 204 (No Content) |
Return information about a particular user.
The response payload will be sent in application/json format with the following fields:
| Field name | Field type | Description |
|---|---|---|
| id | unicode string | The id of the object corresponding to the user. |
| name | unicode string | The user's name. |
Retrieve information about the user 'ntoλλ'. Note that to specify unicode 'λ' characters in the request URI, you must first convert them to UTF-8 and then URL-encode them. Unicode is returned in the response, in the manner specified by the json specification.
GET /users/nto%CE%BB%CE%BB HTTP/1.1
HTTP/1.1 200 OK
Content-Length: 62
Date: Mon, 02 Aug 2010 15:18:17 GMT
Content-Type: application/json
{"name": "Nicholas To\u03bb\u03bbervey", "id": "42909deb-9854-47ae-a8f8-3f59d4fbe5a5"}
The following HTTP response codes may occur:
| Condition | Return |
|---|---|
| If the user does not exist. | 404 (Not Found) |
| An error with the request makes it impossible to respond. More details. | 400 (Bad Request) |
| No error. | 200 (OK) |
The following typographic conventions are used above: