Skip to main content

Get a Project directory filesystem usage

GET/v2/projects/{projectId}/filesystem-disk-usage
API version
v2
Request method
GET
Operation ID
project-file-system-get-disk-usage

Request​

  • projectIdstring
    required

    ID of the Project.

Responses​

Format
application/json
Description

OK

  • pathstring
  • totalBytesinteger (int64)
  • usedBytesinteger (int64)
Content-Type: application/json

{
"path": "string",
"totalBytes": 123,
"usedBytes": 123
}
{
"properties": {
"path": {
"type": "string"
},
"totalBytes": {
"format": "int64",
"type": "integer"
},
"usedBytes": {
"format": "int64",
"type": "integer"
}
},
"type": "object"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/filesystem-disk-usage?directory=%2Fhome%2Fexample.log
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.projectFileSystem.projectFileSystemGetDiskUsage({
"projectId": "string",
"queryParameters": {
"directory": "/home/example.log"
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\ProjectFileSystem\ProjectFileSystemGetDiskUsage\ProjectFileSystemGetDiskUsageRequest;

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

$request = (new ProjectFileSystemGetDiskUsageRequest(
projectId: "string"
))
->withDirectory("/home/example.log");
$response = $client->projectFileSystem()->projectFileSystemGetDiskUsage($request);

var_dump($response->getBody();

On this page