Back to top

SSHKeys

SSH Key Management

Retrieve all ssk keys
GET
/ssh-keys

Returns a collection of the user’s ssh keys.

  • Parameters
  • include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"ssh_keys": [
    		{
    			"id": "string",
    			"label": "string",
    			"key": "string",
    			"fingerprint": "string",
    			"created_at": "string",
    			"updated_at": "string",
    			"entity": {
    				"href": "string"
    			},
    			"href": "string"
    		}
    	]
    }
  • Response  401   unauthorized
Create a ssh key for the current user
/ssh-keys

Creates a ssh key.

  • Parameters
  • ssh key
     (required) in body

    ssh key to create

    {
    	"label": "string",
    	"key": "string"
    }
  • Response  201   created
  • {
    	"id": "string",
    	"label": "string",
    	"key": "string",
    	"fingerprint": "string",
    	"created_at": "string",
    	"updated_at": "string",
    	"entity": {
    		"href": "string"
    	},
    	"href": "string"
    }
  • Response  401   unauthorized
  • Response  422   unprocessable entity
Retrieve a project's ssk keys
GET
/projects/{id}/ssh-keys

Returns a collection of the project's ssh keys.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"ssh_keys": [
    		{
    			"id": "string",
    			"label": "string",
    			"key": "string",
    			"fingerprint": "string",
    			"created_at": "string",
    			"updated_at": "string",
    			"entity": {
    				"href": "string"
    			},
    			"href": "string"
    		}
    	]
    }
  • Response  401   unauthorized
Create a ssh key for the given project
/projects/{id}/ssh-keys

Creates a ssh key.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    ssh key
     (required) in body

    ssh key to create

    {
    	"label": "string",
    	"key": "string"
    }
  • Response  201   created
  • {
    	"id": "string",
    	"label": "string",
    	"key": "string",
    	"fingerprint": "string",
    	"created_at": "string",
    	"updated_at": "string",
    	"entity": {
    		"href": "string"
    	},
    	"href": "string"
    }
  • Response  401   unauthorized
  • Response  422   unprocessable entity
Retrieve a ssh key
GET
/ssh-keys/{id}

Returns a single ssh key if the user has access

  • Parameters
  • id
    string  (required) in path

    SSH Key UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"id": "string",
    	"label": "string",
    	"key": "string",
    	"fingerprint": "string",
    	"created_at": "string",
    	"updated_at": "string",
    	"entity": {
    		"href": "string"
    	},
    	"href": "string"
    }
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
Update the ssh key
PUT
/ssh-keys/{id}

Updates the ssh key.

  • Parameters
  • id
    string  (required) in path

    SSH Key UUID

    ssh key
     (required) in body

    ssh key to update

    {
    	"label": "string",
    	"key": "string"
    }
  • Response  200   ok
  • {
    	"id": "string",
    	"label": "string",
    	"key": "string",
    	"fingerprint": "string",
    	"created_at": "string",
    	"updated_at": "string",
    	"entity": {
    		"href": "string"
    	},
    	"href": "string"
    }
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
  • Response  422   unprocessable entity
Delete the ssh key
/ssh-keys/{id}

Deletes the ssh key.

  • Parameters
  • id
    string  (required) in path

    ssh key UUID

  • Response  204   no content
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found