Skip to main content

Endpoints List RESTful API

The Defactor Postman Collection comprises a suite of pre-configured API requests designed for seamless integration into the Postman application, facilitating access to the services offered by the Defactor API.

This API offers dual modes of interaction with the IPFS node: firstly, via the RESTful API; and secondly, through the GraphQL API.


Security Details

To secure the API access control, all requests are made through Hasura which provides secure GraphQL, and RESTful endpoints restricted by a role-based authorization system.

Those endpoints that return public data do not require authentication for use. Query type requests are opened under the guest role, while mutation type needs a token with admin role.

For those that can modify data the API expects a valid authorization header containing a bearer token. These tokens are implemented as JSON Web Tokens (JWTs) issued by the server.

The security of the JWT is because it is signed by a secret key and has a configurable expiration time, which by default is 60 minutes.

Upon receiving a request, Hasura decodes and validates the JWT, which contains user account data, and their corresponding role. If the role lacks the necessary permissions or the token is invalid, expired or missing, the request is promptly rejected.

IPFS

Interact with a private IPFS node to upload and retrieve files. Interact with a private IPFS node to upload and retrieve files. Since GraphQL operates with JSON payloads and responses, binary data needs to be represented as a string. This API supports both byte arrays (bytea) and base64-encoded strings.

Upload File

Upload a file to the private IPFS node. The endpoint expects a string with a byte array, for example: [130, 20, 8] or a base64 encoded string. In other words, the binary data in the file must be encoded in any of these string formats.

The response CID hash and file type must then be stored so that the file can be retrieved and reconstructed correctly.

HTTP Request Method: POST

Roles: Admin

Request URL: {{BASE_RESTFUL_URL}}/v1/ipfs/upload-file

Request Body

{
"file": "PHN2ZyB3aWR0aD0iMjI4IiBoZWlnaHQ9IjQ0IiB2aWV3Qm94PSIwIDAgMjI4IDQ0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMzkuOTM4NCAwLjAzMzIzMTZMMjIuODgzIDEuNDg4MkMyMC45NjE3IDEuNjUyMTIgMTkuOTMzNyAzLjg4OTgzIDIxLjAzMjUgNS41MTYwOEwzMC43ODczIDE5Ljk1MTZDMzEuODg2MSAyMS41Nzc5IDM0LjI4ODIgMjEuMzczNCAzNS4xMDk5IDE5LjU4MzNMND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kgMzIuNDUwNyAyMDMuMzYxIDMxLjg5MjYgMjA0LjQzNSAzMC43NzU2QzIwNS41MDggMjkuNjU4NiAyMDYuMDQ1IDI3Ljk5OTIgMjA2LjA0NSAyNS43OTU2QzIwNi4wNDUgMjMuNTkxOSAyMDUuNTA4IDIxLjkzMTYgMjA0LjQzNSAyMC44MTU1QzIwMy4zNjEgMTkuNjk4NSAyMDIuMTE0IDE5LjE0MDUgMjAwLjY5MyAxOS4xNDA1QzE5OS4yMTQgMTkuMTQwNSAxOTcuOTQzIDE5LjY5ODUgMTk2Ljg4NSAyMC44MTU1QzE5NS44MjYgMjEuOTMyNSAxOTUuMjk3IDIzLjU5MTkgMTk1LjI5NyAyNS43OTU2QzE5NS4yOTcgMjcuOTk5MiAxOTUuODI2IDI5LjY1OTUgMTk2Ljg4NSAzMC43NzU2QzE5Ny45NDQgMzEuODkyNiAxOTkuMTk4IDMyLjQ1MDcgMjAwLjY1IDMyLjQ1MDdaIiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNMjE0LjU1NiAzNy40MDg0VjE1LjI1MzJIMjE5LjUxNkwyMjAuMDM4IDE5LjQwNzNDMjIwLjgyMSAxNy45NzgxIDIyMS44ODcgMTYuODM5IDIyMy4yMzYgMTUuOTkwOEMyMjQuNTg1IDE1LjE0MTggMjI2LjE3MyAxNC43MTczIDIyOCAxNC43MTczVjIwLjc0NzFIMjI2LjQzNEMyMjUuMjE2IDIwLjc0NzEgMjI0LjEyOCAyMC45NDE0IDIyMy4xNzEgMjEuMzI3M0MyMjIuMjE0IDIxLjcxNSAyMjEuNDY2IDIyLjM4NDQgMjIwLjkzIDIzLjMzNzVDMjIwLjM5MyAyNC4yOTE1IDIyMC4xMjUgMjUuNjE1OCAyMjAuMTI1IDI3LjMxMjlWMzcuNDA3NUwyMTQuNTU2IDM3LjQwODRaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"
}

Response

Upon successful completion of a request, the server will issue a status code of 200 along with a JSON object encapsulating the hash. This object encompasses the following attributes:

{
"v1UploadFile": {
"res": {
"hash": "QmPktZrLGnHZSAU3WVNYFZ4V7JUqi16yhK3eiCht4nECsp"
},
"success": true
}
}
info

In the previous example an xml file with an svg was uploaded, so in a database it's necessary to store the hash of the response and that the file is an xml.

Get File

Retrieve a file from the private IPFS node using the CID hash. The response must be processed to retrieve the data from the file. In the res property is the data that must be used to rebuild the file.

The encoding parameter determines how the data response is encoded, it could be a base64 string or a byte array, for example: [130, 20, 8]. It's important to know the type of file to build it correctly.

PropertyDescription
hashThe content identifier CID in version 0 or 1
encodingOne of the following values: bytea, base64. Default: bytea

HTTP Request Method: POST

Roles: Admin

