Template engine (v2.2)

http://api.example.com/{version}

Table of contents

mod-template-engine API

This module dedicated for storing templates and generating text, html, xml, doc, docx etc from the template.

/templates

POST /templates

Add a new template

POST /templates
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id"
    },
    "description": {
      "type": "string",
      "description": "Template description"
    },
    "outputFormats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of output formats"
    },
    "templateResolver": {
      "type": "string",
      "description": "Template engine name"
    },
    "localizedTemplates": {
      "type": "object",
      "description": "List of localized templates",
      "additionalProperties": {
        "type": "object",
        "description": "Template content",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "additionalProperties": false,
        "properties": {
          "header": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for header"
          },
          "body": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for body"
          },
          "attachments": {
            "description": "List of attachments",
            "id": "attachments",
            "type": "array",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "header",
          "body"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate",
        "createdByUserId"
      ]
    }
  },
  "required": [
    "templateResolver",
    "localizedTemplates",
    "outputFormats"
  ]
}

Response 201

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id"
    },
    "description": {
      "type": "string",
      "description": "Template description"
    },
    "outputFormats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of output formats"
    },
    "templateResolver": {
      "type": "string",
      "description": "Template engine name"
    },
    "localizedTemplates": {
      "type": "object",
      "description": "List of localized templates",
      "additionalProperties": {
        "type": "object",
        "description": "Template content",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "additionalProperties": false,
        "properties": {
          "header": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for header"
          },
          "body": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for body"
          },
          "attachments": {
            "description": "List of attachments",
            "id": "attachments",
            "type": "array",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "header",
          "body"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate",
        "createdByUserId"
      ]
    }
  },
  "required": [
    "templateResolver",
    "localizedTemplates",
    "outputFormats"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "errors": {
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /templates

Get a list of templates

GET /templates
Query Parameters
  • offset: (integer - default: 0 - minimum: 0 - maximum: 2147483647)

    Skip over a number of elements by specifying an offset value for the query

    Example:

    0
  • limit: (integer - default: 10 - minimum: 0 - maximum: 2147483647)

    Limit the number of elements returned in the response

    Example:

    10
  • query: (string)

    A query string to filter templates based on matching criteria in fields.

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Collection of templates",
  "properties": {
    "templates": {
      "type": "array",
      "description": "List of templates",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Template",
        "properties": {
          "id": {
            "type": "string",
            "description": "Template id"
          },
          "description": {
            "type": "string",
            "description": "Template description"
          },
          "outputFormats": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of output formats"
          },
          "templateResolver": {
            "type": "string",
            "description": "Template engine name"
          },
          "localizedTemplates": {
            "type": "object",
            "description": "List of localized templates",
            "additionalProperties": {
              "type": "object",
              "description": "Template content",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "additionalProperties": false,
              "properties": {
                "header": {
                  "type": "string",
                  "pattern": "\\S+.*",
                  "description": "Template for header"
                },
                "body": {
                  "type": "string",
                  "pattern": "\\S+.*",
                  "description": "Template for body"
                },
                "attachments": {
                  "description": "List of attachments",
                  "id": "attachments",
                  "type": "array",
                  "items": {
                    "type": "object",
                    "$schema": "http://json-schema.org/draft-04/schema#",
                    "description": "Message attachment",
                    "additionalProperties": false,
                    "properties": {
                      "contentType": {
                        "type": "string",
                        "description": "Content type"
                      },
                      "name": {
                        "type": "string",
                        "description": "Name"
                      },
                      "description": {
                        "type": "string",
                        "description": "Description"
                      },
                      "data": {
                        "type": "string",
                        "description": "Attachment data"
                      },
                      "disposition": {
                        "type": "string",
                        "description": "Disposition"
                      },
                      "contentId": {
                        "type": "string",
                        "description": "Content id"
                      }
                    }
                  }
                }
              },
              "required": [
                "header",
                "body"
              ]
            }
          },
          "metadata": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Metadata Schema",
            "properties": {
              "createdDate": {
                "description": "Date and time when the record was created",
                "type": "string",
                "format": "date-time"
              },
              "createdByUserId": {
                "description": "ID of the user who created the record",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "createdByUsername": {
                "description": "Username of the user who created the record (when available)",
                "type": "string"
              },
              "updatedDate": {
                "description": "Date and time when the record was last updated",
                "type": "string",
                "format": "date-time"
              },
              "updatedByUserId": {
                "description": "ID of the user who last updated the record",
                "type": "string",
                "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
              },
              "updatedByUsername": {
                "description": "Username of the user who last updated the record (when available)",
                "type": "string"
              }
            },
            "additionalProperties": false,
            "required": [
              "createdDate",
              "createdByUserId"
            ]
          }
        },
        "required": [
          "templateResolver",
          "localizedTemplates",
          "outputFormats"
        ]
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "templates",
    "totalRecords"
  ]
}

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

GET /templates/{templateId}

Get template by id

GET /templates/{templateId}
URI Parameters
  • templateId: required (string)

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id"
    },
    "description": {
      "type": "string",
      "description": "Template description"
    },
    "outputFormats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of output formats"
    },
    "templateResolver": {
      "type": "string",
      "description": "Template engine name"
    },
    "localizedTemplates": {
      "type": "object",
      "description": "List of localized templates",
      "additionalProperties": {
        "type": "object",
        "description": "Template content",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "additionalProperties": false,
        "properties": {
          "header": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for header"
          },
          "body": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for body"
          },
          "attachments": {
            "description": "List of attachments",
            "id": "attachments",
            "type": "array",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "header",
          "body"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate",
        "createdByUserId"
      ]
    }
  },
  "required": [
    "templateResolver",
    "localizedTemplates",
    "outputFormats"
  ]
}

