Just to get the discussion rolling, here are some proposed Create/Read/Update/Delete methods for a person/client's record. What do you think? -Eric
===client/add===
Adds a new client to the system. Should perform matching/unduplication.
====method input:====
(requires basic authentication)
application/xml. HTTP POST hmis:Person type instance from the schema at:
http://www.hmis.info/schema/3_0/HUD_HMIS.xsd====method return:====
text/plain. The newly sequentially generated integer client id in the OpenHMIS. If the method is unsuccessful, a "-1" is returned, with any XML Parsing errors in the message.
documentation for hmis:Person:
http://www.hmis.info/schema/3_0/docs/HUD_HMIS.xsd0.htmlcheck for XML validity.
----
===client/get===
Retrieves a client record by ID. This example url will retrieve the client with an id of ‘4’
http://domain.com/client/get?id=4====method input:====
(requires basic authentication)
an HTTP GET url integer ID parameter.
====method return:====
application/xml. An hmis:Person XML instance.
If a client ID that does not exist or is not accessible is requested, the method responds with
with a "-1" return value.
----
===client/update===
Updates an existing client in the system. The url parameter targets the to-be-updated client recorded. The POSTed XML provides the updated client record information.
====Example:====
http://domain.com/client/update (with HTTP POST XML attached to the request)
====method input:====
(requires basic authentication)
application/xml. HTTP POST hmis:Person type instance from the schema at:
http://www.hmis.info/schema/3_0/HUD_HMIS.xsd====method return:====
text/plain. Returns the updated client id in the OpenHMIS. If the method is unsuccessful, a "-1" is returned.
====documentation for hmis:Person:====
http://www.hmis.info/schema/3_0/docs/HUD_HMIS.xsd0.htmlcheck for XML validity.
----
===client/delete===
This web method actually simply inactivates the record, if it wasn’t already inactive.
====Example:====
http://domain/client/delete?id=5====method input:====
(requires basic authentication)
HTTP GET url integer “id” parameter.
====method return:====
Returns "200" if successful and “-1” if it failed to inactivate the client (if no matching record found, or insufficient permissions, etc.).
----