Updated on 2023-06-25 GMT+08:00

Obtaining All Projects in a Namespace

Function

This API is used to obtain all projects in a namespace.

URI

GET /v1/{project_id}/git/repos/{namespace}/projects

Table 1 describes the parameters.

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's project ID.

namespace

String

Yes

Namespace ID.

Request

Request parameters

None

Response

Response parameters

Table 2 Response parameters

Parameter

Type

Description

projects

Array<Object>

Project structure. For details, see Table 3.

Table 3 projects parameters

Parameter

Type

Description

id

String

Project ID.

name

String

Project name.

clone_url

String

Clone URL.

Example

Example request

None

Example response

{
  "projects": [
    {
      "id": "string",
      "name": "string",
      "clone_url": "string"
    }
  ]
}

Status Code

Table 4 Status codes

Status Code

Description

200

OK

400

Bad Request

Error Code

Error code must be in the format of SVCSTG.REPO.[Error_ID]. Example: SVCSTG.REPO.0401. See ServiceStage Error Codes.