Response 404

Template not found

Body

Media type: text/plain

Type: any

Example:

Template not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

PUT /templates/{templateId}

Modify a template

PUT /templates/{templateId}
URI Parameters
  • templateId: required (string)
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id"
    },
    "description": {
      "type": "string",
      "description": "Template description"
    },
    "outputFormats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of output formats"
    },
    "templateResolver": {
      "type": "string",
      "description": "Template engine name"
    },
    "localizedTemplates": {
      "type": "object",
      "description": "List of localized templates",
      "additionalProperties": {
        "type": "object",
        "description": "Template content",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "additionalProperties": false,
        "properties": {
          "header": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for header"
          },
          "body": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for body"
          },
          "attachments": {
            "description": "List of attachments",
            "id": "attachments",
            "type": "array",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "header",
          "body"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate",
        "createdByUserId"
      ]
    }
  },
  "required": [
    "templateResolver",
    "localizedTemplates",
    "outputFormats"
  ]
}

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Template",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Template id"
    },
    "description": {
      "type": "string",
      "description": "Template description"
    },
    "outputFormats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Array of output formats"
    },
    "templateResolver": {
      "type": "string",
      "description": "Template engine name"
    },
    "localizedTemplates": {
      "type": "object",
      "description": "List of localized templates",
      "additionalProperties": {
        "type": "object",
        "description": "Template content",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "additionalProperties": false,
        "properties": {
          "header": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for header"
          },
          "body": {
            "type": "string",
            "pattern": "\\S+.*",
            "description": "Template for body"
          },
          "attachments": {
            "description": "List of attachments",
            "id": "attachments",
            "type": "array",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "header",
          "body"
        ]
      }
    },
    "metadata": {
      "type": "object",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "title": "Metadata Schema",
      "properties": {
        "createdDate": {
          "description": "Date and time when the record was created",
          "type": "string",
          "format": "date-time"
        },
        "createdByUserId": {
          "description": "ID of the user who created the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "createdByUsername": {
          "description": "Username of the user who created the record (when available)",
          "type": "string"
        },
        "updatedDate": {
          "description": "Date and time when the record was last updated",
          "type": "string",
          "format": "date-time"
        },
        "updatedByUserId": {
          "description": "ID of the user who last updated the record",
          "type": "string",
          "pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
        },
        "updatedByUsername": {
          "description": "Username of the user who last updated the record (when available)",
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "createdDate",
        "createdByUserId"
      ]
    }
  },
  "required": [
    "templateResolver",
    "localizedTemplates",
    "outputFormats"
  ]
}

Response 404

Template not found

Body

Media type: text/plain

Type: any

Example:

Template not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

DELETE /templates/{templateId}

Delete template by id

DELETE /templates/{templateId}
URI Parameters
  • templateId: required (string)

Response 204

Body

Media type: text/plain

Type: any

Response 404

Template not found

Body

Media type: text/plain

Type: any

Example:

Template not found

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error

/template-request

POST /template-request

process specified template using given context

POST /template-request
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Request for template processing",
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string",
      "description": "Target template id"
    },
    "lang": {
      "type": "string",
      "description": "Target template language"
    },
    "outputFormat": {
      "type": "string",
      "description": "Output format"
    },
    "context": {
      "type": "object",
      "description": "Context object"
    }
  },
  "required": [
    "templateId",
    "lang",
    "outputFormat"
  ],
  "additionalProperties": false
}

Response 200

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Result of template processing",
  "type": "object",
  "properties": {
    "templateId": {
      "type": "string",
      "description": "Source template id"
    },
    "result": {
      "type": "object",
      "description": "Template processing output",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "additionalProperties": false,
      "properties": {
        "header": {
          "type": "string",
          "pattern": "\\S+.*",
          "description": "Template for header"
        },
        "body": {
          "type": "string",
          "pattern": "\\S+.*",
          "description": "Template for body"
        },
        "attachments": {
          "description": "List of attachments",
          "id": "attachments",
          "type": "array",
          "items": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "Message attachment",
            "additionalProperties": false,
            "properties": {
              "contentType": {
                "type": "string",
                "description": "Content type"
              },
              "name": {
                "type": "string",
                "description": "Name"
              },
              "description": {
                "type": "string",
                "description": "Description"
              },
              "data": {
                "type": "string",
                "description": "Attachment data"
              },
              "disposition": {
                "type": "string",
                "description": "Disposition"
              },
              "contentId": {
                "type": "string",
                "description": "Content id"
              }
            }
          }
        }
      },
      "required": [
        "header",
        "body"
      ]
    },
    "meta": {
      "type": "object",
      "description": "Template output metadata",
      "properties": {
        "size": {
          "type": "integer",
          "description": "Size of output in bytes"
        },
        "dateCreate": {
          "type": "string",
          "format": "date-time",
          "description": "Date of template processing"
        },
        "lang": {
          "type": "string",
          "description": "Processed template language"
        },
        "outputFormat": {
          "type": "string",
          "description": "Output format"
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}

Response 400

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "errors": {
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "properties": {
          "message": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "parameters": {
            "type": "object",
            "$schema": "http://json-schema.org/draft-04/schema#",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "value": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "message"
        ]
      }
    },
    "total_records": {
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Body

Media type: text/plain

Type: any

Example:

Internal server error