libresign/openapi.json
Vitor Mattos 7ca63a3c8b
chore: make frontend compatible with custom width and height
- Signature component at frontend was replaced by a best maintained
  package
- Addded more capabilities

Signed-off-by: Vitor Mattos <vitor@php.rio>
2025-04-11 10:44:03 -03:00

7858 lines
338 KiB
JSON

{
"openapi": "3.0.3",
"info": {
"title": "libresign",
"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": {
"AccountFile": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"$ref": "#/components/schemas/NewFile"
},
"name": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"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",
"validate"
],
"properties": {
"name": {
"type": "string"
},
"subject": {
"type": "string"
},
"issuer": {
"type": "string"
},
"extensions": {
"type": "string"
},
"validate": {
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"from": {
"type": "string"
},
"to": {
"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
}
}
},
"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",
"url"
],
"properties": {
"type": {
"type": "string"
},
"nodeId": {
"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"
}
}
}
}
},
"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"
]
}
}
},
"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"
}
}
}
}
},
"NextcloudFile": {
"type": "object",
"required": [
"message",
"name",
"id",
"etag",
"path",
"type"
],
"properties": {
"message": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "integer",
"format": "int64"
},
"etag": {
"type": "string"
},
"path": {
"type": "string"
},
"type": {
"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
}
}
},
"PublicCapabilities": {
"type": "object",
"properties": {
"libresign": {
"$ref": "#/components/schemas/Capabilities"
}
}
},
"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"
],
"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
},
"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",
"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
},
"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/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/account/files/approve/{uuid}": {
"get": {
"operationId": "page-sign-account-file",
"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/account/files/approve/{uuid}/{path}": {
"get": {
"operationId": "page-sign-account-file-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/files": {
"post": {
"operationId": "account-add-files",
"summary": "Add files to account profile",
"tags": [
"account"
],
"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/AccountFile"
}
}
}
}
}
}
},
"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"
}
}
}
}
}
}
}
}
}
}
}
},
"delete": {
"operationId": "account-delete-file",
"summary": "Delete file from account",
"tags": [
"account"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "nodeId",
"in": "query",
"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"
}
}
}
}
}
}
}
}
}
}
}
}
},
"get": {
"operationId": "account-account-file-list-to-owner",
"summary": "List account files of authenticated account",
"tags": [
"account"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "filter",
"in": "query",
"description": "Filter params",
"schema": {
"type": "string",
"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}/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/files/approval/list": {
"get": {
"operationId": "account-account-file-list-to-approval",
"summary": "List account files that need to be approved",
"tags": [
"account"
],
"security": [
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"parameters": [
{
"name": "apiVersion",
"in": "path",
"required": true,
"schema": {
"type": "string",
"enum": [
"v1"
],
"default": "v1"
}
},
{
"name": "filter",
"in": "query",
"description": "Filter params",
"schema": {
"type": "string",
"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": "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}/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}/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": "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": "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": "string"
}
},
"messages": {
"type": "array",
"items": {
"type": "object",
"required": [
"type",
"message"
],
"properties": {
"type": {
"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": "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/list": {
"get": {
"operationId": "file-list",
"summary": "List account files 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": "nodeId",
"in": "query",
"description": "The nodeId (also called fileId). Is the id of a file at Nextcloud",
"schema": {
"type": "string",
"nullable": true
}
},
{
"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 to sign usign fileId",
"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": "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": "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": "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": "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": "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": "signRequestId",
"in": "query",
"description": "The sign request id",
"required": true,
"schema": {
"type": "integer",
"format": "int64"
}
},
{
"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",
"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",
"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"
}
}
}
}
}
},
"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": "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": "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": "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": "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": "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": "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": []
}
],
"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"
},
"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"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"tags": []
}