List security groups attached to a server
GET
/api/v1/server/{server_id}/security-group
const url = 'https://console.cloudlogics.com/api/v1/server/30035038-738f-46b0-82b0-a634261b1bf4/security-group';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://console.cloudlogics.com/api/v1/server/30035038-738f-46b0-82b0-a634261b1bf4/security-group \ --header 'Authorization: <Authorization>'List security groups currently attached to the given server. Access is granted to system admins, the VM owner, or members of the VM’s project when the VM is public — no need to switch projects first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”server_id
required
string
Server ID
Responses
Section titled “Responses”Security groups attached to the server
Media typeapplication/json
object
key
additional properties
any
Examplegenerated
{}Invalid ID
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Forbidden — caller does not have access to this VM
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}Internal server error
Media typeapplication/json
object
data
error
object
code
integer
message
string
page
object
next
string
prev
string
total_size
integer
Examplegenerated
{ "data": "example", "error": { "code": 1, "message": "example" }, "page": { "next": "example", "prev": "example", "total_size": 1 }}