Creating a Source Data Schema
Function
This API is used to create a schema for JSON source data.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/schema
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. For how to obtain it, see Obtaining a Project ID. Constraints N/A Range The value can contain 1 to 64 characters. Only letters and digits are allowed. Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain it by calling the IAM API for obtaining a user token. The user token is the value of X-Subject-Token in the response header. For details, see Token-based Authentication. Constraints N/A Range The value can contain 1 to 32,768 characters. Default Value N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
source_data_sample |
Yes |
String |
Definition Source data sample, which is used to generate a schema from JSON source data. You can import a source data sample or create source data. Constraints The source data must be in JSON format. Range N/A Default Value N/A |
Response Parameters
Status code: 200
Normal response
None
Example Requests
Create a source data schema.
POST https://{Endpoint}/v1/{project_id}/schema
{
"source_data_sample" : ""
}
Example Responses
Status code: 200
Normal response
{
"schema" : ""
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Normal response |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot