Commit 3b33b526 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Merge branch 'introspection4' into 'master'

Clarified use of OPTIONS and PROPFIND

See merge request !22
parents 394b7c3a 8e122e45
......@@ -96,13 +96,10 @@ On successful deletion, return HTTP status 200 (OK).
## OPTIONS
The OPTIONS method is used for introspection. This allows for both introspection of collection methods available and introspection
of record information.
The OPTIONS method is used for introspection. This allows for introspection of collection methods available.
Using the OPTIONS method on the root path of the URI followed by a \* should provide a list of collections available.
Using the OPTIONS method on a collection :record_id path should provide information on the record structure.
The 204 error code should be returned if OPTIONS is not implemented for the requested resource.
### Return Codes
......@@ -114,7 +111,6 @@ The 204 error code should be returned if OPTIONS is not implemented for the requ
### Examples
* OPTIONS http://www.example.com/\*
* OPTIONS http://www.example.com/customers
* OPTIONS http://www.example.com/customers/:record_id
## PROPFIND
......@@ -123,6 +119,8 @@ 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.
The 204 error code should be returned if OPTIONS is not implemented for the requested resource.
### Return Codes
......@@ -132,7 +130,9 @@ The 204 error code should be returned if OPTIONS is not implemented for the requ
* If PROPFIND is not implemented for this resource.
### Examples
* PROPFIND http://www.example.com
* PROPFIND http://www.example.com/customers
* PROPFIND http://www.example.com/customers/:record_id
......@@ -531,39 +531,6 @@ A OPTIONS method response to http://www.example.com/issues may look like this...
}
}
},
"OPTIONS": {
"description": "Issue information",
"path": "/issues/:record_id",
"url": {
":record_id": {
"type": "string",
"description": "This is a string literal ':record_id'",
"required": true
}
},
"returns": {
"status": {
"type": "status",
"description": "Result of request"
},
"data": {
"type": "hash",
"description": "Hash containing result of action, returned only on success",
"children": {
"result": {
"type": "hash",
"description": "Hash containing record properties",
"children": {
"properties": {
"type": "hash",
"description": "Record properties hash"
}
}
}
}
}
}
},
"PROPFIND": {
"description": "Collection information",
"path": "/issues",
......
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