Check schema validity

Prev Next

Available in Classic and VPC

Validate the availability of the schema information entered.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /schemas/validation-check

Request headers

For information about the headers common to all AiTEMS APIs, see AiTEMS request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
datasetType String Required Dataset type
  • user | item | interaction
    • user: Data containing user information (age, gender, etc.)
    • item: Data with product-related information (price, release date, category, etc.)
    • interaction: Data that captures the history of interactions between users and products
name String Required Schema name
  • Enter 3-20 characters using a combination of English letters, numbers, and special characters "_" and "-".
  • The string must begin with an English letter.
fields Array Required Schema field information: fields
description String Required Schema description
  • 0-100 characters

fields

The following describes fields.

Field Type Required Description
name String Required Schema field name
type Array Required Schema field data type
  • string | int | long | boolean | null
categorical Boolean Required Whether the field is categorical
  • true | false
    • true: Categorical data
    • false: Uncategorical data

Request example

The request example is as follows:

curl --location --request POST 'https://aitems.apigw.ntruss.com/api/v1/schemas/validation-check' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--data '{
    "datasetType": "user",
    "name": "user_schema",
    "fields": [
        {
            "name": "USER_ID",
            "type": [
                "string"
            ],
            "categorical": false
        }
    ],
    "description": "desc"
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
name String - Schema field name
type Array - Schema field data type
  • string | int | long | boolean | null
categorical Boolean - Whether the field is categorical
  • true | false
    • true: Categorical data
    • false: Uncategorical data
  • Not displayed when false

Response status codes

For information about the HTTP status codes common to all AiTEMS APIs, see AiTEMS response status codes.

Response example

The response example is as follows:

[
    {
        "name": "USER_ID",
        "type": [
            "string"
        ]
    }
]