SSH User
Get SSH Users
GET /ne/v1/sshUsers | |
---|---|
Method | GET |
URL or End Point | /ne/v1/sshUsers |
Headers | Authorization, Content-Type |
Query Parameters | username, virtualDeviceUuid, verbose, accountUcmId, offset, limit |
Body | Not applicable |
Returns SSH users.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
The following screenshot shows a sample curl request.
curl -X
GET "https://api.equinix.com/ne/v1/sshUsers?verbose=Yes"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
Query Parameter Name | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
username | No | string | sr3245 | Ssh user name. | |
virtualDeviceUuid | No | string | 32cf4a21-a6c4-4501-9a0c-79fc0873f653 | The unique Id of the virtual device | |
verbose | No | boolean | True | True, False | Whether you want details, including virtual device Id, metros, or just the unique Id and username of ssh users. |
accountUcmId | No | string | 133598 | Unique Id of the account. A reseller querying for an end-customer's ssh-users can pass the accountUcmId of the customer's account. To find out the accountUcmId of a customer's account, please check the Equinix account creation portal (ECP) or call Get account API. | |
offset | No | integer | 0 | Specifies where to start a page. It is the starting point of the collection returned from the server. | |
limit | No | integer | 100 | Specifies the page size. |
Sample response:
{
"pagination": {
"offset": 0,
"limit": 20,
"total": 2
},
"data": [
{
"uuid": "68d8fa96-967c-4550-8111-9229418ec3b3",
"username": "user6",
"deviceUuids": [],
"metroStatusMap": {
"da1.pod1": {
"status": "FAILED"
}
}
},
{
"uuid": "1768b990-97cc-4e86-926d-866a2723f701",
"username": "testSsh",
"deviceUuids": [
"c71f9d7c-58ba-45a4-a0c9-c0cbeab4a128",
"d84704c6-bea8-4f77-a57c-51df65644e29",
"a165572a-0243-4a98-928a-10af8c01fcb0"
],
"metroStatusMap": {
"sy5.pod2": {
"status": "ACTIVE"
},
"sy4.pod1": {
"status": "ACTIVE"
}
}
}
]
}
The description of the response is as follows:
Field Name | Type | Example Values | Description |
---|---|---|---|
pagination | object | An object that has pagination information. | |
offset | integer | 0 | It is the starting point of the collection returned from the server. |
limit | integer | 20 | The page size. |
total | integer | 100 | The total number of results. |
next | string | The next set of records. | |
previous | string | The previous set of records. | |
data | array [objects] | An array of ssh users. | |
uuid | string | 32cf4a21-a6c4-4501-9a0c-79fc0873f653 | Unique Id of the ssh user. |
username | string | srt123 | Ssh user name. |
deviceUuids | array | "deviceUuids": [ "3925b42b-eff6-4c07-8c1a-3f16c01779aa" ] | An array of virtual device unique Ids associated with the username. |
metroStatusMap | object [objects] | "sv5.pod1": { "status": "ACTIVE" } | Object with the pod name as the key. The value is another object that has the status (PENDING, ACTIVE, or FAILED) of the ssh user in that pod. |
status | string | ACTIVE | Whether the ssh user is active, pending, or failed in the pod. |
If you get “Access Denied” error, contact your local Equinix Service Desk.
Get SSH User {uuid}
GET /ne/v1/sshUsers/{uuid} | |
---|---|
Method | GET |
URL or End Point | /ne/v1/sshUsers/{uuid} |
Headers | Authorization, Content-Type |
Path Parameter | uuid |
Body | Not applicable |
Returns the SSH user details by its unique ID.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
The following screenshot shows a sample curl request.
curl -X
GET "https://api.equinix.com/ne/v1/sshUsers/d8fe1db2-75a1-436e-839f-3ca50f4dce89"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
Path Parameter Name | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
uuid | Yes | string | d8fe1db2-75a1-436e-839f-3ca50f4dce89 | Unique Id of an SSH user. |
Sample response:
{
"uuid": "d8fe1db2-75a1-436e-839f-3ca50f4dce87",
"username": "SRT12345",
"deviceUuids": [
"3925b42b-eff6-4c07-8c1a-3f16c01779aa"
],
"metroStatusMap": {
"SV": {
"status": "ACTIVE"
}
}
}
The description of the response is as follows:
Field Name | Type | Example Values | Description |
---|---|---|---|
uuid | string | 32cf4a21-a6c4-4501-9a0c-79fc0873f653 | Unique Id of the ssh user. |
username | string | srt123 | Ssh user name. |
deviceUuids | array | "deviceUuids": [ "3925b42b-eff6-4c07-8c1a-3f16c01779aa" ] | An array of virtual device unique Ids associated with the username. |
metroStatusMap | object | "sv5.pod1": { "status": "ACTIVE" } | An object with the pod name as the key. The value is another object that has the status (PENDING, ACTIVE, or FAILED) of the ssh user in that pod. |
status | string | ACTIVE | The status of the ssh user in the pod. |
If you get “Access Denied” error, contact your local Equinix Service Desk.
Check SSH Username Availability
GET /ne/v1/sshUsers/availability | |
---|---|
Method | GET |
URL or End Point | /ne/v1/sshUsers/availability |
Headers | Authorization, Content-Type |
Query Parameters | username |
Body | Not applicable |
Checks if an SSH username is available.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
The following screenshot shows a sample curl request and its JSON response.
curl -X
GET "https://api.equinix.com/ne/v1/sshUsers/availability?username=mitali"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
Query Parameter Name | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
username | Yes | string | mitali | User name. |
Sample response:
204 No Content
The description of the response is as follows:
HTTP Status | Description |
---|---|
204 No Content | The username is available. |
If you get “Access Denied” error, contact your local Equinix Service Desk.
Create SSH user
POST /ne/v1/sshUsers | |
---|---|
Method | POST |
URL or End Point | /ne/v1/sshUsers |
Headers | Authorization, Content-Type |
Path Parameters | NA |
Body Parameters | username, password, deviceUuid |
Creates a new SSH user and associates it with a virtual device. You can only associate a user with an active device.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
Curl request:
curl -X
POST "https://api.equinix.com/ne/v1/sshUsers"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
-d "{
"username": "SRT12345",
"password": "projPass",
"deviceUuid": "3da0a663-20d9-4b8f-8c5d-d5cf706840c8"
}"
The description of the body parameters is as follows:
Parameter Name | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
username | Yes | string | srt12345 | User name. | |
password | Yes | string | projPass | Password. | |
deviceUuid | Yes | string | 3da0a663-20d9-4b8f-8c5d-d5cf706840c8 | Unique Id of the virtual device. |
Sample response
201 Created
The description of the response payload is as follows:
HTTP Status | Description |
---|---|
201 Created | The new SSH user was created and associated with the device. |
If you get “Access Denied” error, contact your local Equinix Service Desk.
Update SSH User {uuid}
POST /ne/v1/sshUsers/{sshUserUuid}/devices/{deviceUuid} | |
---|---|
Method | POST |
URL or End Point | /ne/v1/sshUsers/{sshUserUuid}/devices/{deviceUuid} |
Headers | Authorization, Content-Type |
Query Parameters | NA |
Path Parameters | sshUserUuid, deviceUuid |
Associates an SSH user with a device.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
The following screenshot shows a sample curl request:
curl -X
POST "https://api.equinix.com/ne/v1/sshUsers/fa02d9df-75c2-4763-b9f7-89a06bf6376a/devices/afeb071c-227b-4be2-8fd5-ced81fd37273"
-H "content-type: application/json"
-H "Authorization: Bearer jnSoUKaJHpzMnU0toROpUHmqnwEP"
The description of the path parameters is as follows:
Path Parameter Name | Mandatory | Type | Example | Possible Values | Description |
---|---|---|---|---|---|
sshUserUuid | Yes | string | ec68e425-f973-452e-a866-76be5844d0ba | The unique Id of the ssh user. | |
deviceUuid | Yes | string | 4cfb5675-5c3f-4275-adba-0c9e3c26c96b | The unique Id of the device. |
Sample response:
201
The description of the response payload is as follows:
HTTP Status | Description |
---|---|
201 | Association created successfully. |
Update SSH User Password
PUT /ne/v1/sshUsers/{uuid} | |
---|---|
Method | POST |
URL or End Point | /ne/v1/sshUsers/{uuid} |
Headers | Authorization, Content-Type |
Path Parameters | uuid |
Body Parameters | password |
Updates the password of an SSH user.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
Curl request:
curl -X
PUT "https://api.equinix.com/ne/v1/sshUsers/ec68e425-f973-452e-a866-76be5844d0ba"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
-d "{
"password": "projPass"
}"
The description of the path parameter is as follows:
Path Parameter | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
uuid | Yes | string | ec68e425-f973-452e-a866-76be5844d0ba | The unique id of an SSH user. |
The description of the body parameter is as follows:
Body Parameter | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
password | Yes | string | projPass! | The password of the SSH user. |
Sample response
204 No Content
The description of the response payload is as follows:
HTTP Status | Description |
---|---|
204 No Content | Password updated successfully. |
If you get “Access Denied” error, contact your local Equinix Service Desk.
Delete SSH User
DEL /ne/v1/sshUsers/{sshUserUuid}/devices/{deviceUuid} | |
---|---|
Method | DEL |
URL or End Point | /ne/v1/sshUsers/{sshUserUuid}/devices/{deviceUuid} |
Headers | Authorization, Content-Type |
Path Parameter | sshUserUuid, deviceUuid |
Query Parameter | NA |
Dissociates an SSH user from a device. The ssh user will be deleted if there are no other devices associated with it.
To obtain an authorization token, refer to Requesting Access and Refresh tokens under the Getting Access Token section.
The following screenshot shows a sample curl request.
curl -X
DEL "https://api.equinix.com/ne/v1/sshUsers/d8fe1db2-75a1-436e-839f-3ca50f4dce87/devices/9ae1e9fc-7b0b-453b-bf2e-ea1d5fc52753"
-H "content-type: application/json"
-H "authorization: Bearer qwErtY8zyW1abcdefGHI"
Path Parameter Name | Mandatory | Type | Example | Applicable Values | Description |
---|---|---|---|---|---|
sshUserUuid | Yes | string | d8fe1db2-75a1-436e-839f-3ca50f4dce89 | The unique Id of the ssh user. | |
deviceUuid | Yes | string | 9ae1e9fc-7b0b-453b-bf2e-ea1d5fc52753 | The unique Id of the virtual device. |
Sample response:
{
"sshUserDeleted": false,
"sshUserToDeviceAssociationDeleted": true
}
The description of the response:
Field Name | Type | Example Values | Description |
---|---|---|---|
sshUserDeleted | string | false | Whether the ssh user was deleted or not. The ssh user is deleted from the system only if there is no other device associated with the user. |
sshUserToDeviceAssociationDeleted | string | true | Whether the ssh user was removed from the device. If True, the user will no longer have access to the device. |
If you get “Access Denied” error, contact your local Equinix Service Desk.