DeleteRepository - Delete a repository

Updated at:

Deletes a specified code repository.

Applicable editions

Central edition, Region edition

Service endpoints and authorization information

Product

Resource

Required permissions

Code Management

Code repository

Read/Write

Request syntax

Central edition

DELETE https://{domain}/oapi/v1/codeup/organizations/{organizationId}/repositories/{repositoryId}

Region edition

DELETE https://{domain}/oapi/v1/codeup/repositories/{repositoryId}

Request header

Parameter

Type

Required

Description

Example value

x-yunxiao-token

string

Yes

The personal access token.

pt-0fh3****0fbG_35af****0484

Request parameters

Parameter

Type

Location

Required

Description

Example value

organizationId

string

path

  • Yes: Central edition

  • No: Region edition

The organization ID.

60d54f3daccf2bbd6659f3ad

repositoryId

string

path

Yes

The repository ID or the URL-encoded full path of the repository.

2813489 or 60de7a6852743a5162b5f957%2FDemoRepo

Request examples

Central edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/codeup/organizations/60d54f3daccf2bbd6659f3ad/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Region edition

curl -X 'DELETE' \
  'https://{domain}/oapi/v1/codeup/repositories/2813489 or 60de7a6852743a5162b5f957%2FDemoRepo' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'

Response parameters

Parameter

Type

Description

Example value

-

object

result

boolean

Indicates whether the deletion was successful.

true

Response example

{
    "result": true
}

Error codes

Visit the Error Code Center to look up API error codes.