Zum Hauptinhalt springen

Get a Project file's content

GET/v2/projects/{projectId}/filesystem-file-content
API-Version
v2
Request-Methode
GET
Operation-ID
project-file-system-get-file-content

Request​

  • projectIdstringrequired

    ID of the Project.

Responses​

Nutzungsbeispiele​

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

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\ProjectFileSystem\ProjectFileSystemGetFileContent\ProjectFileSystemGetFileContentRequest;

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

$request = (new ProjectFileSystemGetFileContentRequest(
projectId: "string"
))
->withFile("/home/example.log")
->withInline(true);
$response = $client->projectFileSystem()->projectFileSystemGetFileContent($request);

var_dump($response->getBody();

Auf dieser Seite