...
CREATE TABLE `TemplateRevision` (
`studyId` VARCHAR(255) NOT NULL,
`guid` VARCHAR(60) NOT NULL,
`createdOn` BIGINT UNSIGNED NULL,
`createdBy` VARCHAR(255) NOT NULL,
`storagePath` VARCHAR(255) NOT NULL,
`subject` VARCHAR(255) NULL,
`mimeType` ENUM('HTML', 'TEXT') NULL,
) CHARACTER SET utf8 COLLATE utf8_unicode_ci;
REST API
All are accessible to developers, workers should be able to get published revision of whatever:
GET /v3/templates?type=<type>
get documents of type (type parameter is required)POST /v3/templates
create new document with a single default revision with default contentGET /v3/templates/<guid>
get specific documentPOST /v3/templates/<guid>
update specific document (not revisioned, but optimistically locked)DELETE /v3/templates/<guid>?physical=true
delete specific document (logical or physical); probably just leaves revisions on S3GET /v3/templates/<guid>/revisions
get the revisions for a document (createdOn DESC) for history of editsPOST /v3/templates/<guid>/revisions
create a new revision of the given document (cannot update an existing revision)GET /v3/templates/<guid>/revisions/<createdOn>
get a specific revision of a documentPOST /v3/templates/<guid>/revisions/<createdOn>/publish
publish this revision as the revision to use when the document is selected