Publishing schema based on schema ID PUBLISHING SCHEMA BASED ON SCHEMA ID
Publishes the schema
PUT
/schemas/{schemaId}/publish
Publishes the schema with the provided (internal) schema ID onto IPFS, sends a message featuring IPFS CID into the corresponding Hedera topic. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
Request Body
Object that contains policy version
200: OK Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Updating Schema UPDATING SCHEMA BASED ON SCHEMA ID
Updates the schema
PUT
/schemas/{schemaId}
Updates the schema matching the id in the request body. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
Request Body
Object that contains a valid schema including the id of the schema that is to be update
200: OK Succesful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Deleting a Schema DELETING SCHEMA BASED ON SCHEMA ID
Deletes the schema
DELETE
/schema/{schemaID}
Deletes the schema with the provided schema ID. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
200: OK Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Schema Preview from IPFS PREVIEWING SCHEMA FROM IPFS FILE
Schema preview from IPFS
POST
/schemas/import/message/preview
Previews the schema from IPFS without loading it into the local DB. Only users with the Standard Registry role are allowed to make the request.
Request Body
Object that contains the identifier of the Hedera message which contains the IPFS CID of the schema
200: OK Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
Schema Preview from Zip PREVIEWING SCHEMA FROM ZIP FILE
Schema preview from a zip file
POST
/schemas/import/file/preview
Previews the schema from a zip file. Only users with the Standard Registry role are allowed to make the request.
Request Body
A zip file containing the schema to be viewed
200: OK Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
Export message IDs of Schema EXPORTING HEDERA MESSAGED IDS OF PUBLISHED SCHEMA
Hedera message IDs of published schemas
POST
/schemas/{schemaId}/export/message
Returns Hedera message IDs of the published schemas, these messages contain IPFS CIDs of these schema files. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
200: OK Successful Operation
Copy {
content:
application/json:
schema:
$ref: "#/components/schemas/ExportSchema"
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
Export Files from Schema EXPORTING SCHEMA FILES FOR THE SCHEMA
Return zip file with schemas
POST
/schemas/{schemaId}/export/file
Returns schema files for the schemas. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
200: OK Successful Operation
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Creation of Schema related to the topic Creates a schema related to the topic (policy)
POST
/schemas/{topicId}
Creates new schema. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
Request Body
Object that contains a valid schema
201: Created Successful Operation
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Returns all Schemas related to the topic Returns schemas related to the topic (policy)
GET
/schemas/{topicId}
Returns all schemas by topicId.
Path Parameters
Query Parameters
The number of pages to skip before starting to collect the result set
The numbers of items to return
200: OK Successful Operation
Copy {
headers:
x-total-count:
schema:
type: integer
description: Total items in the collection.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
Importing Zip file containing Schema Imports schemas from a file for the selected topic (policy)
POST
/schemas/{topicId}/import/file
Imports new schema from a zip file into the local DB. Only users with the Standard Registry role are allowed to make the request.
Path Parameters
Request Body
A zip file containing schema to be imported
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
200: OK Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
422: Unprocessable Entity
Import schema from Zip IMPORTING SCHEMA FROM .ZIP FILE
Imports new schema from a zip file
POST
/schemas/import/file
Imports new schema from a zip file into the local DB. Only users with the Standard Registry role are allowed to make the request.
Request Body
A zip file containing schema to be imported
201: Created Successful Operation
Copy {
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}
422: Unprocessable Entity
Returning Schema by SchemaID Returns schema by schema ID
GET
/schema/{schemaId}
Returns schema by schema ID
Path Parameters
200: OK Successful Operation
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Schema'
}
401: Unauthorized Unauthorized
500: Internal Server Error Internal Server Error
Copy {
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
}