Help Center/ CodeArts Repo/ API Reference/ APIs/ SSHKey/ Check whether the private key has the permission to pull code.
Updated on 2023-05-06 GMT+08:00

Check whether the private key has the permission to pull code.

Function

Check whether the private key has the permission to pull code.

URI

POST /v1/users/sshkey/privatekey/verify

Request Parameters

Table 1 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the user token.

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

repository_uuid

Yes

String

Repository UUID, which is returned by the CreateRepository interface.

Minimum: 32

Maximum: 32

private_key

Yes

String

Private key

Minimum: 0

Maximum: 2048

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

error

Error object

Response error.

result

String

Result

status

String

Status code in a response

Table 4 Error

Parameter

Type

Description

code

String

Error Codes

message

String

Error message

Example Requests

POST https://{endpoint}/v1/users/sshkey/privatekey/verify

{
  "private_key" : "-----BEGIN RSA PRIVATE KEY-----****-----END RSA PRIVATE KEY-----",
  "repository_uuid" : "9b2fab276e9240e09cd01ed0400fc439"
}

Example Responses

Status code: 200

OK

{
  "status" : "success"
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.