Create dataset
- Print
- PDF
Create dataset
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Available in Classic and VPC
Create a new dataset to train the service.
Note
To create a dataset, you must have a schema created. Create a schema first through the Create schema API.
Request
The following describes the request format for the endpoint. The request format is as follows:
Method | URI |
---|---|
POST | /datasets |
Request headers
For headers common to all AiTEMS APIs, see Common AiTEMS headers.
Request body
The following describes the request body.
Field | Type | Required | Description |
---|---|---|---|
type | String | Required | Dataset type
|
name | String | Required | Dataset name
|
description | String | Required | Dataset description
|
schemaName | String | Required | Dataset's schema name |
osInfo | Object | Required | Information of Object Storage where the data file is stored |
osInfo.region | String | Required | Region of Object Storage where the data file is stored
|
osInfo.bucket | String | Required | Bucket name of Object Storage where the data file is stored |
osInfo.key | String | Required | Path (prefix) of Object Storage where the data file is stored |
Request example
The following is a sample request.
curl --location --request POST 'https://aitems.apigw.ntruss.com/api/v1/datasets' \
--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 '{
"type": "item",
"name": "item_dataset2",
"description": "abc",
"schemaName": "item_schema",
"osInfo": {
"region": "KR",
"bucket": "aitems",
"key": "bookmarks-items.csv"
}
}'
Response
The following describes the response format.
Response body
The following describes the response body.
Field | Type | Required | Description |
---|---|---|---|
datasetId | String | - | Dataset ID |
type | String | - | Dataset type
|
name | String | - | Dataset name |
description | String | - | Dataset description |
schemaName | String | - | Dataset schema name |
status | String | - | Dataset status
|
osInfo | Object | - | Information of Object Storage where the data file is stored |
osInfo.region | String | - | Region of Object Storage where the data file is stored
|
osInfo.bucket | String | - | Bucket name of Object Storage where the data file is stored |
osInfo.key | String | - | Path (prefix) of Object Storage where the data file is stored |
connectedServices | Array | - | Information about service using dataset |
createdDate | String | - | Dataset creation date and time |
updatedDate | String | - | Last update date and time of the dataset |
connectedServices
The following describes connectedServices
.
Field | Type | Required | Description |
---|---|---|---|
serviceId | String | - | Service ID |
name | String | - | Service name |
Response status codes
For response status codes common to all AiTEMS APIs, see Common AiTEMS API response status codes.
Response example
The following is a sample example.
{
"datasetId": "g8rf6******",
"type": "item",
"name": "item_dataset",
"description": "abc",
"schemaName": "LogInfo",
"status": "waiting",
"osInfo": {
"region": "KR",
"bucket": "bucket",
"key": "bookmarks-items.csv"
},
"connectedServices": [],
"createdDate": "2024-07-29T16:46:35.968",
"updatedDate": "2024-07-29T16:46:35.968"
}
Was this article helpful?