Create a JSON Schema

post

/apiManagement/jsonSchemas/{resource-owner}/{classifier}

Request

Path Parameters
Supported Media Types
Request Body - application/json ()
Root Schema : schema
Type: object
Show Source
Nested Schema : definitions
Type: object
Show Source
Nested Schema : entity-name
Type: object
Show Source
Nested Schema : allOff
Type: array
Show Source Show Source
Back to Top

Response

Supported Media Types

201 Response

Created
Body ()
Root Schema : schema
Type: object
Show Source
Nested Schema : definitions
Type: object
Show Source
Nested Schema : entity-name
Type: object
Show Source
Nested Schema : allOff
Type: array
Show Source Show Source

400 Response

Bad Request
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

401 Response

Unauthorized
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

403 Response

Forbidden
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

404 Response

Not Found
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

409 Response

Conflict
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source

500 Response

Internal Server Error
Body ()
Root Schema : Error
Type: object
Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)
Show Source
Back to Top

Examples

The following shows how to create a JSON schema by submitting a POST request on the REST resource using cURL.

cURL Command

curl -H 'Authorization: Bearer <Token>' -X POST https://{FABRIC_HOST}/apiManagement/jsonSchemas/{resource-owner}/{classifier} -D @create_jsonschema.json -H "Content-Type: application/json" | json_pp

Request Body

The following shows the contents of the request body in JSON format.

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "SIFAOracleCustomer.schema.json",
    "title": "CustomerManagement",
    "definitions": {
        "SIFAOracleCustomer": {
            "$id": "#SIFAOracleCustomer",
            "type": "object",
            "description": "This is a SIFAOracleCustomer after market extension Schema meant to extend the FAOracleCustomer",
            "allOf": [
                {
                    "$ref": "../../oracle/buying/FAOracleCustomer.schema.json#FAOracleCustomer"
                }
            ],
            "properties": {
                "AnniversaryDate": {
                    "type":"string",
                    "format": "date",
                    "description": "Anniversary Date"
                }
            }
        }
    }
}

Response Body

The following shows the contents of the response body in JSON format.

{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "SIFAOracleCustomer.schema.json",
    "title": "CustomerManagement",
    "definitions": {
        "SIFAOracleCustomer": {
            "$id": "#SIFAOracleCustomer",
            "type": "object",
            "description": "This is a SIFAOracleCustomer after market extension Schema meant to extend the FAOracleCustomer",
            "allOf": [
                {
                    "$ref": "../../oracle/buying/FAOracleCustomer.schema.json#FAOracleCustomer"
                }
            ],
            "properties": {
                "AnniversaryDate": {
                    "type": "string",
                    "format": "date",
                    "description": "Anniversary Date"
                }
            }
        }
    },
    "links": [
        {
            "rel": "self",
            "href": "https://1/apiManagement/jsonSchemas/custom/common/SIFAOracleCustomer.schema.json"
        }
    ]
}
Back to Top