For notes on REST APIs during the 2017 Alkmaar SEC meeting.

Items to revisit / refine:

REST API publishing:


Validation errors of a COMPOSITION from a POST needs a structure defined in BASE - Pablo has suggestions


class ErrorAccumulator
	errors : List<Error>
end

class Error
    location: Integer
    code: String
	text: DV_TEXT
end

Also define set of standard error codes / tokens in openEHR similar to ADL V-codes which are defined in the AOM2 spec - See Veratech validation errors.

Other Qs:

DAY 2

copy header commit audit from Heath's email

BL: to commit lifecycle state in audit, want to be able to specify code or rubric string; 

need to add a copy of the lifecycle states from XML terminology to the REST overview documentation commit audit header.

Where are Uids supplied from?

Question of whether Composition uids should be supplied from the client side;

Reason to supply Uid is when it is to be used in FOLDERs referencing the COMPOSITION - this enables a single Contribution to contain FOLDER updates in the same CONTRIBUTION as COMPOSITION.

POST doesn't allow Uid; can use PUT without match-if header, and a supplied Uid.

Split PUT Composition into 2 calls - one with Version Uid supplied; other without; simplify documentation.

If Version Uid is supplied: it should all be there, including version = 1


Last updated

Heath: add a last-updated: date_time header (formatted according to HTTP rules, i.e. no milliseconds). For all GETs; ?POST response as well.