{ "openapi": "3.0.3", "info": { "title": "libresign-full", "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" } } }, "CertificatePfxData": { "type": "object", "required": [ "name", "subject", "issuer", "extensions", "serialNumber", "serialNumberHex", "validate" ], "properties": { "name": { "type": "string" }, "subject": { "type": "string" }, "issuer": { "type": "string" }, "extensions": { "type": "string" }, "serialNumber": { "type": "string" }, "serialNumberHex": { "type": "string" }, "validate": { "type": "object", "required": [ "from", "to" ], "properties": { "from": { "type": "string" }, "to": { "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" } } }, "Coordinate": { "type": "object", "properties": { "page": { "type": "integer", "format": "int64", "minimum": 0 }, "urx": { "type": "integer", "format": "int64", "minimum": 0 }, "ury": { "type": "integer", "format": "int64", "minimum": 0 }, "llx": { "type": "integer", "format": "int64", "minimum": 0 }, "lly": { "type": "integer", "format": "int64", "minimum": 0 }, "top": { "type": "integer", "format": "int64", "minimum": 0 }, "left": { "type": "integer", "format": "int64", "minimum": 0 }, "width": { "type": "integer", "format": "int64", "minimum": 0 }, "height": { "type": "integer", "format": "int64", "minimum": 0 } } }, "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" } } }, "File": { "type": "object", "required": [ "account", "file_type", "created_at", "file" ], "properties": { "account": { "type": "object", "required": [ "userId", "displayName" ], "properties": { "userId": { "type": "string" }, "displayName": { "type": "string" } } }, "file_type": { "type": "object", "required": [ "type", "name", "description" ], "properties": { "type": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true } } }, "created_at": { "type": "string" }, "file": { "type": "object", "required": [ "name", "status", "statusText", "created_at", "file", "callback", "uuid", "signers" ], "properties": { "name": { "type": "string" }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ] }, "statusText": { "type": "string" }, "created_at": { "type": "string" }, "file": { "type": "object", "required": [ "type", "nodeId", "signedNodeId", "url" ], "properties": { "type": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "signedNodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "url": { "type": "string" } } }, "callback": { "type": "string", "nullable": true }, "uuid": { "type": "string" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/Signer" } } } } } }, "FolderSettings": { "type": "object", "properties": { "folderName": { "type": "string" }, "separator": { "type": "string" }, "folderPatterns": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" }, "setting": { "type": "string" } } } } }, "IdDocs": { "type": "object", "required": [ "file" ], "properties": { "file": { "$ref": "#/components/schemas/NewFile" }, "name": { "type": "string" }, "type": { "type": "string" } } }, "IdentifyAccount": { "type": "object", "required": [ "id", "isNoUser", "displayName", "subname", "shareType" ], "properties": { "id": { "type": "integer", "format": "int64", "minimum": 0 }, "isNoUser": { "type": "boolean" }, "displayName": { "type": "string" }, "subname": { "type": "string" }, "shareType": { "type": "integer", "format": "int64", "enum": [ 0, 4 ] }, "icon": { "type": "string", "enum": [ "icon-mail", "icon-user" ] }, "acceptsEmailNotifications": { "type": "boolean" } } }, "IdentifyMethod": { "type": "object", "required": [ "method", "value", "mandatory" ], "properties": { "method": { "type": "string", "enum": [ "email", "account" ] }, "value": { "type": "string" }, "mandatory": { "type": "integer", "format": "int64", "minimum": 0 } } }, "NewFile": { "type": "object", "properties": { "base64": { "type": "string" }, "fileId": { "type": "integer", "format": "int64", "minimum": 0 }, "url": { "type": "string" } } }, "NewSigner": { "type": "object", "required": [ "identify" ], "properties": { "identify": { "type": "object", "properties": { "email": { "type": "string" }, "account": { "type": "string" } } }, "displayName": { "type": "string" }, "description": { "type": "string" }, "notify": { "type": "integer", "format": "int64", "minimum": 0 }, "signingOrder": { "type": "integer", "format": "int64", "minimum": 0 } } }, "NextcloudFile": { "type": "object", "required": [ "message", "name", "id", "status", "statusText", "created_at" ], "properties": { "message": { "type": "string" }, "name": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "status": { "type": "integer", "format": "int64" }, "statusText": { "type": "string" }, "created_at": { "type": "string" } } }, "Notify": { "type": "object", "required": [ "date", "method" ], "properties": { "date": { "type": "string" }, "method": { "type": "string", "enum": [ "activity", "notify", "mail" ] } } }, "OCSMeta": { "type": "object", "required": [ "status", "statuscode" ], "properties": { "status": { "type": "string" }, "statuscode": { "type": "integer" }, "message": { "type": "string" }, "totalitems": { "type": "string" }, "itemsperpage": { "type": "string" } } }, "Pagination": { "type": "object", "required": [ "total", "current", "next", "prev", "last", "first" ], "properties": { "total": { "type": "integer", "format": "int64", "minimum": 0 }, "current": { "type": "string", "nullable": true }, "next": { "type": "string", "nullable": true }, "prev": { "type": "string", "nullable": true }, "last": { "type": "string", "nullable": true }, "first": { "type": "string", "nullable": true } } }, "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" } } }, "Settings": { "type": "object", "required": [ "canSign", "canRequestSign", "signerFileUuid", "phoneNumber" ], "properties": { "canSign": { "type": "boolean" }, "canRequestSign": { "type": "boolean" }, "signerFileUuid": { "type": "string", "nullable": true }, "hasSignatureFile": { "type": "boolean" }, "phoneNumber": { "type": "string" }, "needIdentificationDocuments": { "type": "boolean" }, "identificationDocumentsWaitingApproval": { "type": "boolean" } } }, "SignatureMethod": { "type": "object", "required": [ "enabled", "label", "name" ], "properties": { "enabled": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" } } }, "SignatureMethodEmailToken": { "type": "object", "required": [ "label", "identifyMethod", "needCode", "hasConfirmCode", "blurredEmail", "hashOfEmail" ], "properties": { "label": { "type": "string" }, "identifyMethod": { "type": "string", "enum": [ "email", "account" ] }, "needCode": { "type": "boolean" }, "hasConfirmCode": { "type": "boolean" }, "blurredEmail": { "type": "string" }, "hashOfEmail": { "type": "string" } } }, "SignatureMethodPassword": { "type": "object", "required": [ "label", "name", "hasSignatureFile" ], "properties": { "label": { "type": "string" }, "name": { "type": "string" }, "hasSignatureFile": { "type": "boolean" } } }, "SignatureMethods": { "type": "object", "properties": { "clickToSign": { "$ref": "#/components/schemas/SignatureMethod" }, "emailToken": { "$ref": "#/components/schemas/SignatureMethodEmailToken" }, "password": { "$ref": "#/components/schemas/SignatureMethodPassword" } } }, "Signer": { "type": "object", "required": [ "description", "displayName", "request_sign_date", "signed", "me", "signRequestId", "status", "statusText" ], "properties": { "description": { "type": "string", "nullable": true }, "displayName": { "type": "string" }, "subject": { "type": "string" }, "request_sign_date": { "type": "string" }, "valid_from": { "type": "integer", "format": "int64", "minimum": 0 }, "valid_to": { "type": "integer", "format": "int64", "minimum": 0 }, "email": { "type": "string" }, "remote_address": { "type": "string" }, "user_agent": { "type": "string" }, "notify": { "type": "array", "items": { "$ref": "#/components/schemas/Notify" } }, "userId": { "type": "string" }, "signed": { "type": "string", "nullable": true }, "sign_date": { "type": "string", "nullable": true }, "sign_uuid": { "type": "string" }, "hash_algorithm": { "type": "string" }, "me": { "type": "boolean" }, "signRequestId": { "type": "integer", "format": "int64", "minimum": 0 }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2 ] }, "statusText": { "type": "string" }, "signingOrder": { "type": "integer", "format": "int64", "minimum": 0 }, "identifyMethods": { "type": "array", "items": { "$ref": "#/components/schemas/IdentifyMethod" } }, "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } }, "signatureMethods": { "$ref": "#/components/schemas/SignatureMethods" } } }, "UserElement": { "type": "object", "required": [ "id", "type", "file", "userId", "starred", "createdAt" ], "properties": { "id": { "type": "integer", "format": "int64" }, "type": { "type": "string" }, "file": { "type": "object", "required": [ "url", "nodeId" ], "properties": { "url": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64" } } }, "userId": { "type": "string" }, "starred": { "type": "integer", "format": "int64", "enum": [ 0, 1 ] }, "createdAt": { "type": "string" } } }, "ValidateFile": { "type": "object", "required": [ "uuid", "name", "status", "statusText", "nodeId", "signatureFlow", "docmdpLevel", "totalPages", "size", "pdfVersion", "created_at", "requested_by", "file" ], "properties": { "uuid": { "type": "string" }, "name": { "type": "string" }, "status": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ] }, "statusText": { "type": "string" }, "nodeId": { "type": "integer", "format": "int64", "minimum": 0 }, "signatureFlow": { "type": "integer", "format": "int64" }, "docmdpLevel": { "type": "integer", "format": "int64" }, "totalPages": { "type": "integer", "format": "int64", "minimum": 0 }, "size": { "type": "integer", "format": "int64", "minimum": 0 }, "pdfVersion": { "type": "string" }, "created_at": { "type": "string" }, "requested_by": { "type": "object", "required": [ "userId", "displayName" ], "properties": { "userId": { "type": "string" }, "displayName": { "type": "string" } } }, "file": { "type": "string" }, "url": { "type": "string" }, "signers": { "type": "array", "items": { "$ref": "#/components/schemas/Signer" } }, "settings": { "$ref": "#/components/schemas/Settings" }, "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string", "enum": [ "info" ] }, "message": { "type": "string" } } } }, "visibleElements": { "type": "array", "items": { "$ref": "#/components/schemas/VisibleElement" } } } }, "VisibleElement": { "type": "object", "required": [ "elementId", "signRequestId", "type", "coordinates" ], "properties": { "elementId": { "type": "integer", "format": "int64", "minimum": 0 }, "signRequestId": { "type": "integer", "format": "int64", "minimum": 0 }, "type": { "type": "string" }, "coordinates": { "$ref": "#/components/schemas/Coordinate" } } } } }, "paths": { "/index.php/apps/libresign/certificate-policy.pdf": { "get": { "operationId": "certificate_policy-get-certificate-policy", "summary": "Certificate policy of this instance", "tags": [ "certificate_policy" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "headers": { "Content-Disposition": { "schema": { "type": "string", "enum": [ "inline; filename=\"certificate-policy.pdf\"" ] } } }, "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Not found", "content": { "application/json": { "schema": {} } } } } } }, "/index.php/apps/libresign/crl/libresign_{instanceId}_{generation}_{engineType}.crl": { "get": { "operationId": "crl-get-revocation-list", "summary": "Get Certificate Revocation List in DER format (RFC 5280 compliant)", "tags": [ "crl" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "instanceId", "in": "path", "description": "Instance identifier", "required": true, "schema": { "type": "string" } }, { "name": "generation", "in": "path", "description": "Generation identifier", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "engineType", "in": "path", "description": "Engine type identifier", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "CRL retrieved successfully in DER format", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "500": { "description": "Failed to generate CRL", "content": { "application/json": { "schema": { "type": "object", "required": [ "error", "message" ], "properties": { "error": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/index.php/apps/libresign/crl/check/{serialNumber}": { "get": { "operationId": "crl-check-certificate-status", "summary": "Check certificate revocation status", "tags": [ "crl" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "serialNumber", "in": "path", "description": "Certificate serial number to check", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Certificate status retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "serial_number", "status", "checked_at" ], "properties": { "serial_number": { "type": "string" }, "status": { "type": "string" }, "checked_at": { "type": "string" } } } } } }, "400": { "description": "Invalid serial number format", "content": { "application/json": { "schema": { "type": "object", "required": [ "error", "message" ], "properties": { "error": { "type": "string" }, "message": { "type": "string" } } } } } } } } }, "/index.php/apps/libresign/develop/pdf": { "get": { "operationId": "develop-pdf", "summary": "Get a demo PDF file to be used by test purpose", "description": "To use this endpoint is necessary to enable the debug mode in your instance. To do this, run the command:\n`occ config:system:set debug --value true --type boolean`", "tags": [ "develop" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "PDF returned", "headers": { "Content-Disposition": { "schema": { "type": "string", "enum": [ "inline; filename=\"file.pdf\"" ] } } }, "content": { "application/pdf": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Debug mode not enabled", "content": { "application/json": { "schema": {} } } } } } }, "/index.php/apps/libresign": { "get": { "operationId": "page-index", "summary": "Index page", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/f": { "get": { "operationId": "page-indexf", "summary": "Index page to authenticated users", "description": "This router is used to be possible render pages with /f/, is a workaround at frontend side to identify pages with authenticated accounts", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/f/incomplete": { "get": { "operationId": "page-incomplete", "summary": "Incomplete page", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/incomplete": { "get": { "operationId": "page-incompletep", "summary": "Incomplete page in full screen", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/f/{path}": { "get": { "operationId": "page-indexf-path", "summary": "Main page to authenticated signer with a path", "description": "The path is used only by frontend", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "path", "in": "path", "description": "The path that was sent from frontend", "required": true, "schema": { "type": "string", "pattern": "^.+$" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/f/sign/{uuid}": { "get": { "operationId": "page-signf", "summary": "Sign page to authenticated signer", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/f/sign/{uuid}/{path}": { "get": { "operationId": "page-signf-path", "summary": "Sign page to authenticated signer with the path of file", "description": "The path is used only by frontend", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^.+$" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/sign/{uuid}/{path}": { "get": { "operationId": "page-signp-path", "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^.+$" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/sign/{uuid}": { "get": { "operationId": "page-sign", "summary": "Sign page to unauthenticated signer", "description": "The path is used only by frontend", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/id-docs/approve/{uuid}": { "get": { "operationId": "page-sign-id-doc", "summary": "Show signature page", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/id-docs/approve/{uuid}/{path}": { "get": { "operationId": "page-sign-id-doc-private", "summary": "Show signature page", "tags": [ "page" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } }, { "name": "path", "in": "path", "required": true, "schema": { "type": "string", "pattern": "^.+$" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/pdf/{uuid}": { "get": { "operationId": "page-get-pdf", "summary": "Use UUID of file to get PDF", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "File uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "File not found", "content": { "application/json": { "schema": {} } } } } } }, "/index.php/apps/libresign/pdf/{uuid}": { "get": { "operationId": "page-get-pdf-file", "summary": "Use UUID of user to get PDF", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "Sign request uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } } } } }, "/index.php/apps/libresign/p/validation": { "get": { "operationId": "page-validation", "summary": "Show validation page", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/validation/{uuid}": { "get": { "operationId": "page-validation-file-with-short-url", "summary": "Show validation page", "description": "The path is used only by frontend", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/reset-password": { "get": { "operationId": "page-reset-password", "summary": "Show validation page", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/index.php/apps/libresign/p/validation/{uuid}": { "get": { "operationId": "page-validation-file-public", "summary": "Public page to show validation for a specific file UUID", "tags": [ "page" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "uuid", "in": "path", "description": "File uuid", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/html": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/create/{uuid}": { "post": { "operationId": "account-create-to-sign", "summary": "Create account to sign a document", "tags": [ "account" ], "security": [ {}, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "email", "password" ], "properties": { "email": { "type": "string", "description": "email to the new account" }, "password": { "type": "string", "description": "the password to then new account" }, "signPassword": { "type": "string", "nullable": true, "description": "The password to create certificate" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "Sign request uuid to allow account creation", "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", "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": [ "action", "message" ], "properties": { "action": { "type": "integer", "format": "int64", "enum": [ 2000, 2500 ] }, "description": { "type": "string", "nullable": true }, "filename": { "type": "string" }, "message": { "type": "string" }, "pdf": { "type": "object", "required": [ "url" ], "properties": { "url": { "type": "string" } } } } } } } } } } } }, "422": { "description": "Validation page not accessible if unauthenticated", "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", "action" ], "properties": { "message": { "type": "string" }, "action": { "type": "integer", "format": "int64" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/account/signature": { "post": { "operationId": "account-signature-generate", "summary": "Create PFX file using self-signed certificate", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signPassword" ], "properties": { "signPassword": { "type": "string", "description": "The password that will be used to encrypt the certificate file" } } } } } }, "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": "Settings saved", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object" } } } } } } } }, "401": { "description": "Failure to create PFX file", "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}/account/me": { "get": { "operationId": "account-me", "summary": "Who am I", "description": "Validates API access data and returns the authenticated user's data.", "tags": [ "account" ], "security": [ {}, { "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": [ "account", "settings" ], "properties": { "account": { "type": "object", "required": [ "uid", "emailAddress", "displayName" ], "properties": { "uid": { "type": "string" }, "emailAddress": { "type": "string" }, "displayName": { "type": "string" } } }, "settings": { "type": "object", "required": [ "canRequestSign", "hasSignatureFile" ], "properties": { "canRequestSign": { "type": "boolean" }, "hasSignatureFile": { "type": "boolean" } } } } } } } } } } } }, "404": { "description": "Invalid user or password", "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}/account/settings": { "patch": { "operationId": "account-update-settings", "summary": "Update the account phone number", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "phone": { "type": "string", "nullable": true, "description": "the phone number to be defined. If null will remove the phone number" } } } } } }, "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": "Settings saved", "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": { "type": "object", "required": [ "userId", "phone", "message" ], "properties": { "userId": { "type": "string" }, "phone": { "type": "string" }, "message": { "type": "string" } } } } } } } } } } } }, "404": { "description": "Invalid data to update phone number", "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}/account/pfx": { "delete": { "operationId": "account-delete-pfx", "summary": "Delete PFX file", "tags": [ "account" ], "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": { "202": { "description": "Certificate 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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } }, "post": { "operationId": "account-upload-pfx", "summary": "Upload PFX file", "tags": [ "account" ], "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": { "202": { "description": "Certificate saved 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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "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" } } } } } } } } } } } }, "patch": { "operationId": "account-update-pfx-password", "summary": "Update PFX file", "description": "Used to change the password of PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "current", "new" ], "properties": { "current": { "type": "string", "description": "Current password" }, "new": { "type": "string", "description": "New password" } } } } } }, "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": { "202": { "description": "Certificate saved 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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "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}/account/pfx/read": { "post": { "operationId": "account-read-pfx-data", "summary": "Read content of PFX file", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "password" ], "properties": { "password": { "type": "string", "description": "password of PFX file to decrypt the file and return his content" } } } } } }, "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": { "202": { "description": "Certificate saved with success", "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/CertificatePfxData" } } } } } } } }, "400": { "description": "No file provided or other problem with provided file", "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}/account/config/{key}": { "put": { "operationId": "account-set-config", "summary": "Set user config value", "tags": [ "account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "key", "in": "path", "description": "Config key", "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": "Config updated", "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": [ "key", "value" ], "properties": { "key": { "type": "string" }, "value": { "type": "object" } } } } } } } } } }, "400": { "description": "Error updating config", "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/footer-template/preview-pdf": { "post": { "operationId": "admin-footer-template-preview-pdf", "summary": "Preview footer template as PDF", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "template": { "type": "string", "default": "", "description": "Template to preview" }, "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}/file/validate/uuid/{uuid}": { "get": { "operationId": "file-validate-uuid", "summary": "Validate a file using Uuid", "description": "Validate a file returning file data.", "tags": [ "file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "The UUID of the LibreSign file", "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", "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/ValidateFile" } } } } } } } }, "404": { "description": "Request failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string" }, "message": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate/file_id/{fileId}": { "get": { "operationId": "file-validate-file-id", "summary": "Validate a file using FileId", "description": "Validate a file returning file data.", "tags": [ "file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "The identifier value of the LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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/ValidateFile" } } } } } } } }, "404": { "description": "Request failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string" }, "message": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/validate": { "post": { "operationId": "file-validate-binary", "summary": "Validate a binary file", "description": "Validate a binary file returning file data. Use field 'file' for the file upload", "tags": [ "file" ], "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/ValidateFile" } } } } } } } }, "404": { "description": "Request failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string" }, "message": { "type": "string" } } } }, "message": { "type": "string" } } } } } } } } } }, "400": { "description": "Request failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string" }, "message": { "type": "string" } } } }, "message": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/list": { "get": { "operationId": "file-list", "summary": "List identification documents that need to be approved", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "signer_uuid", "in": "query", "description": "Signer UUID", "schema": { "type": "string", "nullable": true } }, { "name": "nodeIds[]", "in": "query", "description": "The list of nodeIds (also called fileIds). It's the ids of files at Nextcloud", "schema": { "type": "array", "nullable": true, "items": { "type": "string" } } }, { "name": "status[]", "in": "query", "description": "Status could be none or many of 0 = draft, 1 = able to sign, 2 = partial signed, 3 = signed, 4 = deleted.", "schema": { "type": "array", "nullable": true, "items": { "type": "integer", "format": "int64" } } }, { "name": "start", "in": "query", "description": "Start date of signature request (UNIX timestamp)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "end", "in": "query", "description": "End date of signature request (UNIX timestamp)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Name of the column to sort by", "schema": { "type": "string", "nullable": true } }, { "name": "sortDirection", "in": "query", "description": "Ascending or descending order", "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": "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": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/File" } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file/thumbnail/{nodeId}": { "get": { "operationId": "file-get-thumbnail", "summary": "Return the thumbnail of a LibreSign file", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "The nodeId of document", "required": true, "schema": { "type": "integer", "format": "int64", "default": -1 } }, { "name": "x", "in": "query", "description": "Width of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "y", "in": "query", "description": "Height of generated file", "schema": { "type": "integer", "format": "int64", "default": 32 } }, { "name": "a", "in": "query", "description": "Crop, boolean value, default false", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "name": "forceIcon", "in": "query", "description": "Force to generate a new thumbnail", "schema": { "type": "integer", "default": 1, "enum": [ 0, 1 ] } }, { "name": "mode", "in": "query", "description": "To force a given mimetype for the file", "schema": { "type": "string", "default": "fill" } }, { "name": "mimeFallback", "in": "query", "description": "If we have no preview enabled, we can redirect to the mime icon if any", "schema": { "type": "integer", "default": 0, "enum": [ 0, 1 ] } }, { "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": { "*/*": { "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": {} } } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "404": { "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": {} } } } } } } }, "303": { "description": "Redirect", "headers": { "Location": { "schema": { "type": "string" } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file": { "post": { "operationId": "file-save", "summary": "Send a file", "description": "Send a new file to Nextcloud and return the fileId to request signature", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "file" ], "properties": { "file": { "$ref": "#/components/schemas/NewFile", "description": "File to save" }, "name": { "type": "string", "default": "", "description": "The name of file to sign" }, "settings": { "$ref": "#/components/schemas/FolderSettings", "default": [], "description": "Settings to define the pattern to store the file. See more informations at FolderService::getFolderName method." } } } } } }, "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/NextcloudFile" } } } } } } } }, "422": { "description": "Failed to save data", "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}/file/file_id/{fileId}": { "delete": { "operationId": "file-delete-all-request-signature-using-file-id", "summary": "Delete File", "description": "This will delete the file and all data", "tags": [ "file" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Failed", "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" } } } } } } } } } }, "422": { "description": "Failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}": { "post": { "operationId": "file_element-post", "summary": "Create visible element", "description": "Create visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signRequestId" ], "properties": { "signRequestId": { "type": "integer", "format": "int64", "description": "Id of sign request" }, "elementId": { "type": "integer", "format": "int64", "nullable": true, "description": "ID of visible element. Each element has an ID that is returned on validation endpoints." }, "type": { "type": "string", "default": "", "description": "The type of element to create, sginature, sinitial, date, datetime, text" }, "metadata": { "type": "object", "default": {}, "description": "Metadata of visible elements to associate with the document" }, "coordinates": { "$ref": "#/components/schemas/Coordinate", "default": [], "description": "Coortinates of a visible element on PDF" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "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", "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": [ "fileElementId" ], "properties": { "fileElementId": { "type": "integer", "format": "int64" } } } } } } } } } }, "404": { "description": "Failure when create visible element", "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": [ "errors" ], "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/file-element/{uuid}/{elementId}": { "patch": { "operationId": "file_element-patch", "summary": "Update visible element", "description": "Update visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "signRequestId" ], "properties": { "signRequestId": { "type": "integer", "format": "int64", "description": "Id of sign request" }, "type": { "type": "string", "default": "", "description": "The type of element to create, sginature, sinitial, date, datetime, text" }, "metadata": { "type": "object", "default": {}, "description": "Metadata of visible elements to associate with the document" }, "coordinates": { "$ref": "#/components/schemas/Coordinate", "default": [], "description": "Coortinates of a visible element on PDF" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "required": true, "schema": { "type": "string" } }, { "name": "elementId", "in": "path", "description": "ID of visible element. Each element has an ID that is returned on validation endpoints.", "required": true, "schema": { "type": "integer", "format": "int64", "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": "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": [ "fileElementId" ], "properties": { "fileElementId": { "type": "integer", "format": "int64" } } } } } } } } } }, "404": { "description": "Failure when patch visible element", "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": [ "errors" ], "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } }, "delete": { "operationId": "file_element-delete", "summary": "Delete visible element", "description": "Delete visible element of a specific file", "tags": [ "file_element" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID.", "required": true, "schema": { "type": "string" } }, { "name": "elementId", "in": "path", "description": "ID of visible element. Each element has an ID that is returned on validation endpoints.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": {} } } } } } } }, "404": { "description": "Failure when delete visible element or file 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": [ "errors" ], "properties": { "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/id-docs": { "post": { "operationId": "id_docs-add-files", "summary": "Add identification documents to user profile", "tags": [ "id_docs" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "files" ], "properties": { "files": { "type": "array", "description": "The list of files to add to profile", "items": { "$ref": "#/components/schemas/IdDocs" } } } } } } }, "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 saved with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": {} } } } } } } }, "401": { "description": "No file provided or other problem with provided file", "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": [ "file", "type", "message" ], "properties": { "file": { "type": "integer", "format": "int64", "nullable": true }, "type": { "type": "string", "enum": [ "info", "warning", "danger" ] }, "message": { "type": "string" } } } } } } } } } } } }, "get": { "operationId": "id_docs-list-of-unauthenticated-signer", "summary": "List files of unauthenticated account", "tags": [ "id_docs" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "query", "description": "User ID to filter by", "schema": { "type": "string", "nullable": true } }, { "name": "signRequestId", "in": "query", "description": "Sign request ID to filter by", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "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": "Certificate saved 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": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "items": { "$ref": "#/components/schemas/File" } } } } } } } } } } }, "404": { "description": "No file provided or other problem with provided file", "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}/id-docs/{nodeId}": { "delete": { "operationId": "id_docs-delete", "summary": "Delete file from account", "tags": [ "id_docs" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "the nodeId of file to be delete", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": "File 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": {} } } } } } } }, "401": { "description": "Failure to delete file from account", "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": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "type": "string" } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/id-docs/approval/list": { "get": { "operationId": "id_docs-list-to-approval", "summary": "List files that need to be approved", "tags": [ "id_docs" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "userId", "in": "query", "description": "User ID to filter by", "schema": { "type": "string", "nullable": true } }, { "name": "signRequestId", "in": "query", "description": "Sign request ID to filter by", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "page", "in": "query", "description": "the number of page to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Total of elements to return", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Sort field (e.g., 'owner', 'file_type', 'status')", "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": "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": [ "pagination", "data" ], "properties": { "pagination": { "$ref": "#/components/schemas/Pagination" }, "data": { "type": "array", "nullable": true, "items": { "$ref": "#/components/schemas/File" } } } } } } } } } } }, "404": { "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}/identify-account/search": { "get": { "operationId": "identify_account-search", "summary": "List possible signers", "description": "Used to identify who can sign the document. The return of this endpoint is related with Administration Settiongs > LibreSign > Identify method.", "tags": [ "identify_account" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "search", "in": "query", "description": "search params", "schema": { "type": "string", "default": "" } }, { "name": "method", "in": "query", "description": "filter by method (email, account, sms, signal, telegram, whatsapp, xmpp)", "schema": { "type": "string", "default": "" } }, { "name": "page", "in": "query", "description": "the number of page to return. Default: 1", "schema": { "type": "integer", "format": "int64", "default": 1 } }, { "name": "limit", "in": "query", "description": "Total of elements to return. Default: 25", "schema": { "type": "integer", "format": "int64", "default": 25 } }, { "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 saved 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": "array", "items": { "$ref": "#/components/schemas/IdentifyAccount" } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signers": { "post": { "operationId": "notify-signers", "summary": "Notify signers of a file", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId", "signers" ], "properties": { "fileId": { "type": "integer", "format": "int64", "description": "The identifier value of LibreSign file" }, "signers": { "type": "array", "description": "Signers data", "items": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } } } } } } } } }, "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Unauthorized", "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": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string", "enum": [ "danger" ] }, "message": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/signer": { "post": { "operationId": "notify-signer", "summary": "Notify a signer of a file", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "fileId", "signRequestId" ], "properties": { "fileId": { "type": "integer", "format": "int64", "description": "The identifier value of LibreSign file" }, "signRequestId": { "type": "integer", "format": "int64", "description": "The sign request id" } } } } } }, "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Unauthorized", "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": [ "messages" ], "properties": { "messages": { "type": "array", "items": { "type": "object", "required": [ "type", "message" ], "properties": { "type": { "type": "string", "enum": [ "danger" ] }, "message": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/notify/notification": { "delete": { "operationId": "notify-notification-dismiss", "summary": "Dismiss a specific notification", "tags": [ "notify" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "objectType", "in": "query", "description": "The type of object", "required": true, "schema": { "type": "string" } }, { "name": "objectId", "in": "query", "description": "The identifier value of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "subject", "in": "query", "description": "The subject of notification", "required": true, "schema": { "type": "string" } }, { "name": "timestamp", "in": "query", "description": "Timestamp of notification to dismiss", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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}/request-signature": { "post": { "operationId": "request_signature-request", "summary": "Request signature", "description": "Request that a file be signed by a group of people. Each user in the users array can optionally include a 'signing_order' field to control the order of signatures when ordered signing flow is enabled.", "tags": [ "request_signature" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "file", "users", "name" ], "properties": { "file": { "$ref": "#/components/schemas/NewFile", "description": "File object." }, "users": { "type": "array", "description": "Collection of users who must sign the document. Each user can have: identify, displayName, description, notify, signing_order", "items": { "$ref": "#/components/schemas/NewSigner" } }, "name": { "type": "string", "description": "The name of file to sign" }, "callback": { "type": "string", "nullable": true, "description": "URL that will receive a POST after the document is signed" }, "status": { "type": "integer", "format": "int64", "nullable": true, "default": 1, "description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending" }, "signatureFlow": { "type": "string", "nullable": true, "description": "Signature flow mode: 'parallel' or 'ordered_numeric'. If not provided, uses global configuration" } } } } } }, "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", "message" ], "properties": { "data": { "$ref": "#/components/schemas/ValidateFile" }, "message": { "type": "string" } } } } } } } } } }, "422": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "properties": { "message": { "type": "string" }, "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } }, "patch": { "operationId": "request_signature-update-sign", "summary": "Updates signatures data", "description": "Is necessary to inform the UUID of the file and a list of people", "tags": [ "request_signature" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "users": { "type": "array", "nullable": true, "default": [], "description": "Collection of users who must sign the document", "items": { "$ref": "#/components/schemas/NewSigner" } }, "uuid": { "type": "string", "nullable": true, "description": "UUID of sign request. The signer UUID is what the person receives via email when asked to sign. This is not the file UUID." }, "visibleElements": { "type": "array", "nullable": true, "description": "Visible elements on document", "items": { "$ref": "#/components/schemas/VisibleElement" } }, "file": { "nullable": true, "default": [], "description": "File object.", "anyOf": [ { "$ref": "#/components/schemas/NewFile" }, { "type": "array", "maxItems": 0 } ] }, "status": { "type": "integer", "format": "int64", "nullable": true, "description": "Numeric code of status * 0 - no signers * 1 - signed * 2 - pending" } } } } } }, "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": [ "message", "data" ], "properties": { "message": { "type": "string" }, "data": { "$ref": "#/components/schemas/ValidateFile" } } } } } } } } } }, "422": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "properties": { "message": { "type": "string" }, "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/{signRequestId}": { "delete": { "operationId": "request_signature-delete-one-request-signature-using-file-id", "summary": "Delete sign request", "description": "You can only request exclusion as any sign", "tags": [ "request_signature" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "signRequestId", "in": "path", "description": "The sign request id", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Failed", "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" } } } } } } } } } }, "422": { "description": "Failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}": { "delete": { "operationId": "request_signature-delete-all-request-signature-using-file-id", "summary": "Delete sign request", "description": "You can only request exclusion as any sign", "tags": [ "request_signature" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "401": { "description": "Failed", "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" } } } } } } } } } }, "422": { "description": "Failed", "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } } } } } } } } } } } } }, "post": { "operationId": "sign_file-sign-using-file-id", "summary": "Sign a file using file Id", "tags": [ "sign_file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "method" ], "properties": { "method": { "type": "string", "description": "Signature method" }, "elements": { "type": "object", "default": {}, "description": "List of visible elements", "additionalProperties": { "type": "object" } }, "identifyValue": { "type": "string", "default": "", "description": "Identify value" }, "token": { "type": "string", "default": "", "description": "Token, commonly send by email" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Id of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "action", "message", "file" ], "properties": { "action": { "type": "integer", "format": "int64" }, "message": { "type": "string" }, "file": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } } } } } } } } } } }, "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "redirect": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}": { "post": { "operationId": "sign_file-sign-using-uuid", "summary": "Sign a file using file UUID", "tags": [ "sign_file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "method" ], "properties": { "method": { "type": "string", "description": "Signature method" }, "elements": { "type": "object", "default": {}, "description": "List of visible elements", "additionalProperties": { "type": "object" } }, "identifyValue": { "type": "string", "default": "", "description": "Identify value" }, "token": { "type": "string", "default": "", "description": "Token, commonly send by email" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of LibreSign file", "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", "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": [ "action", "message", "file" ], "properties": { "action": { "type": "integer", "format": "int64" }, "message": { "type": "string" }, "file": { "type": "object", "required": [ "uuid" ], "properties": { "uuid": { "type": "string" } } } } } } } } } } } }, "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": [ "action", "errors" ], "properties": { "action": { "type": "integer", "format": "int64" }, "errors": { "type": "array", "items": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" }, "title": { "type": "string" } } } }, "redirect": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/uuid/{uuid}/renew/{method}": { "post": { "operationId": "sign_file-sign-renew", "summary": "Renew the signature method", "tags": [ "sign_file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "method", "in": "path", "description": "Signature method", "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", "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}/sign/uuid/{uuid}/code": { "post": { "operationId": "sign_file-get-code-using-uuid", "summary": "Get code to sign the document using UUID", "tags": [ "sign_file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "identifyMethod": { "type": "string", "nullable": true, "enum": [ "account", "email" ], "description": "Identify signer method" }, "signMethod": { "type": "string", "nullable": true, "description": "Method used to sign the document, i.e. emailToken, account, clickToSign, sms, signal, telegram, whatsapp, xmpp" }, "identify": { "type": "string", "nullable": true, "description": "Identify value, i.e. the signer email, account or phone number" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "uuid", "in": "path", "description": "UUID of LibreSign file", "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", "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" } } } } } } } } } }, "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/sign/file_id/{fileId}/code": { "post": { "operationId": "sign_file-get-code-using-file-id", "summary": "Get code to sign the document using FileID", "tags": [ "sign_file" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "identifyMethod": { "type": "string", "nullable": true, "enum": [ "account", "email" ], "description": "Identify signer method" }, "signMethod": { "type": "string", "nullable": true, "description": "Method used to sign the document, i.e. emailToken, account, clickToSign, sms, signal, telegram, whatsapp, xmpp" }, "identify": { "type": "string", "nullable": true, "description": "Identify value, i.e. the signer email, account or phone number" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "fileId", "in": "path", "description": "Id of LibreSign file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/signature/elements": { "post": { "operationId": "signature_elements-create-signature-element", "summary": "Create signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "elements" ], "properties": { "elements": { "type": "object", "description": "Element object", "additionalProperties": { "type": "object" } } } } } } }, "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": [ "elements", "message" ], "properties": { "elements": { "type": "array", "items": { "$ref": "#/components/schemas/UserElement" } }, "message": { "type": "string" } } } } } } } } } }, "422": { "description": "Invalid data", "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" } } } } } } } } } } } }, "get": { "operationId": "signature_elements-get-signature-elements", "summary": "Get signature elements", "tags": [ "signature_elements" ], "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": [ "elements" ], "properties": { "elements": { "type": "array", "items": { "$ref": "#/components/schemas/UserElement" } } } } } } } } } } }, "404": { "description": "Invalid data", "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}/signature/elements/preview/{nodeId}": { "get": { "operationId": "signature_elements-get-signature-element-preview", "summary": "Get preview of signature elements of", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": { "*/*": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Invalid data", "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}/signature/elements/{nodeId}": { "get": { "operationId": "signature_elements-get-signature-element", "summary": "Get signature element of signer", "tags": [ "signature_elements" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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/UserElement" } } } } } } } }, "404": { "description": "Invalid data", "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" } } } } } } } } } } } }, "patch": { "operationId": "signature_elements-patch-signature-element", "summary": "Update signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "type": { "type": "string", "default": "", "description": "The type of signature element" }, "file": { "type": "object", "default": {}, "description": "Element object", "additionalProperties": { "type": "object" } } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "elements", "message" ], "properties": { "elements": { "type": "array", "items": { "$ref": "#/components/schemas/UserElement" } }, "message": { "type": "string" } } } } } } } } } }, "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } }, "delete": { "operationId": "signature_elements-delete-signature-element", "summary": "Delete signature element", "tags": [ "signature_elements" ], "security": [ {}, { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "nodeId", "in": "path", "description": "Node id of a Nextcloud file", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } }, "404": { "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": [ "message" ], "properties": { "message": { "type": "string" } } } } } } } } } } } } }, "/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": [ "mode" ], "properties": { "mode": { "type": "string", "description": "Signature flow mode: 'parallel' or 'ordered_numeric'" } } } } } }, "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": [] }