mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 13:08:48 +01:00
3818 lines
169 KiB
JSON
3818 lines
169 KiB
JSON
{
|
|
"openapi": "3.0.3",
|
|
"info": {
|
|
"title": "libresign-administration",
|
|
"version": "0.0.1",
|
|
"description": "✍️ Self-hosted document signer using digital certificate",
|
|
"license": {
|
|
"name": "agpl"
|
|
}
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"basic_auth": {
|
|
"type": "http",
|
|
"scheme": "basic"
|
|
},
|
|
"bearer_auth": {
|
|
"type": "http",
|
|
"scheme": "bearer"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"Capabilities": {
|
|
"type": "object",
|
|
"required": [
|
|
"features",
|
|
"config",
|
|
"version"
|
|
],
|
|
"properties": {
|
|
"features": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"config": {
|
|
"type": "object",
|
|
"required": [
|
|
"sign-elements"
|
|
],
|
|
"properties": {
|
|
"sign-elements": {
|
|
"type": "object",
|
|
"required": [
|
|
"is-available",
|
|
"can-create-signature",
|
|
"full-signature-width",
|
|
"full-signature-height",
|
|
"signature-width",
|
|
"signature-height"
|
|
],
|
|
"properties": {
|
|
"is-available": {
|
|
"type": "boolean"
|
|
},
|
|
"can-create-signature": {
|
|
"type": "boolean"
|
|
},
|
|
"full-signature-width": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"full-signature-height": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signature-width": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signature-height": {
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"CetificateDataGenerated": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/EngineHandler"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"generated"
|
|
],
|
|
"properties": {
|
|
"generated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"ConfigureCheck": {
|
|
"type": "object",
|
|
"required": [
|
|
"message",
|
|
"resource",
|
|
"status",
|
|
"tip"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"resource": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"error",
|
|
"success"
|
|
]
|
|
},
|
|
"tip": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"EngineHandler": {
|
|
"type": "object",
|
|
"required": [
|
|
"configPath",
|
|
"policySection",
|
|
"rootCert"
|
|
],
|
|
"properties": {
|
|
"configPath": {
|
|
"type": "string"
|
|
},
|
|
"cfsslUri": {
|
|
"type": "string"
|
|
},
|
|
"policySection": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/PolicySection"
|
|
}
|
|
},
|
|
"rootCert": {
|
|
"$ref": "#/components/schemas/RootCertificate"
|
|
}
|
|
}
|
|
},
|
|
"OCSMeta": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"statuscode"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"statuscode": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"totalitems": {
|
|
"type": "string"
|
|
},
|
|
"itemsperpage": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PolicySection": {
|
|
"type": "object",
|
|
"required": [
|
|
"OID",
|
|
"CPS"
|
|
],
|
|
"properties": {
|
|
"OID": {
|
|
"type": "string"
|
|
},
|
|
"CPS": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"PublicCapabilities": {
|
|
"type": "object",
|
|
"properties": {
|
|
"libresign": {
|
|
"$ref": "#/components/schemas/Capabilities"
|
|
}
|
|
}
|
|
},
|
|
"ReminderSettings": {
|
|
"type": "object",
|
|
"required": [
|
|
"days_before",
|
|
"days_between",
|
|
"max",
|
|
"send_timer"
|
|
],
|
|
"properties": {
|
|
"days_before": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"minimum": 0
|
|
},
|
|
"days_between": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"minimum": 0
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"minimum": 0
|
|
},
|
|
"send_timer": {
|
|
"type": "string"
|
|
},
|
|
"next_run": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"RootCertificate": {
|
|
"type": "object",
|
|
"required": [
|
|
"commonName",
|
|
"names"
|
|
],
|
|
"properties": {
|
|
"commonName": {
|
|
"type": "string"
|
|
},
|
|
"names": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/RootCertificateName"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RootCertificateName": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"paths": {
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": {
|
|
"post": {
|
|
"operationId": "admin-generate-certificate-cfssl",
|
|
"summary": "Generate certificate using CFSSL engine",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"rootCert"
|
|
],
|
|
"properties": {
|
|
"rootCert": {
|
|
"type": "object",
|
|
"description": "fields of root certificate",
|
|
"required": [
|
|
"commonName",
|
|
"names"
|
|
],
|
|
"properties": {
|
|
"commonName": {
|
|
"type": "string"
|
|
},
|
|
"names": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": [
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"value": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"cfsslUri": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "URI of CFSSL API"
|
|
},
|
|
"configPath": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Path of config files of CFSSL"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/components/schemas/EngineHandler"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Account not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/openssl": {
|
|
"post": {
|
|
"operationId": "admin-generate-certificate-open-ssl",
|
|
"summary": "Generate certificate using OpenSSL engine",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"rootCert"
|
|
],
|
|
"properties": {
|
|
"rootCert": {
|
|
"type": "object",
|
|
"description": "fields of root certificate",
|
|
"required": [
|
|
"commonName",
|
|
"names"
|
|
],
|
|
"properties": {
|
|
"commonName": {
|
|
"type": "string"
|
|
},
|
|
"names": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"required": [
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"value": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"configPath": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "Path of config files of CFSSL"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/components/schemas/EngineHandler"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "Account not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/engine": {
|
|
"post": {
|
|
"operationId": "admin-set-certificate-engine",
|
|
"summary": "Set certificate engine",
|
|
"description": "Sets the certificate engine (openssl, cfssl, or none) and automatically configures identify_methods when needed\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"engine"
|
|
],
|
|
"properties": {
|
|
"engine": {
|
|
"type": "string",
|
|
"description": "The certificate engine to use (openssl, cfssl, or none)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"engine",
|
|
"identify_methods"
|
|
],
|
|
"properties": {
|
|
"engine": {
|
|
"type": "string"
|
|
},
|
|
"identify_methods": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid engine",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate": {
|
|
"get": {
|
|
"operationId": "admin-load-certificate",
|
|
"summary": "Load certificate data",
|
|
"description": "Return all data of root certificate and a field called `generated` with a boolean value.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/CetificateDataGenerated"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/configure-check": {
|
|
"get": {
|
|
"operationId": "admin-configure-check",
|
|
"summary": "Check the configuration of LibreSign",
|
|
"description": "Return the status of necessary configuration and tips to fix the problems.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/ConfigureCheck"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/disable-hate-limit": {
|
|
"get": {
|
|
"operationId": "admin-disable-hate-limit",
|
|
"summary": "Disable hate limit to current session",
|
|
"description": "This will disable hate limit to current session.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-background": {
|
|
"post": {
|
|
"operationId": "admin-signature-background-save",
|
|
"summary": "Add custom background image",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"failure"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "admin-signature-background-get",
|
|
"summary": "Get custom background image",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Image returned",
|
|
"content": {
|
|
"*/*": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "admin-signature-background-reset",
|
|
"summary": "Reset the background image to be the default of LibreSign",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Image reseted to default",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "admin-signature-background-delete",
|
|
"summary": "Delete background image",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Deleted with success",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-text": {
|
|
"post": {
|
|
"operationId": "admin-signature-text-save",
|
|
"summary": "Save signature text service",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"template"
|
|
],
|
|
"properties": {
|
|
"template": {
|
|
"type": "string",
|
|
"description": "Template to signature text"
|
|
},
|
|
"templateFontSize": {
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 10,
|
|
"description": "Font size used when print the parsed text of this template at PDF file"
|
|
},
|
|
"signatureFontSize": {
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 20,
|
|
"description": "Font size used when the signature mode is SIGNAME_AND_DESCRIPTION"
|
|
},
|
|
"signatureWidth": {
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 350,
|
|
"description": "Signature width"
|
|
},
|
|
"signatureHeight": {
|
|
"type": "number",
|
|
"format": "double",
|
|
"default": 100,
|
|
"description": "Signature height"
|
|
},
|
|
"renderMode": {
|
|
"type": "string",
|
|
"default": "GRAPHIC_AND_DESCRIPTION",
|
|
"description": "Signature render mode"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"template",
|
|
"parsed",
|
|
"templateFontSize",
|
|
"signatureFontSize",
|
|
"signatureWidth",
|
|
"signatureHeight",
|
|
"renderMode"
|
|
],
|
|
"properties": {
|
|
"template": {
|
|
"type": "string"
|
|
},
|
|
"parsed": {
|
|
"type": "string"
|
|
},
|
|
"templateFontSize": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureFontSize": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureWidth": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureHeight": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"renderMode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "admin-signature-text-get",
|
|
"summary": "Get parsed signature text service",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "template",
|
|
"in": "query",
|
|
"description": "Template to signature text",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "context",
|
|
"in": "query",
|
|
"description": "Context for parsing the template",
|
|
"schema": {
|
|
"type": "string",
|
|
"default": ""
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"template",
|
|
"parsed",
|
|
"templateFontSize",
|
|
"signatureFontSize",
|
|
"signatureWidth",
|
|
"signatureHeight",
|
|
"renderMode"
|
|
],
|
|
"properties": {
|
|
"template": {
|
|
"type": "string"
|
|
},
|
|
"parsed": {
|
|
"type": "string"
|
|
},
|
|
"templateFontSize": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureFontSize": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureWidth": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"signatureHeight": {
|
|
"type": "number",
|
|
"format": "double"
|
|
},
|
|
"renderMode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-settings": {
|
|
"get": {
|
|
"operationId": "admin-get-signature-settings",
|
|
"summary": "Get signature settings",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"default_signature_text_template",
|
|
"signature_available_variables"
|
|
],
|
|
"properties": {
|
|
"default_signature_text_template": {
|
|
"type": "string"
|
|
},
|
|
"signature_available_variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signer-name": {
|
|
"get": {
|
|
"operationId": "admin-signer-name",
|
|
"summary": "Convert signer name as image",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "width",
|
|
"in": "query",
|
|
"description": "Image width,",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
{
|
|
"name": "height",
|
|
"in": "query",
|
|
"description": "Image height",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
},
|
|
{
|
|
"name": "text",
|
|
"in": "query",
|
|
"description": "Text to be added to image",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "fontSize",
|
|
"in": "query",
|
|
"description": "Font size of text",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "number",
|
|
"format": "double"
|
|
}
|
|
},
|
|
{
|
|
"name": "isDarkTheme",
|
|
"in": "query",
|
|
"description": "Color of text, white if is tark theme and black if not",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "align",
|
|
"in": "query",
|
|
"description": "Align of text: left, center or right",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"headers": {
|
|
"Content-Disposition": {
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"inline; filename=\"signer-name.png\""
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"image/png": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy": {
|
|
"post": {
|
|
"operationId": "admin-save-certificate-policy",
|
|
"summary": "Update certificate policy of this instance",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"CPS"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
},
|
|
"CPS": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"failure"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "admin-delete-certificate-policy",
|
|
"summary": "Delete certificate policy of this instance",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy/oid": {
|
|
"post": {
|
|
"operationId": "admin-updateoid",
|
|
"summary": "Update OID",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"oid"
|
|
],
|
|
"properties": {
|
|
"oid": {
|
|
"type": "string",
|
|
"description": "OID is a unique numeric identifier for certificate policies in digital certificates."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"422": {
|
|
"description": "Validation error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"failure"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/reminder": {
|
|
"get": {
|
|
"operationId": "admin-reminder-fetch",
|
|
"summary": "Get reminder settings",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/ReminderSettings"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "admin-reminder-save",
|
|
"summary": "Save reminder",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"daysBefore",
|
|
"daysBetween",
|
|
"max",
|
|
"sendTimer"
|
|
],
|
|
"properties": {
|
|
"daysBefore": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "First reminder after (days)"
|
|
},
|
|
"daysBetween": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "Days between reminders"
|
|
},
|
|
"max": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "Max reminders per signer"
|
|
},
|
|
"sendTimer": {
|
|
"type": "string",
|
|
"description": "Send time (HH:mm)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"$ref": "#/components/schemas/ReminderSettings"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/tsa": {
|
|
"post": {
|
|
"operationId": "admin-set-tsa-config",
|
|
"summary": "Set TSA configuration values with proper sensitive data handling",
|
|
"description": "Only saves configuration if tsa_url is provided. Automatically manages username/password fields based on authentication type.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": false,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tsa_url": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "TSA server URL (required for saving)"
|
|
},
|
|
"tsa_policy_oid": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "TSA policy OID"
|
|
},
|
|
"tsa_auth_type": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Authentication type (none|basic), defaults to 'none'"
|
|
},
|
|
"tsa_username": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Username for basic authentication"
|
|
},
|
|
"tsa_password": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Password for basic authentication (stored as sensitive data)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Validation error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"error"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "admin-delete-tsa-config",
|
|
"summary": "Delete TSA configuration",
|
|
"description": "Delete all TSA configuration fields from the application settings.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"success"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/footer-template": {
|
|
"get": {
|
|
"operationId": "admin-get-footer-template",
|
|
"summary": "Get footer template",
|
|
"description": "Returns the current footer template if set, otherwise returns the default template.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"template",
|
|
"isDefault",
|
|
"preview_width",
|
|
"preview_height"
|
|
],
|
|
"properties": {
|
|
"template": {
|
|
"type": "string"
|
|
},
|
|
"isDefault": {
|
|
"type": "boolean"
|
|
},
|
|
"preview_width": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"preview_height": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "admin-save-footer-template",
|
|
"summary": "Save footer template and render preview",
|
|
"description": "Saves the footer template and returns the rendered PDF preview.\nThis endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": false,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"template": {
|
|
"type": "string",
|
|
"default": "",
|
|
"description": "The Twig template to save (empty to reset to default)"
|
|
},
|
|
"width": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": 595,
|
|
"description": "Width of preview in points (default: 595 - A4 width)"
|
|
},
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"default": 50,
|
|
"description": "Height of preview in points (default: 50)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/pdf": {
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "binary"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad request",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-flow/config": {
|
|
"post": {
|
|
"operationId": "admin-set-signature-flow-config",
|
|
"summary": "Set signature flow configuration",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"enabled"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Whether to force a signature flow for all documents"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Signature flow mode: 'parallel' or 'ordered_numeric' (only used when enabled is true)"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Configuration saved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid signature flow mode provided",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/docmdp/config": {
|
|
"post": {
|
|
"operationId": "admin-set-doc-mdp-config",
|
|
"summary": "Set DocMDP configuration",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"admin"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"enabled",
|
|
"defaultLevel"
|
|
],
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Enable or disable DocMDP certification"
|
|
},
|
|
"defaultLevel": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"description": "Default DocMDP level (0-3): 0=none, 1=no changes, 2=form fill, 3=form fill + annotations"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Configuration saved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid DocMDP level provided",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal server error",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/list": {
|
|
"get": {
|
|
"operationId": "crl_api-list",
|
|
"summary": "List CRL entries with pagination and filters",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"crl_api"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "page",
|
|
"in": "query",
|
|
"description": "Page number (1-based)",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "length",
|
|
"in": "query",
|
|
"description": "Number of items per page",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"description": "Filter by status (issued, revoked, expired)",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "engine",
|
|
"in": "query",
|
|
"description": "Filter by engine type",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "instanceId",
|
|
"in": "query",
|
|
"description": "Filter by instance ID",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "generation",
|
|
"in": "query",
|
|
"description": "Filter by generation",
|
|
"schema": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"in": "query",
|
|
"description": "Filter by owner",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "serialNumber",
|
|
"in": "query",
|
|
"description": "Filter by serial number (partial match)",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "revokedBy",
|
|
"in": "query",
|
|
"description": "Filter by who revoked the certificate",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "sortBy",
|
|
"in": "query",
|
|
"description": "Sort field (e.g., 'revoked_at', 'issued_at', 'serial_number')",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "sortOrder",
|
|
"in": "query",
|
|
"description": "Sort order (ASC or DESC)",
|
|
"schema": {
|
|
"type": "string",
|
|
"nullable": true
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "CRL entries retrieved successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"total",
|
|
"page",
|
|
"length"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"total": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"page": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
},
|
|
"length": {
|
|
"type": "integer",
|
|
"format": "int64"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/revoke": {
|
|
"post": {
|
|
"operationId": "crl_api-revoke",
|
|
"summary": "Revoke a certificate by serial number",
|
|
"description": "This endpoint requires admin access",
|
|
"tags": [
|
|
"crl_api"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"serialNumber"
|
|
],
|
|
"properties": {
|
|
"serialNumber": {
|
|
"type": "string",
|
|
"description": "Certificate serial number to revoke"
|
|
},
|
|
"reasonCode": {
|
|
"type": "integer",
|
|
"format": "int64",
|
|
"nullable": true,
|
|
"description": "Revocation reason code (0-10, see RFC 5280)"
|
|
},
|
|
"reasonText": {
|
|
"type": "string",
|
|
"nullable": true,
|
|
"description": "Optional text describing the reason"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Certificate revoked successfully",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Invalid parameters",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "Certificate not found",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"success",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"success": {
|
|
"type": "boolean"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/ocs/v2.php/apps/libresign/api/{apiVersion}/setting/has-root-cert": {
|
|
"get": {
|
|
"operationId": "setting-has-root-cert",
|
|
"summary": "Has root certificate",
|
|
"description": "Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have",
|
|
"tags": [
|
|
"setting"
|
|
],
|
|
"security": [
|
|
{
|
|
"bearer_auth": []
|
|
},
|
|
{
|
|
"basic_auth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "apiVersion",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"v1"
|
|
],
|
|
"default": "v1"
|
|
}
|
|
},
|
|
{
|
|
"name": "OCS-APIRequest",
|
|
"in": "header",
|
|
"description": "Required to be true for the API request to pass",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "boolean",
|
|
"default": true
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"ocs"
|
|
],
|
|
"properties": {
|
|
"ocs": {
|
|
"type": "object",
|
|
"required": [
|
|
"meta",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"meta": {
|
|
"$ref": "#/components/schemas/OCSMeta"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"hasRootCert"
|
|
],
|
|
"properties": {
|
|
"hasRootCert": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tags": []
|
|
}
|