{ "openapi": "3.0.3", "info": { "title": "libresign-administration", "version": "0.0.1", "description": "Control document signing workflows inside Nextcloud", "license": { "name": "agpl" } }, "components": { "securitySchemes": { "basic_auth": { "type": "http", "scheme": "basic" }, "bearer_auth": { "type": "http", "scheme": "bearer" } }, "schemas": { "ActiveSigningItem": { "type": "object", "required": [ "id", "uuid", "name", "signerEmail", "signerDisplayName", "updatedAt" ], "properties": { "id": { "type": "integer", "format": "int64" }, "uuid": { "type": "string" }, "name": { "type": "string" }, "signerEmail": { "type": "string" }, "signerDisplayName": { "type": "string" }, "updatedAt": { "type": "integer", "format": "int64" } } }, "ActiveSigningsResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ActiveSigningItem" } } } }, "AdminSignatureMethodSetting": { "type": "object", "required": [ "enabled", "label", "name" ], "properties": { "enabled": { "type": "boolean" }, "label": { "type": "string" }, "name": { "type": "string" } } }, "Capabilities": { "type": "object", "required": [ "features", "config", "version" ], "properties": { "features": { "type": "array", "items": { "type": "string" } }, "config": { "type": "object", "required": [ "show-confetti", "sign-elements", "envelope", "upload" ], "properties": { "show-confetti": { "type": "boolean" }, "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" } } }, "envelope": { "type": "object", "required": [ "is-available" ], "properties": { "is-available": { "type": "boolean" } } }, "upload": { "type": "object", "required": [ "max-file-uploads" ], "properties": { "max-file-uploads": { "type": "integer", "format": "int64" } } } } }, "version": { "type": "string" } } }, "CertificateDataGenerated": { "allOf": [ { "$ref": "#/components/schemas/EngineHandler" }, { "type": "object", "required": [ "generated" ], "properties": { "generated": { "type": "boolean" } } } ] }, "CertificateEngineConfigResponse": { "type": "object", "required": [ "engine", "identify_methods" ], "properties": { "engine": { "type": "string", "enum": [ "cfssl", "none", "openssl" ] }, "identify_methods": { "type": "array", "items": { "$ref": "#/components/schemas/IdentifyMethodAdminSetting" } } } }, "CertificatePolicyResponse": { "type": "object", "required": [ "status", "CPS" ], "properties": { "status": { "type": "string", "enum": [ "success" ] }, "CPS": { "type": "string" } } }, "ConfigureCheck": { "type": "object", "required": [ "message", "resource", "status", "tip" ], "properties": { "message": { "type": "string" }, "resource": { "type": "string" }, "status": { "type": "string", "enum": [ "error", "info", "success" ] }, "tip": { "type": "string" } } }, "ConfigureChecksResponse": { "type": "array", "items": { "$ref": "#/components/schemas/ConfigureCheck" } }, "CrlListItem": { "type": "object", "required": [ "id", "serial_number", "owner", "status", "certificate_type", "engine", "instance_id", "generation", "issued_at", "valid_to", "revoked_at", "reason_code", "comment", "revoked_by", "invalidity_date", "crl_number" ], "properties": { "id": { "type": "integer", "format": "int64" }, "serial_number": { "type": "string" }, "owner": { "type": "string" }, "status": { "type": "string", "enum": [ "issued", "revoked" ] }, "certificate_type": { "type": "string" }, "engine": { "type": "string" }, "instance_id": { "type": "string", "nullable": true }, "generation": { "type": "integer", "format": "int64", "nullable": true }, "issued_at": { "type": "string", "nullable": true }, "valid_to": { "type": "string", "nullable": true }, "revoked_at": { "type": "string", "nullable": true }, "reason_code": { "type": "integer", "format": "int64", "nullable": true }, "comment": { "type": "string", "nullable": true }, "revoked_by": { "type": "string", "nullable": true }, "invalidity_date": { "type": "string", "nullable": true }, "crl_number": { "type": "integer", "format": "int64", "nullable": true } } }, "CrlListResponse": { "type": "object", "required": [ "data", "total", "page", "length" ], "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/CrlListItem" } }, "total": { "type": "integer", "format": "int64" }, "page": { "type": "integer", "format": "int64" }, "length": { "type": "integer", "format": "int64" } } }, "CrlRevokeResponse": { "type": "object", "required": [ "success", "message" ], "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } } }, "EffectivePolicyMeta": { "type": "object", "properties": { "defaultSystemValue": { "$ref": "#/components/schemas/EffectivePolicyValue" }, "appConfigKey": { "type": "string" }, "userPreferenceKey": { "type": "string" }, "resolutionMode": { "type": "string" }, "supportsGroupAdminDelegation": { "type": "boolean" }, "canCreateDescendantRules": { "type": "boolean" }, "supportsUserPreference": { "type": "boolean" }, "supportedScopes": { "type": "array", "items": { "$ref": "#/components/schemas/PolicyScope" } }, "backendOnly": { "type": "boolean" }, "helper": { "type": "boolean" }, "parentPolicyKey": { "type": "string" }, "compositeChildren": { "type": "array", "items": { "type": "string" } } } }, "EffectivePolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/EffectivePolicyState" } } }, "EffectivePolicyState": { "type": "object", "required": [ "policyKey", "effectiveValue", "sourceScope", "visible", "editableByCurrentActor", "allowedValues", "canSaveAsUserDefault", "canUseAsRequestOverride", "preferenceWasCleared", "blockedBy", "groupCount", "userCount", "everyoneCount" ], "properties": { "policyKey": { "type": "string" }, "effectiveValue": { "$ref": "#/components/schemas/EffectivePolicyValue" }, "meta": { "$ref": "#/components/schemas/EffectivePolicyMeta" }, "sourceScope": { "type": "string" }, "visible": { "type": "boolean" }, "editableByCurrentActor": { "type": "boolean" }, "allowedValues": { "type": "array", "items": { "$ref": "#/components/schemas/EffectivePolicyValue" } }, "canSaveAsUserDefault": { "type": "boolean" }, "canUseAsRequestOverride": { "type": "boolean" }, "preferenceWasCleared": { "type": "boolean" }, "blockedBy": { "type": "string", "nullable": true }, "groupCount": { "type": "integer", "format": "int64", "minimum": 0 }, "userCount": { "type": "integer", "format": "int64", "minimum": 0 }, "everyoneCount": { "type": "integer", "format": "int64", "minimum": 0 } } }, "EffectivePolicyValue": { "nullable": true, "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "EngineHandler": { "type": "object", "required": [ "configPath", "policySection", "rootCert" ], "properties": { "configPath": { "type": "string" }, "cfsslUri": { "type": "string" }, "policySection": { "type": "array", "items": { "$ref": "#/components/schemas/PolicySection" } }, "rootCert": { "$ref": "#/components/schemas/RootCertificate" } } }, "EngineHandlerResponse": { "type": "object", "required": [ "data" ], "properties": { "data": { "$ref": "#/components/schemas/EngineHandler" } } }, "ErrorResponse": { "type": "object", "required": [ "error" ], "properties": { "error": { "type": "string" } } }, "FailureStatusResponse": { "type": "object", "required": [ "status", "message" ], "properties": { "status": { "type": "string", "enum": [ "failure" ] }, "message": { "type": "string" } } }, "HasRootCertResponse": { "type": "object", "required": [ "hasRootCert" ], "properties": { "hasRootCert": { "type": "boolean" } } }, "IdentifyMethodAdminSetting": { "type": "object", "required": [ "name", "friendly_name", "enabled", "requirement" ], "properties": { "name": { "type": "string" }, "friendly_name": { "type": "string" }, "enabled": { "type": "boolean" }, "requirement": { "$ref": "#/components/schemas/IdentifyMethodRequirement" }, "minimumTotalVerifiedFactors": { "type": "integer", "format": "int64", "minimum": 1 }, "can_create_account": { "type": "boolean" }, "test_url": { "type": "string" }, "signatureMethods": { "type": "object", "additionalProperties": { "$ref": "#/components/schemas/AdminSignatureMethodSetting" } } } }, "IdentifyMethodRequirement": { "type": "string", "enum": [ "required", "optional" ] }, "MessageResponse": { "type": "object", "required": [ "message" ], "properties": { "message": { "type": "string" } } }, "OCSMeta": { "type": "object", "required": [ "status", "statuscode" ], "properties": { "status": { "type": "string" }, "statuscode": { "type": "integer" }, "message": { "type": "string" }, "totalitems": { "type": "string" }, "itemsperpage": { "type": "string" } } }, "PolicyScope": { "type": "string", "enum": [ "system", "group", "user" ] }, "PolicySection": { "type": "object", "required": [ "OID", "CPS" ], "properties": { "OID": { "type": "string" }, "CPS": { "type": "string" } } }, "PublicCapabilities": { "type": "object", "properties": { "libresign": { "$ref": "#/components/schemas/Capabilities" } } }, "RootCertificate": { "type": "object", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "array", "items": { "$ref": "#/components/schemas/RootCertificateName" } } } }, "RootCertificateName": { "type": "object", "required": [ "id", "value" ], "properties": { "id": { "type": "string" }, "value": { "nullable": true, "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } }, "SuccessStatusResponse": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "success" ] } } }, "SystemPolicyResponse": { "type": "object", "required": [ "policy" ], "properties": { "policy": { "$ref": "#/components/schemas/SystemPolicyState" } } }, "SystemPolicyState": { "type": "object", "required": [ "policyKey", "scope", "value", "allowChildOverride", "visibleToChild", "allowedValues" ], "properties": { "policyKey": { "type": "string" }, "scope": { "type": "string", "enum": [ "system", "global" ] }, "value": { "$ref": "#/components/schemas/EffectivePolicyValue", "nullable": true }, "allowChildOverride": { "type": "boolean" }, "visibleToChild": { "type": "boolean" }, "allowedValues": { "type": "array", "items": { "$ref": "#/components/schemas/EffectivePolicyValue" } } } }, "SystemPolicyWriteResponse": { "allOf": [ { "$ref": "#/components/schemas/MessageResponse" }, { "$ref": "#/components/schemas/EffectivePolicyResponse" } ] } } }, "paths": { "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/cfssl": { "post": { "operationId": "admin-generate-certificate-cfssl", "summary": "Generate certificate using CFSSL engine", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "rootCert" ], "properties": { "rootCert": { "type": "object", "description": "fields of root certificate", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "object", "additionalProperties": { "type": "object", "required": [ "value" ], "properties": { "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } } }, "cfsslUri": { "type": "string", "default": "", "description": "URI of CFSSL API" }, "configPath": { "type": "string", "default": "", "description": "Path of config files of CFSSL" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EngineHandlerResponse" } } } } } } } }, "401": { "description": "Account not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/openssl": { "post": { "operationId": "admin-generate-certificate-open-ssl", "summary": "Generate certificate using OpenSSL engine", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "rootCert" ], "properties": { "rootCert": { "type": "object", "description": "fields of root certificate", "required": [ "commonName", "names" ], "properties": { "commonName": { "type": "string" }, "names": { "type": "object", "additionalProperties": { "type": "object", "required": [ "value" ], "properties": { "value": { "oneOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ] } } } } } }, "configPath": { "type": "string", "default": "", "description": "Path of config files of CFSSL" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/EngineHandlerResponse" } } } } } } } }, "401": { "description": "Account not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate/engine": { "post": { "operationId": "admin-set-certificate-engine", "summary": "Set certificate engine", "description": "Sets the certificate engine (openssl, cfssl, or none) and automatically configures identify_methods when needed\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "engine" ], "properties": { "engine": { "type": "string", "description": "The certificate engine to use (openssl, cfssl, or none)" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificateEngineConfigResponse" } } } } } } } }, "400": { "description": "Invalid engine", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/MessageResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate": { "get": { "operationId": "admin-load-certificate", "summary": "Load certificate data", "description": "Return all data of root certificate and a field called `generated` with a boolean value.\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificateDataGenerated" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/configure-check": { "get": { "operationId": "admin-configure-check", "summary": "Check the configuration of LibreSign", "description": "Return the status of necessary configuration and tips to fix the problems.\nThis endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/ConfigureChecksResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/signature-background": { "post": { "operationId": "admin-signature-background-save", "summary": "Add custom background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } }, "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": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } }, "get": { "operationId": "admin-signature-background-get", "summary": "Get custom background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Image returned", "content": { "*/*": { "schema": { "type": "string", "format": "binary" } } } } } }, "delete": { "operationId": "admin-signature-background-delete", "summary": "Delete background image", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Deleted with success", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy": { "post": { "operationId": "admin-save-certificate-policy", "summary": "Upload new certificate policy PDF for this instance", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CertificatePolicyResponse" } } } } } } } }, "422": { "description": "Upload or validation error", "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/FailureStatusResponse" } } } } } } } } } }, "delete": { "operationId": "admin-delete-certificate-policy", "summary": "Delete certificate policy of this instance", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "enum": [ "success" ] } } } } } } } } } }, "422": { "description": "Error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/certificate-policy/oid": { "post": { "operationId": "admin-update-oid", "summary": "Update OID", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "oid" ], "properties": { "oid": { "type": "string", "description": "OID is a unique numeric identifier for certificate policies in digital certificates." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/SuccessStatusResponse" } } } } } } } }, "422": { "description": "Validation error", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/FailureStatusResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/admin/active-signings": { "get": { "operationId": "admin-get-active-signings", "summary": "Get list of files currently being signed (status = SIGNING_IN_PROGRESS)", "description": "This endpoint requires admin access", "tags": [ "admin" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "List of active signings", "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/ActiveSigningsResponse" } } } } } } } }, "500": { "description": "", "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/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/list": { "get": { "operationId": "crl_api-list", "summary": "List CRL entries with pagination and filters", "description": "This endpoint requires admin access", "tags": [ "crl" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "page", "in": "query", "description": "Page number (1-based)", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "length", "in": "query", "description": "Number of items per page", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "status", "in": "query", "description": "Filter by status (issued, revoked, expired)", "schema": { "type": "string", "nullable": true } }, { "name": "engine", "in": "query", "description": "Filter by engine type", "schema": { "type": "string", "nullable": true } }, { "name": "instanceId", "in": "query", "description": "Filter by instance ID", "schema": { "type": "string", "nullable": true } }, { "name": "generation", "in": "query", "description": "Filter by generation", "schema": { "type": "integer", "format": "int64", "nullable": true } }, { "name": "owner", "in": "query", "description": "Filter by owner", "schema": { "type": "string", "nullable": true } }, { "name": "serialNumber", "in": "query", "description": "Filter by serial number (partial match)", "schema": { "type": "string", "nullable": true } }, { "name": "revokedBy", "in": "query", "description": "Filter by who revoked the certificate", "schema": { "type": "string", "nullable": true } }, { "name": "sortBy", "in": "query", "description": "Sort field (e.g., 'revoked_at', 'issued_at', 'serial_number')", "schema": { "type": "string", "nullable": true } }, { "name": "sortOrder", "in": "query", "description": "Sort order (ASC or DESC)", "schema": { "type": "string", "nullable": true } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "CRL entries retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlListResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/crl/revoke": { "post": { "operationId": "crl_api-revoke", "summary": "Revoke a certificate by serial number", "description": "This endpoint requires admin access", "tags": [ "crl" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "serialNumber" ], "properties": { "serialNumber": { "type": "string", "description": "Certificate serial number to revoke" }, "reasonCode": { "type": "integer", "format": "int64", "nullable": true, "description": "Revocation reason code (0-10, see RFC 5280)" }, "reasonText": { "type": "string", "nullable": true, "description": "Optional text describing the reason" } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "Certificate revoked successfully", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } }, "400": { "description": "Invalid parameters", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } }, "404": { "description": "Certificate not found", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/CrlRevokeResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/policies/system/{policyKey}": { "get": { "operationId": "policy-get-system", "summary": "Read explicit system policy configuration", "description": "This endpoint requires admin access", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to read from the system layer.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "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/SystemPolicyResponse" } } } } } } } } } }, "post": { "operationId": "policy-set-system", "summary": "Save a system-level policy value", "description": "This endpoint requires admin access", "tags": [ "policy" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "requestBody": { "required": false, "content": { "application/json": { "schema": { "type": "object", "properties": { "value": { "nullable": true, "description": "Policy value to persist. Null resets the policy to its default system value.", "anyOf": [ { "type": "boolean" }, { "type": "integer", "format": "int64" }, { "type": "number", "format": "double" }, { "type": "string" }, { "type": "object", "additionalProperties": { "type": "object" } } ] }, "allowChildOverride": { "type": "boolean", "default": false, "description": "Whether lower layers may override this system default." } } } } } }, "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "policyKey", "in": "path", "description": "Policy identifier to persist at the system layer.", "required": true, "schema": { "type": "string", "pattern": "^[a-z0-9_]+$" } }, { "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/SystemPolicyWriteResponse" } } } } } } } }, "400": { "description": "Invalid policy value", "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/ErrorResponse" } } } } } } } } } } }, "/ocs/v2.php/apps/libresign/api/{apiVersion}/setting/has-root-cert": { "get": { "operationId": "setting-has-root-cert", "summary": "Has root certificate", "description": "Checks whether the root certificate has been configured by checking the Nextcloud configuration table to see if the root certificate settings have", "tags": [ "setting" ], "security": [ { "bearer_auth": [] }, { "basic_auth": [] } ], "parameters": [ { "name": "apiVersion", "in": "path", "required": true, "schema": { "type": "string", "enum": [ "v1" ], "default": "v1" } }, { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", "required": true, "schema": { "type": "boolean", "default": true } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "required": [ "ocs" ], "properties": { "ocs": { "type": "object", "required": [ "meta", "data" ], "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" }, "data": { "$ref": "#/components/schemas/HasRootCertResponse" } } } } } } } } } } } }, "tags": [] }