AvroSchema Service ============= Service which manages storing and retrieving Avro schemas by their hashed identity .. contents:: Topics Request Objects ~~~~~~~~~~~~~~~ .. http:jsonentity:: Schema An abstract data type. A schema may be one of: A record, mapping field names to field value data; A num, containing one of a small set of symbols; An array of values, all of the same schema; A map, containing string/value pairs, of a declared schema; A union of other schemas; A fixed sized binary object; A unicode string; A sequence of bytes; A 32-bit signed int; A 64-bit signed long; A 32-bit IEEE single-float; or A 64-bit IEEE double-float; or A boolean; or null. :jsonparam String type: *(required)* The type of a schema. Can be one of: "record", "enum", "array", "map", "union", "fixed", "string", "bytes", "int", "long", "float", "double", "boolean", "null". :jsonparam String namespace: *(optional)* The namespace in which the object lives. It is used to differentiate one schema type from another should they share the same name. :jsonparam String name: *(optional)* This is the schema name which, when combined with the namespace, uniquely identifies the schema within the store :jsonparam List[Object] fiels: *(optional) The actual schema definition. It defines what fields are contained in the value and their corresponding data types. An example Schema looks like: { "type": "record", "namespace": "com.example", "name": "FullName", "fields": [ { "name": "first", "type": "string" }, { "name": "last", "type": "string" } ] } Endpoints --------- Store ~~~~~~~~~~~~~~~~~~~ .. http:get:: avroSchema/store.json Stores the schema in the database. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam String identifier: *(required)* The ID of the Schema :jsonparam Object schema: *(required)* The Schema to store. See :http:jsonentity:`AccountFields` for format of this object. .. http:response:: success :jsonparam String result: *(required)* ``success`` .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Is Stored ~~~~~~~~~~~~~~~~~~~ .. http:get:: avroSchema/isStored.json Checks if a schema with the given ID exists in the database. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam String identifier: *(required)* The ID of the schema .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam Boolean value: *(required)* True if the schema exists. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure. Fetch Schema ~~~~~~~~~~~~~~~~~~~ .. http:get:: avroSchema/schema.json Fetch a schema from the database. The following authentication methods are allowed for this endpoint: * :ref:`b2b_auth` :jsonparam String identifier: *(required)* The ID of the schema .. http:response:: success :jsonparam String result: *(required)* ``success`` :jsonparam Object value: *(required)* The fetched Schema. See :http:jsonentity:`Schema` for format of this object. .. http:response:: failure :jsonparam String result: *(required)* ``failure`` :jsonparam String errorCode: *(required)* The error code of the failure. :jsonparam String errorMessage: *(required)* The (human readable) error message of the failure.