REST API
Data resources
Address |
Description |
GET /rest/blueprint-validation/1.0/data/${pageId} |
Get page validation status and parsed data Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/data/${pageId}" |
POST /rest/blueprint-validation/1.0/data |
Create report for a given template and JSON path Example: curl -H "X-Atlassian-Token: no-check" -H "Content-Type: application/json" \ -u "${WIKI_USER}:${WIKI_PASSWORD}" \ --data '{"template":"4784144","path":"[?(@.sales>250)]"}' \ "${WIKI_HOME}/rest/blueprint-validation/1.0/data" |
Template resources
A template parameter (${template}) stands for a template id (for space or global templates) or a template full module key (for blueprint templates).
A template module key shall includes full plugin key, for example: com.mesilat.blueprints-vcard:contact-template
Address |
Description |
GET /rest/blueprint-validation/1.0/template/${template}/generate-schema |
Generate JSON schema for a template Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}/generate-schema" |
PUT /rest/blueprint-validation/1.0/template/${template}/schema |
Upload JSON schema for a template Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ -H "Content-Type: application/json" -X PUT --data @schema.json \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}/schema" |
GET /rest/blueprint-validation/1.0/template/${template}/schema |
Download JSON schema for a template (last uploaded or autogenerated) Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}/schema" |
GET /rest/blueprint-validation/1.0/template/${template} |
Get validation mode for a template Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}" |
POST rest/blueprint-validation/1.0/template |
Set validation mode for a template Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ -H "Content-Type: application/json" -X POST \ --data '{"templateKey":"com.mesilat.blueprints-vcard:contact-template","validationMode":"WARN"}' \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template" |
PUT /rest/blueprint-validation/1.0/template/${template} |
Update validation mode for a template Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ -H "Content-Type: application/json" -X PUT \ --data '{"templateKey":"com.mesilat.blueprints-vcard:contact-template","validationMode":"WARN"}' \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}" |
DELETE /rest/blueprint-validation/1.0/template/${templateId} |
Clear template settings: validation mode and JSON schema Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" -X DELETE \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}" |
GET /rest/blueprint-validation/1.0/template/${template}/content |
Get template content Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}/content" |
PUT /rest/blueprint-validation/1.0/template/${template}/content |
Update template content. Only works with space or global template, but not with blueprints Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ -H "Content-Type: text/xml" -X PUT --data @content.xml \ "${WIKI_HOME}/rest/blueprint-validation/1.0/template/${template}/content" |
Validator resources
Address |
Description |
GET /rest/blueprint-validation/1.0/validator?extensive=true |
Export validators Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ "${WIKI_HOME}/rest/blueprint-validation/1.0/validator?extive=true" |
POST /rest/blueprint-validation/1.0/validator/upload |
Import validators Example: curl -H "X-Atlassian-Token: no-check" -u "${WIKI_USER}:${WIKI_PASSWORD}" \ -H "Content-Type: application/json" -X POST --data @validators.json \ "${WIKI_HOME}/rest/blueprint-validation/1.0/validator/upload" |