Validate files#
Description#
Validates files associated with the provided table ID. Validation repairs any files in an inconsistent state, and deletes those without enough state to recover. All files deleted or repaired are returned.
POST /api/v1/admin/validation/files
Required OAuth Scopes
No OAuth scopes are required to use this endpoint.
Parameters#
Parameter |
In |
Type |
Required |
Description |
|---|---|---|---|---|
body |
body |
true |
The representation of the file to validate |
Body parameter example#
{
"tableId": "string"
}
Code Samples#
curl -X POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
http POST https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files \
Content-Type:application/json \
Accept:application/json \
Authorization:"Bearer {access-token}"
wget --method=POST "https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files" \
--output-document - \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.post('https://h.app.wdesk.com/s/wdata/prep/api/v1/admin/validation/files', headers = headers)
print(r.json())
Returns#
201 - Created#
Returns a JSON object with a body property, which contains a ValidateFilesDto object.
Example Responses#
{
"body": {
"deletedFiles": [
{
"columnMappings": {},
"created": "string",
"delimiter": "string",
"id": "string",
"key": "string",
"metadata": {},
"name": "string",
"numErrors": "integer",
"numRecords": "integer",
"originalFileSize": "integer",
"source": "string",
"status": "string",
"tableId": "string",
"tags": {},
"updated": "string",
"userId": "string",
"version": "integer"
}
],
"repairedFiles": [
{
"columnMappings": {},
"created": "string",
"delimiter": "string",
"id": "string",
"key": "string",
"metadata": {},
"name": "string",
"numErrors": "integer",
"numRecords": "integer",
"originalFileSize": "integer",
"source": "string",
"status": "string",
"tableId": "string",
"tags": {},
"updated": "string",
"userId": "string",
"version": "integer"
}
]
},
"code": "integer"
}