createProjectKey
POST/v1/projects/:project_id/keys
Create a key
Request
Path Parameters
project_id stringrequired
Project ID
- application/json
Body
required
name stringrequired
public_key public-keyrequired
Responses
- 200
- 400
- 401
- 403
- 404
Newly created project key
- application/json
- Schema
- Example (from schema)
Schema
id stringrequired
project_id stringrequired
public_key stringrequired
key_type stringrequired
Possible values: [rsa
, ec
, ed448
, ed25519
]
fingerprint stringrequired
last_used date-timenullable
use_count integer
created_at date-timerequired
updated_at date-timerequired
{
"id": "abcdefghijklmnopqrstuvwxyz",
"project_id": "abcdefghijklmnopqrstuvwxyz",
"public_key": "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC/SZrZ8OIhrpZuc/li7YZO850T\nMpRHXYnlK+pMCFHMPVL3kYRwgwx7DUzqzcgeplC98MDYeT3T6F6pAUCJ8e7YqcUk\nbrWQxBZ883agHZxm9SI8/U9pXL27G5znEvfySyKM5FO0+kgMatvchacnqa9yDgU8\n9bjIg4jV36RbrCfPiwIDAQAB\n-----END PUBLIC KEY-----\n",
"key_type": "rsa",
"fingerprint": "SHA256=00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff",
"last_used": "2024-04-09T08:49:18.723Z",
"use_count": 0,
"created_at": "2024-04-09T08:49:18.723Z",
"updated_at": "2024-04-09T08:49:18.723Z"
}
Client provided an invalid request
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status integerrequired
reason stringrequired
description string
details object
property name* string[]
string
{
"status": 400,
"reason": "Reason",
"description": "string",
"details": {}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status integerrequired
reason stringrequired
description string
details object
property name* string[]
string
{
"status": 400,
"reason": "Reason",
"description": "string",
"details": {}
}
Forbidden
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status integerrequired
reason stringrequired
description string
details object
property name* string[]
string
{
"status": 400,
"reason": "Reason",
"description": "string",
"details": {}
}
Resource not found
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- ]
status integerrequired
reason stringrequired
description string
details object
property name* string[]
string
{
"status": 400,
"reason": "Reason",
"description": "string",
"details": {}
}
Loading...