{
  "x-generator": "NSwag v14.7.1.0 (NJsonSchema v11.6.1.0 (Newtonsoft.Json v13.0.0.0))",
  "openapi": "3.0.0",
  "info": {
    "title": "NovaDB Razor API",
    "description": "An API to perform Razor rendering of NovaDB objects",
    "version": "6.2.0.9"
  },
  "paths": {
    "/binaries/{md5}": {
      "get": {
        "tags": [
          "Binaries and Files"
        ],
        "summary": "Get a database binary by MD5 hash code",
        "operationId": "GetBinaryAsync",
        "parameters": [
          {
            "name": "md5",
            "in": "path",
            "required": true,
            "description": "The binary MD5 as a Guid-formatted string",
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The binary has not been modified"
          },
          "404": {
            "description": "The binary could not be found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/files/{bpoId}": {
      "get": {
        "tags": [
          "Binaries and Files"
        ],
        "summary": "Get an external binary (a file) by binary proxy object id",
        "operationId": "GetBpoExternalBinaryAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "bpoId",
            "in": "path",
            "required": true,
            "description": "The binary proxy object ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The file has not been modified"
          },
          "403": {
            "description": "The access is forbidden for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "The binary proxy could not be found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/files/{name}": {
      "get": {
        "tags": [
          "Binaries and Files"
        ],
        "summary": "Get an external binary (a file) by file name (Guid + Extension)",
        "operationId": "GetExternalBinaryAsync",
        "parameters": [
          {
            "name": "name",
            "in": "path",
            "required": true,
            "description": "Name of the file including the extension.",
            "schema": {
              "type": "string"
            },
            "x-position": 1
          },
          {
            "name": "range",
            "in": "header",
            "description": "Range header value. For more information, visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Range",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The file has not been modified"
          },
          "404": {
            "description": "The file does not exist",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/templates/{templateId}/render": {
      "post": {
        "tags": [
          "Razor Rendering"
        ],
        "summary": "Render a preview from a list of objects",
        "operationId": "RenderTemplateAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "description": "The template ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "hyphenate",
            "in": "query",
            "description": "True to insert hyphenation points in the the output",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "x-position": 4
          }
        ],
        "requestBody": {
          "x-name": "request",
          "description": "The render request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenderRequest"
              }
            }
          },
          "required": true,
          "x-position": 3
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The access is forbidden for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "An Exception occurred during Razor rendering",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Razor Rendering"
        ],
        "summary": "Render a preview from a list of objects.",
        "operationId": "GetRenderedTemplateAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "description": "The template ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 2
          },
          {
            "name": "uiCulture",
            "in": "query",
            "description": "The UI culture",
            "schema": {
              "type": "string",
              "default": "en-US",
              "nullable": true
            },
            "x-position": 3
          },
          {
            "name": "objects",
            "in": "query",
            "description": "A comma separated list of object IDs",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 4
          },
          {
            "name": "variants",
            "in": "query",
            "description": "A comma separated list of variant IDs",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 5
          },
          {
            "name": "languages",
            "in": "query",
            "description": "A comma separated list of language IDs",
            "schema": {
              "type": "string",
              "nullable": true
            },
            "x-position": 6
          },
          {
            "name": "hyphenate",
            "in": "query",
            "description": "True to insert hyphenation points in the the output",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "x-position": 7
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The access is forbidden for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "An Exception occurred during Razor rendering",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/renderBatch": {
      "post": {
        "tags": [
          "Razor Rendering"
        ],
        "summary": "Render a preview from a list of objects",
        "operationId": "RenderBatchAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          }
        ],
        "requestBody": {
          "x-name": "request",
          "description": "The render request parameters",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              }
            }
          },
          "required": true,
          "x-position": 2
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "The access is forbidden for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "An Exception occurred during Razor rendering",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/css/nova-styles.css": {
      "get": {
        "tags": [
          "CSS Stylesheets"
        ],
        "summary": "Get the nova-styles.css created from system objects",
        "operationId": "GetNovaStylesCssAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The styles have not been modified"
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/css/nova-fonts.css": {
      "get": {
        "tags": [
          "CSS Stylesheets"
        ],
        "summary": "Get the nova-fonts.css created from system objects",
        "operationId": "GetNovaFontsCssAsync",
        "parameters": [
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The fonts have not been modified"
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/branches/{branchId}/css/{objectId}.css": {
      "get": {
        "tags": [
          "CSS Stylesheets"
        ],
        "summary": "Get the stylesheet created from an object of type TypeCascadingStyleSheet",
        "operationId": "GetStylesheetAsync",
        "parameters": [
          {
            "name": "objectId",
            "in": "path",
            "required": true,
            "description": "The object ID",
            "schema": {
              "type": "integer",
              "format": "int32"
            },
            "x-position": 1
          },
          {
            "name": "branchId",
            "in": "path",
            "required": true,
            "description": "The branch ID",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 4
            },
            "x-position": 2
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "304": {
            "description": "The stylesheet has not been modified"
          },
          "403": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetails": {
        "type": "object",
        "additionalProperties": {
          "nullable": true
        },
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "RenderRequest": {
        "type": "object",
        "description": "Request parameters for a Razor preview",
        "additionalProperties": false,
        "properties": {
          "uiCulture": {
            "type": "string",
            "description": "The UI culture",
            "default": "en-US",
            "nullable": true
          },
          "objects": {
            "type": "array",
            "description": "A comma separated list of object IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          },
          "languages": {
            "type": "array",
            "description": "A comma separated list of language IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          },
          "variants": {
            "type": "array",
            "description": "A comma separated list of variant IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          }
        }
      },
      "BatchResponse": {
        "type": "object",
        "description": "Reponse for a batch of Razor previews",
        "additionalProperties": false,
        "properties": {
          "items": {
            "type": "array",
            "description": "The rendered items as HTML",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "xml": {
                "name": "BatchResponseItem"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BatchResponseItem"
                }
              ]
            }
          }
        }
      },
      "BatchResponseItem": {
        "type": "object",
        "description": "Request parameters for an item of a batch of Razor previews",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "description": "The key to identity the item",
            "nullable": true
          },
          "rendition": {
            "type": "string",
            "description": "The rendition",
            "nullable": true
          },
          "isError": {
            "type": "boolean",
            "description": "True, if en error occured during rendering"
          },
          "problemDetails": {
            "description": "ProblemDetails if IsError is true",
            "nullable": true,
            "oneOf": [
              {
                "$ref": "#/components/schemas/ProblemDetails"
              }
            ]
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "description": "Request parameters for a batch of Razor previews",
        "additionalProperties": false,
        "properties": {
          "hyphenate": {
            "type": "boolean",
            "description": "Hyphenate the renditions"
          },
          "uiCulture": {
            "type": "string",
            "description": "The UI culture",
            "default": "en-US",
            "nullable": true
          },
          "languages": {
            "type": "array",
            "description": "A comma separated list of language IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          },
          "variants": {
            "type": "array",
            "description": "A comma separated list of variant IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          },
          "items": {
            "type": "array",
            "description": "The items to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "xml": {
                "name": "BatchRequestItem"
              },
              "oneOf": [
                {
                  "$ref": "#/components/schemas/BatchRequestItem"
                }
              ]
            }
          }
        }
      },
      "BatchRequestItem": {
        "type": "object",
        "description": "Request parameters for an item of a batch of Razor previews",
        "additionalProperties": false,
        "properties": {
          "key": {
            "type": "string",
            "description": "The key to identity the item",
            "nullable": true
          },
          "objects": {
            "type": "array",
            "description": "A comma separated list of object IDs to render",
            "nullable": true,
            "xml": {
              "wrapped": true
            },
            "items": {
              "type": "integer",
              "format": "int32",
              "xml": {
                "name": "int"
              }
            }
          },
          "templateId": {
            "type": "integer",
            "description": "The Template ID",
            "format": "int32"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Binaries and Files"
    },
    {
      "name": "Razor Rendering"
    },
    {
      "name": "CSS Stylesheets"
    }
  ]
}