Skip to main content

List Licenses belonging to a Project

GET/v2/projects/{projectId}/licenses
API version
v2
Request method
GET
Operation ID
license-list-licenses-for-project

Request​

  • projectIdstring (uuid)required

    ID of the Project to get Licenses for.

Responses​

Response headers
  • X-Pagination-Limitinteger

    The limit used to select the resources for the response

  • X-Pagination-Skipinteger

    The number of skipped items

  • X-Pagination-Pagenumber

    The calculate page of the list response. Refer to parameters to learn more.

  • X-Pagination-TotalCountinteger

    The total amount of items available in the remote ressource. Use this value in combination with the limit to calculate the available pages.

Format
application/json
Description

OK

  • Array[
    • *object
      • descriptionstringrequired
      • expiryDatestring (date-time)
      • idstring (uuid)required
      • keyReferenceone of 2 alternatives
        • Alternativeobject
          • keystringrequired
        • Alternativeobject
          • externalKeystringrequired
      • kind"typo3-elts"required
      • metaobjectrequired
        • appVersionobject
          • descriptionstringrequired
      • referenceobjectrequired
        • aggregate"project"required
        • domain"project"required
        • idstringrequired
      • volumeinteger
    ]
Content-Type: application/json

[
{
"description": "string",
"expiryDate": "1985-10-26T01:21:00.000Z",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"keyReference": {
"key": "Afdkj49dsfj3"
},
"kind": "typo3-elts",
"meta": {
"appVersion": {
"description": "string"
}
},
"reference": {
"aggregate": "project",
"domain": "project",
"id": "string"
},
"volume": 123
}
]
{
"items": {
"properties": {
"description": {
"type": "string"
},
"expiryDate": {
"format": "date-time",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"keyReference": {
"oneOf": [
{
"properties": {
"key": {
"example": "Afdkj49dsfj3",
"type": "string"
}
},
"required": [
"key"
],
"type": "object"
},
{
"properties": {
"externalKey": {
"type": "string"
}
},
"required": [
"externalKey"
],
"type": "object"
}
]
},
"kind": {
"enum": [
"typo3-elts"
],
"type": "string"
},
"meta": {
"properties": {
"appVersion": {
"properties": {
"description": {
"type": "string"
}
},
"required": [
"description"
],
"type": "object"
}
},
"type": "object"
},
"reference": {
"properties": {
"aggregate": {
"enum": [
"project"
],
"type": "string"
},
"domain": {
"enum": [
"project"
],
"type": "string"
},
"id": {
"type": "string"
}
},
"required": [
"id",
"domain",
"aggregate"
],
"type": "object"
},
"volume": {
"type": "integer"
}
},
"required": [
"id",
"description",
"kind",
"reference",
"meta"
],
"type": "object"
},
"type": "array"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/f0f86186-0a5a-45b2-aa33-502777496347/licenses?limit=50&page=1
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.license.listLicensesForProject({
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"queryParameters": {
"limit": 50,
"page": 1
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\License\ListLicensesForProject\ListLicensesForProjectRequest;

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

$request = (new ListLicensesForProjectRequest(
projectId: "f0f86186-0a5a-45b2-aa33-502777496347"
))
->withLimit(50)
->withPage(1);
$response = $client->license()->listLicensesForProject($request);

var_dump($response->getBody();

On this page