Description
If the filename is valid, this returns 200. If the table already has a file with the same name, this returns 409. If the user isn't allowed to read the table, or if the table isn't found, this returns 404.
GET
/api/v1/file/validateName
Required OAuth Scopes:
No OAuth scopes are required to use this endpoint.
Parameters
Parameter | In | Type | Required | Description |
---|---|---|---|---|
tableId | query | string | true | The ID of the table to upload the file to |
filename | query | string | true | The name of the file to upload |
Code Samples
curl -X GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/validateName \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}' -G \
--data-urlencoded "tableId=string" \
--data-urlencoded "filename=string"
http GET https://h.app.wdesk.com/s/wdata/prep/api/v1/file/validateName \
Accept:application/json \
Authorization:"Bearer {access-token}" \
tableId==string \
filename==string
wget --method=GET "https://h.app.wdesk.com/s/wdata/prep/api/v1/file/validateName?tableId=string&filename=string" \
--output-document - \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
import requests
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
r = requests.get('https://h.app.wdesk.com/s/wdata/prep/api/v1/file/validateName', params={
'tableId': 'string', 'filename': 'string'
}, headers = headers)
print(r.json())
Returns
200 - OK
Returns a JSON object containing a body
property, which contains a message describing the result of the filename validation.
Example Responses
{
"body": "string",
"code": "integer"
}