Experimental

The SshKey API is implemented via the SSH Key Authenticator Plugin. REST APIs provided by plugins are currently considered Experimental, and as such this interface may change without notice between minor releases.


Implementation Notes

  • Only JSON format is supported. XML format is not supported.
  • Note the URLs for this API use plugin syntax. (There is an extra component to the path.)
  • As defined in the SshKey Schema, an SSH Key Authenticator ID is required as part of the request. This refers to the Authenticator instantiated for the CO.
  • Authenticators that are locked cannot be managed by the API.

Add

Add a new SSH Key.

Request Format

Method

POST

URL

/ssh_key_authenticator/ssh_keys.<format>

Request Body

SshKey Request

Response Format

HTTP Status

Response Body

Description

201 Added

NewObjectResponse with ObjectType of SshKey

SSH Key created

400 Bad Request


SSH Key Request not provided in POST body

400 Invalid Fields

ErrorResponse with details in InvalidFields element

An error in one or more provided fields

401 Unauthorized


Authentication required

500 Other Error


Unknown error


Delete

Remove an SSH Key.

Request Format

Method

DELETE

URL

/ssh_key_authenticator/ssh_keys/<id>.<format>

Request Body


Response Format

HTTP Status

Response Body

Description

200 Deleted


SSH Key deleted

400 Invalid Fields


id not provided

401 Unauthorized


Authentication required

404 SshKey Unknown


id not found

500 Other Error


Unknown error


Edit

Edit an existing SSH Key.

Request Format

Method

PUT

URL

/ssh_key_authenticator/ssh_keys/<id>.<format>

Request Body

SshKey Request

Response Format

HTTP Status

Response Body

Description

200 OK


SSH Key updated

400 Bad Request


SSH Key Request not provided in POST body

400 Invalid Fields

ErrorResponse with details in InvalidFields element

An error in one or more provided fields

401 Unauthorized


Authentication required

404 SshKey Unknown


id not found

500 Other Error


Unknown error


View (all)

Retrieve all existing SSH Keys.

Request Format

Method

GET

URL

/ssh_key_authenticator/ssh_keys.<format>

Request Body


Response Format

HTTP Status

Response Body

Description

200 OK

SshKey Response

SSH Keys returned

401 Unauthorized


Authentication required

500 Other Error


Unknown error


View (per CO Person)

Retrieve all existing SSH Keys for the specified CO Person.

Request Format

Method

GET

URL

/ssh_key_authenticator/ssh_keys.<format>?copersonid=<id>

Request Body


Response Format

HTTP Status

Response Body

Description

200 OK

SshKey Response

SSH Key returned

401 Unauthorized


Authentication required

404 SSH Key Unknown


id not found

500 Other Error


Unknown error


View (one)

Retrieve an existing SSH Key.

Request Format

Method

GET

URL

/ssh_key_authenticator/ssh_keys/<id>.<format>

Request Body


Response Format

HTTP Status

Response Body

Description

200 OK

SshKey Response

SSH Key returned

401 Unauthorized


Authentication required

404 SSH Key Unknown


id not found

500 Other Error


Unknown error


Notes

  • Response format requested is ignored where response is only via HTTP status, but must still be provided.

See Also

  • No labels