https://api-file-crafter.nhncloudservice.com
After sending repetitive requests to the specified URL, the received response is saved as a file and uploaded to the specified storage. The specifications required by the Export callback URL can be found in the Callback API Guide.
POST /file-crafter/v2.0/export/files
Content-Type: appliction/json
{
"x-tc-app-key": "String",
"x-secret-key": "String"
}
{
"callback": {
"url": "http://my.service.com/api/export",
"query": {
"endOffset": 300,
"pageSize": 50
}
},
"exportedFile": {
"extension": "xls",
"maxRowCountPerFile": 1000,
"password": "test",
"fields": {
"key": "headerName"
},
"sheets": [
{
"sheetName": "Sheet 1",
"sheetQuery": "sheetQuery1"
}
]
},
"storages": [
{
"secretKey": "String",
"bucketName": "String",
"endPoint": "https://api-storage.cloud.toast.com",
"region": "KR1",
"filePath": "String",
"fileName": "String",
"fileFullPath": "String",
"used": true
}
],
"searchKey": "localTestType"
}
Value | Type | Constraints | Required | Description |
---|---|---|---|---|
callback | Object | Not Null | O | Callback information for export |
callback.url | String | Not Blank | O | URL to call by File Crafter for export |
callback.query | Object | Query sent along when File Crafter calls the specified URL. | ||
exportedFile | Object | Not Null | O | Information on export result file |
exportedFile.extension | String | Not Null | O | [xls, xlsx, csv, json] |
exportedFile.maxRowCountPerFile | Integer | 1000 ~ 1000000 | Maximum row count per file | |
exportedFile.password | String | Password for result file (xls, xlsx formats supported) | ||
exportedFile.fields | Object | Export target field, Item name | ||
exportedFile.sheets | Array | Query key to distinguish sheets when multiple sheets are exported, Sheet name | ||
storages | Array | Not Empty | Information on storage where result file is uploaded. Up to 5 can be specified. | |
storages.accessKey | String | |||
storages.secretKey | String | |||
storages.bucketName | String | |||
storages.endPoint | String | |||
storages.region | String | |||
storages.filePath | String | |||
storages.fileName | String | |||
searchKey | String | Search key used to retrieve requests in the console |
exportedFile.fields
ex) exportedFile.fields
{
"name": "이름",
"number": "연락처"
}
```
- ex) export callback response
```json
[
{"name": "Jason", "number": "01012341234"},
{"name":"Tim", "number": "01043214321"}
]
Name | Contact |
---|---|
Jason | 01012341234 |
Tim | 01043214321 |
exportedFile.sheets
ex) exportedFile.fields
[
{
"sheetQuery": "October",
"sheetName": "10월"
}
]
http://my.service.com/api/export?sheetQuery=October
Parameterize the uploaded file and make repetitive requests to the specified URL. The specifications required by the import callback URL can be found in the Callback API Guide.
POST /file-crafter/v2.0/import/files
{
"x-tc-app-key": "String",
"x-secret-key": "String"
}
Value | Type | Constraints | Required | Description |
---|---|---|---|---|
importingCallbackUrl | Object | O | URL to call by File Crafter for validation | |
validatingCallbackUrl | String | URL to call by File Crafter for export | ||
isAutoImporting | String | When validation is included | ||
dataStartRowNum | String | At least 2 | Row number where actual data starts | |
searchKey | String | Search key used to retrieve requests in the console | ||
password | String | File password when importing an encrypted excel file |
Response commonly used by Export and Import requests.
{
"header": {
"resultCode": 0,
"resultMessage": "success",
"isSuccessful": true
},
"fileId": "String"
}
Value | Type | Description |
---|---|---|
header | Object | |
header.resultCode | Integer | Request result code |
header.resultMessage | String | Request result message |
header.isSuccessful | Boolean | Request success or not |
fileId | String | Request ID |