addKey
Create a new SSH public key for the currently logged in user
Header Parameters
- Authorization required
Oauth2 token or private token (needs to start with Bearer plus a space)
- application/json
Request Body required
add ssh key request body
- title string
title
- key string
ssh public key
Responses
- 200
- 400
- 401
Success
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
- key string
public key
- id string
public key id
- title string
public key name
- createdAt string
creation time
- readOnly boolean
Is it read-only?
{
"key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE6tiarA4AR0asd33dklfjf87R6TE9BJAfkdBpqHi9zWfRhloJ 323467712@qq.com",
"id": 207003,
"title": "ssh-1",
"createdAt": "2023-02-24T04:31:36.000+00:00",
"readOnly": false
}
- Schema
- Example (from schema)
Schema
- key string
public key
- id string
public key id
- title string
public key name
- createdAt string
creation time
- readOnly boolean
Is it read-only?
<root>
<key>ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE6tiarA4AR0asd33dklfjf87R6TE9BJAfkdBpqHi9zWfRhloJ 323467712@qq.com</key>
<id>207003</id>
<title>ssh-1</title>
<createdAt>2023-02-24T04:31:36.000+00:00</createdAt>
<readOnly>false</readOnly>
</root>
The title cannot be empty/SSH Key format error/The key has been added as a user key or deployment key, and the addition failed
invalid token
- application/json
- application/xml
- Schema
- Example (from schema)
Schema
- error string
error name
- error_description string
wrong description
{
"error": "invalid_token",
"error_description": "Invalid token, please provide correct token"
}
- Schema
- Example (from schema)
Schema
- error string
error name
- error_description string
wrong description
<root>
<error>invalid_token</error>
<error_description>Invalid token, please provide correct token</error_description>
</root>
Loading...