Lookup file id
POST /lookup-file-id/{path}
Returns Id of file or directory specified by path.
Example cURL requests
Lookup file id
curl -X POST -H "X-Auth-Token: $TOKEN" \
"https://$HOST/api/v3/oneprovider/lookup-file-id/MySpace/dir/readme.txt"
{
"fileId": "094576776E667431723230677767776C6B497031394E445F6E3868677873"
}
Path parameters
| Parameter | Type & Description |
|---|---|
| path required | string File path (e.g. '/MySpace/dir/readme.txt') |
Request Examples
Shell
oneprovider-rest-cli lookupFileId path='/MySpace/dir/readme.txt'Responses
application/json
200
File Id.
| Property | Type & Description |
|---|---|
fileId required string File Id. | |
Example
application/json
{
"fileId": "094576776E667431723230677767776C6B497031394E445F6E3868677873"
} 400
Invalid request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 403
Forbidden request.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 404
Invalid path - file or directory not found.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
} 500
Internal server error.
| Property | Type & Description |
|---|---|
error string Identifier representing internal error code. | |
error_description string Detailed error message. | |
Example
application/json
{
"error": "invalid_token",
"error_description": "Provided token could not be validated."
}