{ "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "Centrifuge OS Node API", "title": "Centrifuge OS Node API", "contact": { "name": "Centrifuge", "url": "https://github.com/centrifuge/pod", "email": "hello@centrifuge.io" }, "license": { "name": "MIT" }, "version": "3.0.0" }, "host": "localhost:8082", "basePath": "/", "paths": { "/ping": { "get": { "description": "returns node version and network", "produces": [ "application/json" ], "tags": [ "Health" ], "summary": "Health check for Node", "operationId": "ping", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/health.Pong" } } } } }, "/v2/accounts": { "get": { "description": "Returns all the accounts in the node.", "produces": [ "application/json" ], "tags": [ "Accounts" ], "summary": "Returns all the accounts in the node.", "operationId": "get_accounts_v2", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.Accounts" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/accounts/generate": { "post": { "description": "Generates a new account with defaults.", "produces": [ "application/json" ], "tags": [ "Accounts" ], "summary": "Generates a new account with defaults.", "operationId": "generate_account_v2", "parameters": [ { "description": "Generate Account Payload", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.GenerateAccountPayload" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/coreapi.Account" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/accounts/self": { "get": { "description": "Returns the account associated with the identity provided in the JW3T auth token.", "produces": [ "application/json" ], "tags": [ "Accounts" ], "summary": "Returns the account associated with the identity provided in the JW3T auth token.", "operationId": "get_self_v2", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.Account" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/accounts/{account_id}": { "get": { "description": "Returns the account associated with accountID.", "produces": [ "application/json" ], "tags": [ "Accounts" ], "summary": "Returns the account associated with accountID.", "operationId": "get_account_v2", "parameters": [ { "type": "string", "description": "Account ID", "name": "account_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.Account" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/accounts/{account_id}/sign": { "post": { "description": "Signs and returns the signature of the Payload.", "produces": [ "application/json" ], "tags": [ "Accounts" ], "summary": "Signs and returns the signature of the Payload.", "operationId": "account_sign_v2", "parameters": [ { "type": "string", "description": "Account ID", "name": "account_id", "in": "path", "required": true }, { "description": "Sign request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.SignRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.SignResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents": { "post": { "description": "Creates a new document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Creates a new document.", "operationId": "create_document_v2", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Document Create request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.CreateDocumentRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}": { "patch": { "description": "Updates a pending document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Updates a pending document.", "operationId": "update_document_v2", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Document Update request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.UpdateDocumentRequest" } }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/attributes": { "post": { "description": "Add attributes to pending document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Add attributes to pending document.", "operationId": "add_attributes", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Attributes", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.AttributeMapRequest" } }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/attributes/{attribute_key}": { "delete": { "description": "Deletes attribute on a pending document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Deletes attribute on a pending document.", "operationId": "delete_attribute", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Hex encoded attribute key", "name": "attribute_key", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/clone": { "post": { "description": "Creates a new cloned document from an existing Template document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Creates a new cloned document from an existing Template document.", "operationId": "clone_document_v2", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Document Clone request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.CloneDocumentRequest" } }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/collaborators": { "delete": { "description": "Removes the collaborators from the document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Removes the collaborators from the document.", "operationId": "remove_collaborators", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Remove Collaborators request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.RemoveCollaboratorsRequest" } }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/commit": { "post": { "description": "Commits a pending document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Commits a pending document.", "operationId": "commit_document_v2", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/committed": { "get": { "description": "Returns the latest committed document associated with docID.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the latest committed document associated with docID.", "operationId": "get_committed_document", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/pending": { "get": { "description": "Returns the pending document associated with docID.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the pending document associated with docID.", "operationId": "get_pending_document", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/proofs": { "post": { "description": "Generates proofs for the fields from latest version of the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Generates proofs for the fields from latest version of the document.", "operationId": "generate_document_proofs", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "description": "Document proof request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.ProofsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.ProofsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/roles": { "post": { "description": "Adds a new role to the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Adds a new role to the document.", "operationId": "add_role", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "description": "Add Role Request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.AddRole" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.Role" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/roles/{role_id}": { "get": { "description": "Returns the role associated with the role ID in the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the role associated with the role ID in the document.", "operationId": "get_role", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Role ID", "name": "role_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.Role" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } }, "patch": { "description": "Updates an existing role on the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Updates an existing role on the document.", "operationId": "update_role", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Role ID", "name": "role_id", "in": "path", "required": true }, { "description": "Update Role Request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.UpdateRole" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.Role" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/signed_attribute": { "post": { "description": "Signs the given payload and add it the pending document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Signs the given payload and add it the pending document.", "operationId": "add_signed_attribute", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "description": "Signed Attribute request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/v2.SignedAttributeRequest" } }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/transition_rules": { "post": { "description": "Adds a new transition rules to the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Adds a transition new rules to the document.", "operationId": "add_transition_rule", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "description": "Add Transition rules Request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/pending.AddTransitionRules" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.TransitionRules" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/transition_rules/{rule_id}": { "get": { "description": "Returns the rule associated with the ruleID in the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the rule associated with the ruleID in the document.", "operationId": "get_transition_rule", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Transition rule ID", "name": "rule_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.TransitionRule" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } }, "delete": { "description": "Deletes the transition rule associated with ruleID from the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Deletes the transition rule associated with ruleID from the document.", "operationId": "delete_transition_rule", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Transition rule ID", "name": "rule_id", "in": "path", "required": true } ], "responses": { "204": { "description": "" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/versions/{version_id}": { "get": { "description": "Returns the specific version of the document.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the specific version of the document.", "operationId": "get_document_version_v2", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Document Version Identifier", "name": "version_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/documents/{document_id}/versions/{version_id}/proofs": { "post": { "description": "Generates proofs for the fields from a specific document version.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Generates proofs for the fields from a specific document version.", "operationId": "generate_document_version_proofs", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true }, { "type": "string", "description": "Document Version Identifier", "name": "version_id", "in": "path", "required": true }, { "description": "Document proof request", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.ProofsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.ProofsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/entities/{document_id}/relationships": { "get": { "description": "Returns the entity relationships.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the entity relationships.", "operationId": "get_entity_relationships", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/coreapi.DocumentResponse" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/jobs/{job_id}": { "get": { "description": "Returns the details of a given Job.", "produces": [ "application/json" ], "tags": [ "Jobs" ], "summary": "Returns the details of a given Job.", "operationId": "get_job", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Hex encoded Job ID", "name": "job_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/v2.Job" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v2/relationships/{document_id}/entity": { "get": { "description": "Returns the latest version of the Entity through relationship ID.", "produces": [ "application/json" ], "tags": [ "Documents" ], "summary": "Returns the latest version of the Entity through relationship ID.", "operationId": "get_entity_through_relationship_id", "parameters": [ { "type": "string", "description": "Hex encoded centrifuge ID of the account for the intended API action", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Entity Relationship Document Identifier", "name": "document_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/investor/assets": { "get": { "description": "retrieves an asset (document) that belongs to an issuer.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Investor" ], "summary": "retrieves an asset (document) that belongs to an issuer.", "operationId": "get_asset", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "Hex encoded asset (document) identifier", "name": "asset_id", "in": "path", "required": true }, { "type": "string", "description": "Loan ID", "name": "loan_id", "in": "path", "required": true }, { "type": "string", "description": "Pool ID", "name": "pool_id", "in": "path", "required": true } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/coreapi.DocumentResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections": { "post": { "description": "Creates a specific NFT collection", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "Creates a specific NFT collection.", "operationId": "create_nft_collection", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "description": "Create NFT collection request V3", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.CreateNFTCollectionV3Request" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/coreapi.CreateNFTCollectionV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections/{collection_id}/commit_and_mint": { "post": { "description": "commits a pending document and mints an NFT on the Centrifuge chain.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "commits a pending document and mints an NFT on the Centrifuge chain.", "operationId": "commit_and_mint_nft", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "NFT collection ID", "name": "collection_id", "in": "path", "required": true }, { "description": "Mint NFT request V3", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.MintNFTV3Request" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/coreapi.MintNFTV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections/{collection_id}/items/{item_id}/attribute/{attribute_name}": { "get": { "description": "Returns the attribute of an NFT item.", "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "Returns the attribute of an NFT item.", "operationId": "attribute_of_nft", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "NFT collection ID", "name": "collection_id", "in": "path", "required": true }, { "type": "string", "description": "NFT item ID", "name": "item_id", "in": "path", "required": true }, { "type": "string", "description": "NFT attribute name", "name": "attribute_name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.ItemAttributeOfNFTV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections/{collection_id}/items/{item_id}/metadata": { "get": { "description": "Returns the metadata of an NFT item.", "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "Returns the metadata of an NFT item.", "operationId": "metadata_of_nft", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "NFT collection ID", "name": "collection_id", "in": "path", "required": true }, { "type": "string", "description": "NFT item ID", "name": "item_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.ItemMetadataOfNFTV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections/{collection_id}/items/{item_id}/owner": { "get": { "description": "Returns the owner of an NFT.", "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "Returns the owner of an NFT.", "operationId": "owner_of_nft", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "NFT collection ID", "name": "collection_id", "in": "path", "required": true }, { "type": "string", "description": "NFT item ID", "name": "item_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/coreapi.GetNFTOwnerV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/v3/nfts/collections/{collection_id}/mint": { "post": { "description": "Mints an NFT for a specified document.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "NFTs" ], "summary": "Mints an NFT for a specified document.", "operationId": "mint_nft", "parameters": [ { "type": "string", "description": "Bearer \u003cJW3T token\u003e", "name": "authorization", "in": "header", "required": true }, { "type": "string", "description": "NFT collection ID", "name": "collection_id", "in": "path", "required": true }, { "description": "Mint NFT request V3", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/coreapi.MintNFTV3Request" } } ], "responses": { "202": { "description": "Accepted", "schema": { "$ref": "#/definitions/coreapi.MintNFTV3Response" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/httputils.HTTPError" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/httputils.HTTPError" } } } } }, "/webhook": { "post": { "description": "Webhook is a place holder to describe webhook response in swagger.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Webhook" ], "summary": "Webhook is a place holder to describe webhook response in swagger.", "operationId": "webhook", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/notification.Message" } } } } } }, "definitions": { "coreapi.Account": { "type": "object", "properties": { "document_signing_public_key": { "type": "array", "items": { "type": "integer" } }, "identity": { "type": "string" }, "p2p_public_signing_key": { "type": "array", "items": { "type": "integer" } }, "pod_operator_account_id": { "type": "array", "items": { "type": "integer" } }, "precommit_enabled": { "type": "boolean" }, "webhook_url": { "type": "string" } } }, "coreapi.Accounts": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/coreapi.Account" } } } }, "coreapi.AttributeMapRequest": { "type": "object", "additionalProperties": { "$ref": "#/definitions/coreapi.AttributeRequest" } }, "coreapi.AttributeMapResponse": { "type": "object", "additionalProperties": { "$ref": "#/definitions/coreapi.AttributeResponse" } }, "coreapi.AttributeRequest": { "type": "object", "properties": { "monetary_value": { "$ref": "#/definitions/coreapi.MonetaryValue" }, "type": { "type": "string", "enum": [ "integer", "decimal", "string", "bytes", "timestamp", "monetary" ] }, "value": { "type": "string" } } }, "coreapi.AttributeResponse": { "type": "object", "properties": { "key": { "type": "string" }, "monetary_value": { "$ref": "#/definitions/coreapi.MonetaryValue" }, "signed_value": { "$ref": "#/definitions/coreapi.SignedValue" }, "type": { "type": "string", "enum": [ "integer", "decimal", "string", "bytes", "timestamp", "monetary" ] }, "value": { "type": "string" } } }, "coreapi.CreateNFTCollectionV3Request": { "type": "object", "properties": { "collection_id": { "type": "integer" } } }, "coreapi.CreateNFTCollectionV3Response": { "type": "object", "properties": { "collection_id": { "type": "integer" }, "header": { "$ref": "#/definitions/coreapi.NFTResponseHeader" } } }, "coreapi.DocumentResponse": { "type": "object", "properties": { "attributes": { "$ref": "#/definitions/coreapi.AttributeMapResponse" }, "data": { "type": "object" }, "header": { "$ref": "#/definitions/coreapi.ResponseHeader" }, "scheme": { "type": "string", "enum": [ "generic", "entity" ] } } }, "coreapi.GenerateAccountPayload": { "type": "object", "properties": { "account": { "$ref": "#/definitions/coreapi.Account" } } }, "coreapi.GetNFTOwnerV3Response": { "type": "object", "properties": { "collection_id": { "type": "integer" }, "item_id": { "type": "string" }, "owner": { "type": "string" } } }, "coreapi.ItemAttributeOfNFTV3Response": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "integer" } } } }, "coreapi.ItemMetadataOfNFTV3Response": { "type": "object", "properties": { "data": { "type": "string" }, "deposit": { "type": "string" }, "is_frozen": { "type": "boolean" } } }, "coreapi.MintNFTV3Request": { "type": "object", "properties": { "document_id": { "type": "string" }, "grant_read_access": { "type": "boolean" }, "ipfs_metadata": { "$ref": "#/definitions/v3.IPFSMetadata" }, "owner": { "type": "string" } } }, "coreapi.MintNFTV3Response": { "type": "object", "properties": { "collection_id": { "type": "integer" }, "document_id": { "type": "string" }, "header": { "$ref": "#/definitions/coreapi.NFTResponseHeader" }, "ipfs_metadata": { "$ref": "#/definitions/v3.IPFSMetadata" }, "item_id": { "type": "string" }, "owner": { "type": "string" } } }, "coreapi.MonetaryValue": { "type": "object", "properties": { "chain_id": { "type": "string" }, "id": { "type": "string" }, "value": { "type": "string" } } }, "coreapi.NFT": { "type": "object", "properties": { "collection_id": { "type": "integer" }, "item_id": { "type": "string" } } }, "coreapi.NFTResponseHeader": { "type": "object", "properties": { "job_id": { "type": "string" } } }, "coreapi.ProofResponseHeader": { "type": "object", "properties": { "document_id": { "type": "string" }, "state": { "type": "string" }, "version_id": { "type": "string" } } }, "coreapi.ProofsRequest": { "type": "object", "properties": { "fields": { "type": "array", "items": { "type": "string" } } } }, "coreapi.ProofsResponse": { "type": "object", "properties": { "field_proofs": { "type": "array", "items": { "$ref": "#/definitions/documents.Proof" } }, "header": { "$ref": "#/definitions/coreapi.ProofResponseHeader" } } }, "coreapi.ResponseHeader": { "type": "object", "properties": { "author": { "type": "string" }, "created_at": { "type": "string" }, "document_id": { "type": "string" }, "fingerprint": { "type": "string" }, "job_id": { "type": "string" }, "next_version_id": { "type": "string" }, "nfts": { "type": "array", "items": { "$ref": "#/definitions/coreapi.NFT" } }, "previous_version_id": { "type": "string" }, "read_access": { "type": "array", "items": { "type": "string" } }, "status": { "type": "string" }, "version_id": { "type": "string" }, "write_access": { "type": "array", "items": { "type": "string" } } } }, "coreapi.SignRequest": { "type": "object", "properties": { "payload": { "type": "string" } } }, "coreapi.SignResponse": { "type": "object", "properties": { "payload": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" }, "signer_id": { "type": "string" } } }, "coreapi.SignedValue": { "type": "object", "properties": { "identity": { "type": "string" }, "value": { "type": "string" } } }, "documents.Proof": { "type": "object", "properties": { "hash": { "type": "string" }, "property": { "type": "string" }, "salt": { "type": "string" }, "sorted_hashes": { "type": "array", "items": { "type": "string" } }, "value": { "type": "string" } } }, "gocelery.Task": { "type": "object", "properties": { "args": { "description": "arguments passed to this task", "type": "array", "items": { "type": "object" } }, "delay": { "description": "delay until ready to be run", "type": "string" }, "error": { "description": "error after task run", "type": "string" }, "result": { "description": "result after the task run", "type": "object" }, "runnerFuncs": { "description": "name of the runnerFuncs", "type": "string" }, "tries": { "description": "number of times task was run.", "type": "integer" } } }, "health.Pong": { "type": "object", "properties": { "network": { "type": "string" }, "version": { "type": "string" } } }, "httputils.HTTPError": { "type": "object", "properties": { "message": { "type": "string" } } }, "notification.DocumentMessage": { "type": "object", "properties": { "from": { "description": "document received from", "type": "string" }, "id": { "description": "document identifier", "type": "string" }, "to": { "description": "document sent to", "type": "string" }, "version_id": { "description": "version identifier", "type": "string" } } }, "notification.JobMessage": { "type": "object", "properties": { "desc": { "description": "description of the job", "type": "string" }, "finished_at": { "description": "job finished at", "type": "string" }, "id": { "description": "job identifier", "type": "string" }, "owner": { "description": "job owner", "type": "string" }, "valid_until": { "description": "validity of the job", "type": "string" } } }, "notification.Message": { "type": "object", "properties": { "document": { "description": "Document contains recently received document. Ensure event type is document", "$ref": "#/definitions/notification.DocumentMessage" }, "event_type": { "type": "string", "enum": [ "job", "document" ] }, "job": { "description": "Job contains jobs specific details. Ensure event type is job", "$ref": "#/definitions/notification.JobMessage" }, "recorded_at": { "type": "string" } } }, "pending.AddTransitionRules": { "type": "object", "properties": { "attribute_rules": { "type": "array", "items": { "$ref": "#/definitions/pending.AttributeRule" } }, "compute_fields_rules": { "type": "array", "items": { "$ref": "#/definitions/pending.ComputeFieldsRule" } } } }, "pending.AttributeRule": { "type": "object", "properties": { "key_label": { "description": "attribute key label", "type": "string" }, "role_id": { "description": "roleID is 32 byte role ID in hex. RoleID should already be part of the document.", "type": "string" } } }, "pending.ComputeFieldsRule": { "type": "object", "properties": { "attribute_labels": { "description": "AttributeLabels that are passed to the WASM for execution", "type": "array", "items": { "type": "string" } }, "target_attribute_label": { "description": "TargetAttributeLabel is the label of the attribute which holds the result from the executed WASM.\nThis attribute is automatically added and updated everytime document is updated.", "type": "string" }, "wasm": { "type": "string" } } }, "v2.AddRole": { "type": "object", "properties": { "collaborators": { "type": "array", "items": { "type": "string" } }, "key": { "description": "Key is either hex encoded 32 byte ID or string label.\nString label is used as a preimage to sha256 for 32 byte hash.", "type": "string" } } }, "v2.CloneDocumentRequest": { "type": "object", "properties": { "scheme": { "type": "string", "enum": [ "generic", "entity" ] } } }, "v2.CreateDocumentRequest": { "type": "object", "properties": { "attributes": { "$ref": "#/definitions/coreapi.AttributeMapRequest" }, "data": { "type": "object" }, "document_id": { "description": "if provided, creates the next version of the document.", "type": "string" }, "read_access": { "type": "array", "items": { "type": "string" } }, "scheme": { "type": "string", "enum": [ "generic", "entity" ] }, "write_access": { "type": "array", "items": { "type": "string" } } } }, "v2.Job": { "type": "object", "properties": { "JobID": { "description": "Job Identifier", "type": "string" }, "desc": { "description": "description of the Job", "type": "string" }, "finished": { "description": "job status", "type": "boolean" }, "finished_at": { "description": "Job finished at. If empty, job is not complete yet", "type": "string" }, "overrides": { "description": "overrides for the Job", "type": "object", "additionalProperties": true }, "runner": { "description": "name of the Runner", "type": "string" }, "tasks": { "description": "list of tasks ran under this Job", "type": "array", "items": { "$ref": "#/definitions/gocelery.Task" } }, "valid_until": { "description": "validity of the job", "type": "string" } } }, "v2.RemoveCollaboratorsRequest": { "type": "object", "properties": { "collaborators": { "type": "array", "items": { "type": "string" } } } }, "v2.Role": { "type": "object", "properties": { "collaborators": { "type": "array", "items": { "type": "string" } }, "id": { "type": "string" } } }, "v2.SignedAttributeRequest": { "type": "object", "properties": { "label": { "type": "string" }, "payload": { "type": "string" }, "type": { "type": "string", "enum": [ "integer", "string", "bytes", "timestamp" ] } } }, "v2.TransitionRule": { "type": "object", "properties": { "action": { "type": "string" }, "attribute_labels": { "type": "array", "items": { "type": "string" } }, "field": { "type": "string" }, "roles": { "type": "array", "items": { "type": "string" } }, "rule_id": { "type": "string" }, "target_attribute_label": { "type": "array", "items": { "type": "integer" } }, "wasm": { "type": "string" } } }, "v2.TransitionRules": { "type": "object", "properties": { "rules": { "type": "array", "items": { "$ref": "#/definitions/v2.TransitionRule" } } } }, "v2.UpdateDocumentRequest": { "type": "object", "properties": { "attributes": { "$ref": "#/definitions/coreapi.AttributeMapRequest" }, "data": { "type": "object" }, "read_access": { "type": "array", "items": { "type": "string" } }, "scheme": { "type": "string", "enum": [ "generic", "entity" ] }, "write_access": { "type": "array", "items": { "type": "string" } } } }, "v2.UpdateRole": { "type": "object", "properties": { "collaborators": { "type": "array", "items": { "type": "string" } } } }, "v3.IPFSMetadata": { "type": "object", "properties": { "description": { "type": "string" }, "document_attribute_keys": { "type": "array", "items": { "type": "string" } }, "image": { "type": "string" }, "name": { "type": "string" } } } } }