Commit 05ce35a1 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Cleaned up results to be returned

parent 3b33b526
......@@ -119,7 +119,7 @@ be used to determine properties of arbitrary resources.
Using the PROPFIND method on the root path of the URI should return information on the API.
Using the PROPFIND method on a collection :record_id path should provide information on the record structure.
Using the PROPFIND method on a collection path should provide information on the record structure.
The 204 error code should be returned if OPTIONS is not implemented for the requested resource.
......@@ -132,7 +132,6 @@ The 204 error code should be returned if OPTIONS is not implemented for the requ
### Examples
* PROPFIND http://www.example.com
* PROPFIND http://www.example.com/customers
* PROPFIND http://www.example.com/customers/:record_id
......@@ -184,7 +183,7 @@ For a successful status which returns a single result...
{
status: "success",
data: {
result: {
record: {
username: 1,
firstname: 2
}
......@@ -289,11 +288,9 @@ An OPTIONS method response to http://www.example.com/\* may look like this...
{
"status": "success",
"data": {
"result": {
"collections": [
"/issues"
]
}
"collections": [
"/issues"
]
}
}
```
......@@ -342,15 +339,9 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"record": {
"type": "hash",
"description": "Hash containing created record details",
"children": {
"record": {
"type": "hash",
"description": "Record hash"
}
}
"description": "Record hash"
}
}
}
......@@ -384,19 +375,13 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"record": {
"type": "hash",
"description": "Hash containing record details",
"children": {
"record": {
"type": "hash",
"description": "Record hash, returned for a single record request only"
},
"records": {
"type": "array",
"description": "Array of records, returned for a multi-record request only"
}
}
"description": "Record hash, returned for a single record request only"
},
"records": {
"type": "array",
"description": "Array of records, returned for a multi-record request only"
}
}
}
......@@ -461,15 +446,9 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"record": {
"type": "hash",
"description": "Hash containing changed record details",
"children": {
"record": {
"type": "hash",
"description": "Record hash"
}
}
"description": "Record hash"
}
}
}
......@@ -517,15 +496,30 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"record": {
"type": "hash",
"description": "Record hash"
}
}
}
}
},
"OPTIONS": {
"description": "Collection method information",
"path": "/issues",
},
"returns": {
"status": {
"type": "status",
"description": "Result of request"
},
"data": {
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"methods": {
"type": "hash",
"description": "Hash containing replaced record details",
"children": {
"record": {
"type": "hash",
"description": "Record hash"
}
}
"description": "Method information hash"
}
}
}
......@@ -543,19 +537,13 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"definition": {
"type": "hash",
"description": "Hash containing collection information",
"children": {
"definition": {
"type": "hash",
"description": "Record definition hash"
},
"records": {
"type": "integer",
"description": "Number of items in collection"
}
}
"description": "Record definition hash"
},
"records": {
"type": "integer",
"description": "Number of items in collection"
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment