Created
September 12, 2012 15:26
-
-
Save jwaldrip/3707404 to your computer and use it in GitHub Desktop.
A JSON based Specification for API Discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "api": "Providers API", | |
"description": "An api to access providers", | |
"url": "https://api.itriagehealth.com/api/v1/providers", | |
"resources": [ | |
"medical_facilities", | |
"physicians" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "resource": "Medical Facility", | |
"description": "A medical facilities information and summary", | |
"formats": ["json", "xml"], | |
"authorization_type": "oauth", | |
"authorization_types": ["oauth", "basic", "token"] | |
"actions": { | |
"index": { | |
"path": "/medical_facilities.:format", | |
"method": "GET", | |
"requires_authorization": false, | |
"return_type": "collection" | |
}, | |
"search": { | |
"path": "/medical_facilities/search.:format", | |
"method": "GET", | |
"requires_authorization": false, | |
"return_type": "collection" | |
}, | |
"create": { | |
"path": "/medical_facilities.:format", | |
"method": "POST", | |
"requires_authorization": false, | |
"return_type": "resource" | |
}, | |
"read": { | |
"path": "/medical_facilities/:id.:format", | |
"method": "GET", | |
"requires_authorization": false, | |
"return_type": "resource" | |
}, | |
"update": { | |
"path": "/medical_facilities/:id.:format", | |
"method": "PUT", | |
"requires_authorization": false, | |
"return_type": "resource" | |
}, | |
"delete": { | |
"path": "/medical_facilities/:id.:format", | |
"method": "DELETE", | |
"requires_authorization": false, | |
"return_type": "success" | |
} | |
}, | |
"attributes": { | |
"name": { "type": "string", "required": true, "readonly": "false", "actions": ["create", "index", "read", "update"] }, | |
"addresses": { "type": "array", "readonly": "false", "actions": ["index", "read"] }, | |
"addresses_attributes": { "type": "array", "required": true, "readonly": "false", "actions": ["create", "update"] } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search should have a :query var maybe?