Skip to main content

Get a File's meta

GET/v2/files/{fileId}/meta
API version
v2
Request method
GET
Operation ID
file-get-file-meta

Request​

  • fileIdstringrequired

    ID of the File to get the meta for.

Responses​

Format
application/json
Description

OK

  • friendlyURLstringdeprecatedrequired

    deprecated, see friendlyUrl

  • friendlyUrlstringrequired
  • idstring (uuid)required
  • mimeTypestringrequired
  • namestringrequired
  • shortIdstringrequired
  • sizeInBytesinteger (int64)required
  • typestringdeprecatedrequired

    deprecated, see mimeType

Content-Type: application/json

{
"friendlyUrl": "3fa85f64-5717-4562-b3fc-2c963f66afa6/me.jpeg",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"mimeType": "image/jpeg",
"name": "me.jpeg",
"shortId": "file-123456",
"sizeInBytes": 300
}
{
"properties": {
"friendlyURL": {
"deprecated": true,
"description": "deprecated, see friendlyUrl",
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6/me.jpeg",
"type": "string"
},
"friendlyUrl": {
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6/me.jpeg",
"type": "string"
},
"id": {
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"format": "uuid",
"type": "string"
},
"mimeType": {
"example": "image/jpeg",
"type": "string"
},
"name": {
"example": "me.jpeg",
"type": "string"
},
"shortId": {
"example": "file-123456",
"type": "string"
},
"sizeInBytes": {
"example": 300,
"format": "int64",
"type": "integer"
},
"type": {
"deprecated": true,
"description": "deprecated, see mimeType",
"example": "image/jpeg",
"type": "string"
}
},
"required": [
"id",
"name",
"type",
"friendlyURL",
"friendlyUrl",
"sizeInBytes",
"mimeType",
"shortId"
],
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/files/string/meta?token=jwt
import { MittwaldAPIV2Client } from "@mittwald/api-client";
import { assertStatus } from "@mittwald/api-client-commons";

const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
const response = await client.file.getFileMeta({
"fileId": "string",
"queryParameters": {
"token": "jwt"
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\File\GetFileMeta\GetFileMetaRequest;

$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

$request = (new GetFileMetaRequest(
fileId: "string"
))
->withToken("jwt");
$response = $client->file()->getFileMeta($request);

var_dump($response->getBody();

On this page