Skip to main content

List Registries belonging to a Project

GET/v2/projects/{projectId}/registries
API version
v2
Request method
GET
Operation ID
container-list-registries

Request​

  • projectIdstringrequired

    ID of the Project to get Registries 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
      • credentialsobject
        • usernamestringrequired

          Your registry username.

        • validbooleanrequired

          Status of the credentials.

      • descriptionstringrequired
      • idstring (uuid)required
      • projectIdstring (uuid)required
      • uristringrequired
    ]
Content-Type: application/json

[
{
"credentials": {
"username": "username",
"valid": true
},
"description": "DockerHub",
"id": "f0f86186-0a5a-45b2-aa33-502777496347",
"projectId": "f0f86186-0a5a-45b2-aa33-502777496347",
"uri": "index.docker.io"
}
]
{
"items": {
"properties": {
"credentials": {
"properties": {
"username": {
"description": "Your registry username.",
"example": "username",
"type": "string"
},
"valid": {
"description": "Status of the credentials.",
"example": true,
"type": "boolean"
}
},
"required": [
"username",
"valid"
],
"type": "object"
},
"description": {
"example": "DockerHub",
"type": "string"
},
"id": {
"format": "uuid",
"type": "string"
},
"projectId": {
"format": "uuid",
"type": "string"
},
"uri": {
"example": "index.docker.io",
"type": "string"
}
},
"required": [
"id",
"projectId",
"uri",
"description"
],
"type": "object"
},
"type": "array"
}

Usage examples​

$ curl \
--fail \
--location \
-H "Authorization: Bearer $MITTWALD_API_TOKEN" \
https://api.mittwald.de/v2/projects/string/registries?hasCredentials=true&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.container.listRegistries({
"projectId": "string",
"queryParameters": {
"hasCredentials": true,
"limit": 50,
"page": 1
}
});

assertStatus(response, 200);

use \Mittwald\ApiClient\Generated\V2\Clients\Container\ListRegistries\ListRegistriesRequest;

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

$request = (new ListRegistriesRequest(
projectId: "string"
))
->withHasCredentials(true)
->withLimit(50)
->withPage(1);
$response = $client->container()->listRegistries($request);

var_dump($response->getBody();

On this page