Get a Project
GET/projects/ {projectId}/
v2
GET
project-get-project
Request
- projectIdstring (uuid)required
ID of the Project to be retrieved.
Responses
application/json
OK
- Schema documentation
- Example
- JSON Schema
- backupStorageUsageInBytesinteger (int64)required
- backupStorageUsageInBytesSetAtstring (date-time)required
- clusterDomainstring (hostname)
- clusterIDstring
deprecated by property clusterId
- clusterIdstring
- createdAtstring (date-time)required
- customerIdstringrequired
- descriptionstringrequired
- directoriesobjectrequired
- *string
- disableReasonstring (one of: maliciousCode, illegalContent, maliciousConduct, suspended)
- disabledAtstring (date-time)
- enabledbooleanrequired
- idstring (uuid)required
- imageRefIdstring (uuid)
- isReadybooleanrequired
deprecated by property status
- projectHostingIdstring (uuid)
- readinessstring (one of: creating, ready, unready)required
deprecated by property status
- serverIdstring (uuid)
- serverShortIdstring
- shortIdstringrequired
- specone of 2 alternatives
- statisticsBaseDomainstring (hostname)
- statusstring (one of: pending, ready, preparingForVolumeMigration, migratingVolume, error, disabled)required
- statusSetAtstring (date-time)required
- webStorageUsageInBytesinteger (int64)required
- webStorageUsageInBytesSetAtstring (date-time)required
{
"backupStorageUsageInBytes": 123,
"backupStorageUsageInBytesSetAt": "2024-11-23T00:28:38.078Z",
"clusterDomain": "project.host",
"clusterID": "espelkamp",
"clusterId": "espelkamp",
"createdAt": "2024-11-23T00:28:38.078Z",
"customerId": "f282f1a8-2b15-4b08-9850-6788e3b20136",
"description": "My first Project!",
"directories": {
"Home": "/home/p-4e7tz3"
},
"disableReason": "maliciousCode",
"disabledAt": "2024-11-23T00:28:38.078Z",
"enabled": true,
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"imageRefId": "f0f86186-0a5a-45b2-aa33-502777496347",
"isReady": true,
"projectHostingId": "f0f86186-0a5a-45b2-aa33-502777496347",
"readiness": "creating",
"serverId": "f0f86186-0a5a-45b2-aa33-502777496347",
"serverShortId": "string",
"shortId": "s-4e7tz3",
"spec": {
"storage": "string",
"visitors": 123
},
"statisticsBaseDomain": "pe-prod.staging.mcloud.services",
"status": "pending",
"statusSetAt": "2024-11-23T00:28:38.078Z",
"webStorageUsageInBytes": 123,
"webStorageUsageInBytesSetAt": "2024-11-23T00:28:38.078Z"
}
{
"properties": {
"backupStorageUsageInBytes": {
"format": "int64",
"type": "integer"
},
"backupStorageUsageInBytesSetAt": {
"format": "date-time",
"type": "string"
},
"clusterDomain": {
"example": "project.host",
"format": "hostname",
"type": "string"
},
"clusterID": {
"deprecated": true,
"description": "deprecated by property clusterId",
"example": "espelkamp",
"type": "string"
},
"clusterId": {
"example": "espelkamp",
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"customerId": {
"example": "f282f1a8-2b15-4b08-9850-6788e3b20136",
"type": "string"
},
"description": {
"example": "My first Project!",
"type": "string"
},
"directories": {
"additionalProperties": {
"type": "string"
},
"example": {
"Home": "/home/p-4e7tz3"
},
"type": "object"
},
"disableReason": {
"enum": [
"maliciousCode",
"illegalContent",
"maliciousConduct",
"suspended"
],
"type": "string"
},
"disabledAt": {
"format": "date-time",
"type": "string"
},
"enabled": {
"type": "boolean"
},
"id": {
"format": "uuid",
"type": "string"
},
"imageRefId": {
"format": "uuid",
"type": "string"
},
"isReady": {
"deprecated": true,
"description": "deprecated by property status",
"type": "boolean"
},
"projectHostingId": {
"format": "uuid",
"type": "string"
},
"readiness": {
"deprecated": true,
"description": "deprecated by property status",
"enum": [
"creating",
"ready",
"unready"
],
"type": "string"
},
"serverId": {
"format": "uuid",
"type": "string"
},
"serverShortId": {
"type": "string"
},
"shortId": {
"example": "s-4e7tz3",
"type": "string"
},
"spec": {
"oneOf": [
{
"properties": {
"storage": {
"type": "string"
},
"visitors": {
"type": "number"
}
},
"required": [
"visitors",
"storage"
],
"type": "object"
},
{
"properties": {
"cpu": {
"example": "2",
"type": "string"
},
"mem": {
"deprecated": true,
"description": "deprecated by memory",
"example": "4Gi",
"type": "string"
},
"memory": {
"example": "4Gi",
"type": "string"
},
"storage": {
"example": "50Gi",
"type": "string"
}
},
"required": [
"storage"
],
"type": "object"
}
]
},
"statisticsBaseDomain": {
"example": "pe-prod.staging.mcloud.services",
"format": "hostname",
"type": "string"
},
"status": {
"enum": [
"pending",
"ready",
"preparingForVolumeMigration",
"migratingVolume",
"error",
"disabled"
],
"type": "string"
},
"statusSetAt": {
"format": "date-time",
"type": "string"
},
"webStorageUsageInBytes": {
"format": "int64",
"type": "integer"
},
"webStorageUsageInBytesSetAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"shortId",
"description",
"enabled",
"customerId",
"directories",
"createdAt",
"isReady",
"readiness",
"status",
"statusSetAt",
"webStorageUsageInBytes",
"webStorageUsageInBytesSetAt",
"backupStorageUsageInBytes",
"backupStorageUsageInBytesSetAt"
],
"type": "object"
}
Usage examples
- cURL
- JavaScript SDK
- PHP SDK
$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/f0f86186-0a5a-45b2-aa33-502777496347
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.project.getProject({
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347"
});
assertStatus(response, 200);
use \Mittwald\ApiClient\Generated\V2\Clients\Project\GetProject\GetProjectRequest;
$client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));
$request = (new GetProjectRequest(
projectId: "f0f86186-0a5a-45b2-aa33-502777496347"
));
$response = $client->project()->getProject($request);
var_dump($response->getBody();