Request URL: {{BASE_RESTFUL_URL}}/v1/ipfs/get-file

Request Body

{
"hash": "QmPktZrLGnHZSAU3WVNYFZ4V7JUqi16yhK3eiCht4nECsp",
"encoding": "base64"
}

Response

Upon successful completion of a request, the server will issue a status code of 200 along with a JSON object encapsulating the file. This object encompasses the following attributes:

{
"v1GetFile": {
"res": "PHN2ZyB3aWR0aD0iMjI4IiBoZWlnaHQ9IjQ0IiB2aWV3Qm94PSIwIDAgMjI4IDQ0IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJNMzkuOTM4NCAwLjAzMzIzMTZMMjIuODgzIDEuNDg4MkMyMC45NjE3IDEuNjUyMTIgMTkuOTMzNyAzLjg4OTgzIDIxLjAzMjUgNS41MTYwOEwzMC43ODczIDE5Ljk1MTZDMzEuODg2MSAyMS41Nzc5IDM0LjI4ODIgMjEuMzczNCAzNS4xMDk5IDE5LjU4MzNMNDIuNDEwNSAzLjY5Mjc2QzQzLjIzMyAxLjkwMTY3IDQxLjg1OTcgLTAuMTMwNjgzIDM5LjkzODQgMC4wMzMyMzE2WiIgZmlsbD0iI0QyMUE0RCIvPgo8cGF0aCBkPSJNMC4wMjgzNTE3IDIuNzg3NjRMMS40NDU2IDIwLjI5N0MxLjYwNTI2IDIyLjI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y4zNjEgMTkuNjk4NSAyMDIuMTE0IDE5LjE0MDUgMjAwLjY5MyAxOS4xNDA1QzE5OS4yMTQgMTkuMTQwNSAxOTcuOTQzIDE5LjY5ODUgMTk2Ljg4NSAyMC44MTU1QzE5NS44MjYgMjEuOTMyNSAxOTUuMjk3IDIzLjU5MTkgMTk1LjI5NyAyNS43OTU2QzE5NS4yOTcgMjcuOTk5MiAxOTUuODI2IDI5LjY1OTUgMTk2Ljg4NSAzMC43NzU2QzE5Ny45NDQgMzEuODkyNiAxOTkuMTk4IDMyLjQ1MDcgMjAwLjY1IDMyLjQ1MDdaIiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNMjE0LjU1NiAzNy40MDg0VjE1LjI1MzJIMjE5LjUxNkwyMjAuMDM4IDE5LjQwNzNDMjIwLjgyMSAxNy45NzgxIDIyMS44ODcgMTYuODM5IDIyMy4yMzYgMTUuOTkwOEMyMjQuNTg1IDE1LjE0MTggMjI2LjE3MyAxNC43MTczIDIyOCAxNC43MTczVjIwLjc0NzFIMjI2LjQzNEMyMjUuMjE2IDIwLjc0NzEgMjI0LjEyOCAyMC45NDE0IDIyMy4xNzEgMjEuMzI3M0MyMjIuMjE0IDIxLjcxNSAyMjEuNDY2IDIyLjM4NDQgMjIwLjkzIDIzLjMzNzVDMjIwLjM5MyAyNC4yOTE1IDIyMC4xMjUgMjUuNjE1OCAyMjAuMTI1IDI3LjMxMjlWMzcuNDA3NUwyMTQuNTU2IDM3LjQwODRaIiBmaWxsPSJibGFjayIvPgo8L3N2Zz4K"
"success": true
}
}

Error Reference

Error Response Format

The errors have the GraphQL error schema, an object with an errors array property where each item has the following schema:

PropertyDescription
messageThe description of the error
extensionsAn object with the path to the field that caused the error, and the error code

Examples

The variable has a wrong type:

{
"errors": [
{
"message": "expected a string for type 'String', but found a number",
"extensions": {
"path": "$.selectionSet.v1UploadFile.args.file",
"code": "validation-failed"
}
}
]
}

The variable is missing in the request body:

{
"errors": [
{
"message": "missing required field 'hash'",
"extensions": {
"path": "$.selectionSet.v1GetFile.args.hash",
"code": "validation-failed"
}
}
]
}

The field does not exists or the role has no permissions:

{
"errors": [
{
"message": "field 'v1UploadFile' not found in type: 'mutation_root'",
"extensions": {
"path": "$.selectionSet.v1UploadFile",
"code": "validation-failed"
}
}
]
}

The variable is not in the request body schema:

{
"errors": [
{
"message": "Unexpected variable data",
"extensions": {
"path": "$",
"code": "bad-request"
}
}
]
}

The GraphQL variables object is not a valid json:

{
"errors": [
{
"message": "Error in $: Failed reading: satisfy. Expecting object value at X",
"extensions": {
"path": "$",
"code": "invalid-json"
}
}
]
}

The endpoint does not exists:

{
"errors": [
{
"message": "Endpoint not found",
"extensions": {
"path": "$",
"code": "not-found"
}
}
]
}

Error processing the request:

{
"errors": [
{
"message": "The hash is an invalid CID",
"extensions": {
"path": "$",
"code": "unexpected"
}
}
]
}

Types of Error

General

Error MessageReason
Could not verify JWT: JWT errorThe JWT is invalid
Invalid request payload inputThe data format is not as expected.

IPFS

Error MessageReason
An error occurred while interacting with the ipfs endpointAn error occurs on the server
The hash is an invalid CIDThe provided string is not a content identifier.
The IPFS file with the hash "hash" cannot be foundThe file does not exist or the IPFS node failed

Follow us:

Copyright © 2024 Defactor. All Rights Reserved