Get file metadata
const url = 'http://127.0.0.1:8000/v1/files/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://127.0.0.1:8000/v1/files/exampleRetrieve metadata for one stored file without returning its content.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Immutable file identifier.
Immutable file identifier.
Responses
Section titled “Responses”Successful Response
Metadata for a file stored by ParseHawk.
object
Immutable file identifier.
Original upload filename.
Detected or supplied media type.
Stored file size in bytes.
Lowercase SHA-256 digest of the stored bytes.
How the file entered ParseHawk.
Whether the file ships as a built-in example.
UTC creation time.
Example
{ "id": "file_01JZ6QK8M7", "file_name": "invoice.pdf", "content_type": "application/pdf", "source": "user"}The requested ParseHawk resource does not exist.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}Unexpected server error.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}Persistence is temporarily busy and the request can be retried.
Error returned by request validation or a ParseHawk domain service.
object
object
Examplegenerated
{ "code": "example", "detail": [ {} ]}