Template

From ToxBank API Wiki
Revision as of 07:36, 21 October 2011 by Nina (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Template


Contents

Protocol templates

Template content is specific for Protocols. There will be predefined templates for different kind of data. Templates and guidance how to use them can be shown via "Help resources" panel (on the right in the paper prototype).

N3 representation of a Template

tb:Template_12
     a       tb:Template .

Retrieve data templates, defined for a Protocol

Description Retrieves the data template, defined for a protocol
Resource Protocol
Method GET
URI /protocol/{id}/datatemplate
Parameters none
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input) none
Results The template representation in supported media type
Media Type (output) text/uri-list;application/rdf+xml;text/n3;text/csv
Status code 200,400,401,402,403

Links: Page, Edit with form



Create data template for a Protocol

Description Uploads a template, to be assigned to a protocol
Resource Protocol
Method POST
URI /protocol/{id}/datatemplate
Parameters (see cURL example)
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input) multipart/form-data
Results Task representation in supported MIME formats
Media Type (output) text/uri-list;application/rdf+xml;text/n3
Status code 200,202,400,401,402,403,500

Links: Page, Edit with form



Retrieve a data template

Description Retrieves a protocol template
Resource Protocol
Method GET
URI /protocol/{id}/datatemplate/{id}
Parameters none?
Header Parameters subjectid:SECURITY-TOKEN
Media Type (input) none?
Results The template representation in supported media type
Media Type (output) RDF,JSON,XML
Status code 200,400,401,402,403

Links: Page, Edit with form


Facts about TemplateRDF feed
Acts onProtocol  +
HasOperationAPI Protocol:RetrieveTemplates  +, API Protocol:UploadTemplate  + and API Protocol:RetrieveTemplate  +
Has output media typetext/uri-list;application/rdf+xml;text/n3;text/csv  +, text/uri-list;application/rdf+xml;text/n3  + and RDF,JSON,XML  +
Has status code200,400,401,402,403  + and 200,202,400,401,402,403,500  +
Personal tools