Help Center> ServiceStage> API Reference (ME-Abu Dhabi Region)> Git Repository Access APIs> Obtaining Repository Information Based on the Clone URL
Updated on 2023-06-25 GMT+08:00

Obtaining Repository Information Based on the Clone URL

Function

This API is used to obtain repository information based on the clone URL.

URI

GET /v1/{project_id}/git/repos/project-info

Table 1 describes the parameters.

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's project ID.

Table 2 Query parameters

Parameter

Type

Mandatory

Description

clone_url

String

Yes

Clone URL of a repository.

Request

Request parameters

None

Response

Response parameters

Table 3 Response parameters

Parameter

Type

Description

namespace_id

String

Namespace ID.

namespace

String

Namespace.

project_id

String

Repository project ID.

project

String

Repository project.

Example

Example request

https://{Endpoint}/v1/7c6a62ddb2bf45a3920d8053d3cb8fbf/git/repos/project-info?clone_url=http://xxx.gitlab.com:8090/xxx/springcloud-xxbbon.git

Example response

{
  "project": "string"
  "namespace_id": "string",
  "namespace": "string",
  "project_id": "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.