Security Groups

List Security Groups

get

Retrieve a list of available security groups.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
offsetinteger · int32Optional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination).

Default: 0
limitinteger · int32 · min: 1 · max: 10000Optional

The maximum number of elements to return (use together with offset for pagination).

Default: 1000
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/securitygroups HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "security-group",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My security group",
        "description": "My security group description"
      },
      "entities": {
        "rules": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "firewall-rule",
              "href": "<RESOURCE-URI>",
              "metadata": {
                "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                "createdDate": "2015-12-04T14:34:09.809Z",
                "createdBy": "[email protected]",
                "createdByUserId": "[email protected]",
                "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                "lastModifiedBy": "[email protected]",
                "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                "state": "AVAILABLE"
              },
              "properties": {
                "name": "My resource",
                "protocol": "TCP",
                "sourceMac": "00:0a:95:9d:68:16",
                "ipVersion": "IPv4",
                "sourceIp": "22.231.113.64",
                "targetIp": "22.231.113.64",
                "icmpCode": 0,
                "icmpType": 8,
                "portRangeStart": 8,
                "portRangeEnd": 8,
                "type": "INGRESS"
              }
            }
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "nics": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "servers": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        }
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create a Security Group

post

Creates a security group within the data center. This will allow you to define which IP addresses and networks have access to your servers.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
Responses
202
Accepted. The request has been accepted for processing.
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/securitygroups HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 168

{
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "type": "collection",
      "offset": 0,
      "limit": 1000,
      "_links": {}
    }
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "security-group",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "firewall-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "protocol": "TCP",
            "sourceMac": "00:0a:95:9d:68:16",
            "ipVersion": "IPv4",
            "sourceIp": "22.231.113.64",
            "targetIp": "22.231.113.64",
            "icmpCode": 0,
            "icmpType": 8,
            "portRangeStart": 8,
            "portRangeEnd": 8,
            "type": "INGRESS"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "nics": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "nic",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "mac": "00:0a:95:9d:68:16",
            "ips": [
              "10.160.12.12"
            ],
            "dhcp": true,
            "ipv6Ips": [
              "2001:db8:b06d:8f5a:0609::1"
            ],
            "ipv6CidrBlock": "2001:db8:b06d:8f5a:0609::/80",
            "dhcpv6": true,
            "lan": 2,
            "firewallActive": false,
            "firewallType": "INGRESS",
            "deviceNumber": 3,
            "pciSlot": 7,
            "vnet": null
          },
          "entities": {
            "flowlogs": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "flow-log",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "action": "ACCEPTED",
                    "direction": "INGRESS",
                    "bucket": "bucketName/key"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "firewallrules": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "firewall-rule",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "protocol": "TCP",
                    "sourceMac": "00:0a:95:9d:68:16",
                    "ipVersion": "IPv4",
                    "sourceIp": "22.231.113.64",
                    "targetIp": "22.231.113.64",
                    "icmpCode": 0,
                    "icmpType": 8,
                    "portRangeStart": 8,
                    "portRangeEnd": 8,
                    "type": "INGRESS"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "securitygroups": "[Circular Reference]"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "servers": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "server",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "templateUuid": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
            "name": "My resource",
            "hostname": "myHostname",
            "cores": 4,
            "ram": 4096,
            "availabilityZone": "AUTO",
            "vmState": "RUNNING",
            "bootCdrom": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "bootVolume": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "cpuFamily": "INTEL_ICELAKE",
            "type": "CUBE",
            "placementGroupId": null,
            "nicMultiQueue": true
          },
          "entities": {
            "cdroms": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "image",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "description": "The image/snapshot of Ubuntu ",
                    "location": "us/las",
                    "size": 100,
                    "cpuHotPlug": true,
                    "cpuHotUnplug": true,
                    "ramHotPlug": true,
                    "ramHotUnplug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "discScsiHotPlug": true,
                    "discScsiHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "imageType": "HDD",
                    "public": true,
                    "imageAliases": [
                      "text"
                    ],
                    "cloudInit": "V1"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "volumes": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "volume",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "type": "HDD",
                    "size": 100,
                    "availabilityZone": "AUTO",
                    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
                    "imagePassword": "mypass123",
                    "imageAlias": "text",
                    "sshKeys": [
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
                    ],
                    "bus": "VIRTIO",
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "cpuHotPlug": true,
                    "ramHotPlug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "deviceNumber": 3,
                    "pciSlot": 7,
                    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "userData": "text",
                    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "bootOrder": "AUTO"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "nics": "[Circular Reference]",
            "securitygroups": "[Circular Reference]",
            "gpus": {
              "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
                  "type": "gpu",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My GPU",
                    "vendor": "NVIDIA",
                    "model": "A100",
                    "type": "passthrough"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            }
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Retrieve a Security Group

get

Retrieves the attributes of a given Security Group.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center

securityGroupIdstringRequired

The unique ID of the security group.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "security-group",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "firewall-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "protocol": "TCP",
            "sourceMac": "00:0a:95:9d:68:16",
            "ipVersion": "IPv4",
            "sourceIp": "22.231.113.64",
            "targetIp": "22.231.113.64",
            "icmpCode": 0,
            "icmpType": 8,
            "portRangeStart": 8,
            "portRangeEnd": 8,
            "type": "INGRESS"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "nics": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "nic",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "mac": "00:0a:95:9d:68:16",
            "ips": [
              "10.160.12.12"
            ],
            "dhcp": true,
            "ipv6Ips": [
              "2001:db8:b06d:8f5a:0609::1"
            ],
            "ipv6CidrBlock": "2001:db8:b06d:8f5a:0609::/80",
            "dhcpv6": true,
            "lan": 2,
            "firewallActive": false,
            "firewallType": "INGRESS",
            "deviceNumber": 3,
            "pciSlot": 7,
            "vnet": null
          },
          "entities": {
            "flowlogs": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "flow-log",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "action": "ACCEPTED",
                    "direction": "INGRESS",
                    "bucket": "bucketName/key"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "firewallrules": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "firewall-rule",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "protocol": "TCP",
                    "sourceMac": "00:0a:95:9d:68:16",
                    "ipVersion": "IPv4",
                    "sourceIp": "22.231.113.64",
                    "targetIp": "22.231.113.64",
                    "icmpCode": 0,
                    "icmpType": 8,
                    "portRangeStart": 8,
                    "portRangeEnd": 8,
                    "type": "INGRESS"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "securitygroups": "[Circular Reference]"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "servers": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "server",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "templateUuid": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
            "name": "My resource",
            "hostname": "myHostname",
            "cores": 4,
            "ram": 4096,
            "availabilityZone": "AUTO",
            "vmState": "RUNNING",
            "bootCdrom": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "bootVolume": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "cpuFamily": "INTEL_ICELAKE",
            "type": "CUBE",
            "placementGroupId": null,
            "nicMultiQueue": true
          },
          "entities": {
            "cdroms": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "image",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "description": "The image/snapshot of Ubuntu ",
                    "location": "us/las",
                    "size": 100,
                    "cpuHotPlug": true,
                    "cpuHotUnplug": true,
                    "ramHotPlug": true,
                    "ramHotUnplug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "discScsiHotPlug": true,
                    "discScsiHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "imageType": "HDD",
                    "public": true,
                    "imageAliases": [
                      "text"
                    ],
                    "cloudInit": "V1"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "volumes": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "volume",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "type": "HDD",
                    "size": 100,
                    "availabilityZone": "AUTO",
                    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
                    "imagePassword": "mypass123",
                    "imageAlias": "text",
                    "sshKeys": [
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
                    ],
                    "bus": "VIRTIO",
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "cpuHotPlug": true,
                    "ramHotPlug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "deviceNumber": 3,
                    "pciSlot": 7,
                    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "userData": "text",
                    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "bootOrder": "AUTO"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "nics": "[Circular Reference]",
            "securitygroups": "[Circular Reference]",
            "gpus": {
              "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
                  "type": "gpu",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My GPU",
                    "vendor": "NVIDIA",
                    "model": "A100",
                    "type": "passthrough"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            }
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Modify Security Group

put

Modify the properties of the specified Security Group within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the Security Group.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
Responses
202
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 168

{
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "type": "collection",
      "offset": 0,
      "limit": 1000,
      "_links": {}
    }
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "security-group",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "firewall-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "protocol": "TCP",
            "sourceMac": "00:0a:95:9d:68:16",
            "ipVersion": "IPv4",
            "sourceIp": "22.231.113.64",
            "targetIp": "22.231.113.64",
            "icmpCode": 0,
            "icmpType": 8,
            "portRangeStart": 8,
            "portRangeEnd": 8,
            "type": "INGRESS"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "nics": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "nic",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "mac": "00:0a:95:9d:68:16",
            "ips": [
              "10.160.12.12"
            ],
            "dhcp": true,
            "ipv6Ips": [
              "2001:db8:b06d:8f5a:0609::1"
            ],
            "ipv6CidrBlock": "2001:db8:b06d:8f5a:0609::/80",
            "dhcpv6": true,
            "lan": 2,
            "firewallActive": false,
            "firewallType": "INGRESS",
            "deviceNumber": 3,
            "pciSlot": 7,
            "vnet": null
          },
          "entities": {
            "flowlogs": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "flow-log",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "action": "ACCEPTED",
                    "direction": "INGRESS",
                    "bucket": "bucketName/key"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "firewallrules": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "firewall-rule",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "protocol": "TCP",
                    "sourceMac": "00:0a:95:9d:68:16",
                    "ipVersion": "IPv4",
                    "sourceIp": "22.231.113.64",
                    "targetIp": "22.231.113.64",
                    "icmpCode": 0,
                    "icmpType": 8,
                    "portRangeStart": 8,
                    "portRangeEnd": 8,
                    "type": "INGRESS"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "securitygroups": "[Circular Reference]"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "servers": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "server",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "templateUuid": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
            "name": "My resource",
            "hostname": "myHostname",
            "cores": 4,
            "ram": 4096,
            "availabilityZone": "AUTO",
            "vmState": "RUNNING",
            "bootCdrom": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "bootVolume": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "cpuFamily": "INTEL_ICELAKE",
            "type": "CUBE",
            "placementGroupId": null,
            "nicMultiQueue": true
          },
          "entities": {
            "cdroms": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "image",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "description": "The image/snapshot of Ubuntu ",
                    "location": "us/las",
                    "size": 100,
                    "cpuHotPlug": true,
                    "cpuHotUnplug": true,
                    "ramHotPlug": true,
                    "ramHotUnplug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "discScsiHotPlug": true,
                    "discScsiHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "imageType": "HDD",
                    "public": true,
                    "imageAliases": [
                      "text"
                    ],
                    "cloudInit": "V1"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "volumes": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "volume",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "type": "HDD",
                    "size": 100,
                    "availabilityZone": "AUTO",
                    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
                    "imagePassword": "mypass123",
                    "imageAlias": "text",
                    "sshKeys": [
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
                    ],
                    "bus": "VIRTIO",
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "cpuHotPlug": true,
                    "ramHotPlug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "deviceNumber": 3,
                    "pciSlot": 7,
                    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "userData": "text",
                    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "bootOrder": "AUTO"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "nics": "[Circular Reference]",
            "securitygroups": "[Circular Reference]",
            "gpus": {
              "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
                  "type": "gpu",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My GPU",
                    "vendor": "NVIDIA",
                    "model": "A100",
                    "type": "passthrough"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            }
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

Delete a Security Group

delete

Deletes the specified Security Group.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the Security Group.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
Responses
202
Accepted. The request has been accepted for processing.
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId} HTTP/1.1
Host: api.ionos.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Partially modify Security Group

patch

Modify the properties of the specified Security Group within the data center.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the Security Group.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
namestring · max: 60Required

The name of the security group.

Example: My security group
descriptionstring · max: 300Optional

The description of the security group.

Example: My security group description
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 74

{
  "name": "My security group",
  "description": "My security group description"
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "security-group",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My security group",
    "description": "My security group description"
  },
  "entities": {
    "rules": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "firewall-rule",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "protocol": "TCP",
            "sourceMac": "00:0a:95:9d:68:16",
            "ipVersion": "IPv4",
            "sourceIp": "22.231.113.64",
            "targetIp": "22.231.113.64",
            "icmpCode": 0,
            "icmpType": 8,
            "portRangeStart": 8,
            "portRangeEnd": 8,
            "type": "INGRESS"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "nics": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "nic",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "name": "My resource",
            "mac": "00:0a:95:9d:68:16",
            "ips": [
              "10.160.12.12"
            ],
            "dhcp": true,
            "ipv6Ips": [
              "2001:db8:b06d:8f5a:0609::1"
            ],
            "ipv6CidrBlock": "2001:db8:b06d:8f5a:0609::/80",
            "dhcpv6": true,
            "lan": 2,
            "firewallActive": false,
            "firewallType": "INGRESS",
            "deviceNumber": 3,
            "pciSlot": 7,
            "vnet": null
          },
          "entities": {
            "flowlogs": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "flow-log",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "action": "ACCEPTED",
                    "direction": "INGRESS",
                    "bucket": "bucketName/key"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "firewallrules": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "firewall-rule",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "protocol": "TCP",
                    "sourceMac": "00:0a:95:9d:68:16",
                    "ipVersion": "IPv4",
                    "sourceIp": "22.231.113.64",
                    "targetIp": "22.231.113.64",
                    "icmpCode": 0,
                    "icmpType": 8,
                    "portRangeStart": 8,
                    "portRangeEnd": 8,
                    "type": "INGRESS"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "securitygroups": "[Circular Reference]"
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    },
    "servers": {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "collection",
      "href": "<RESOURCE-URI>",
      "items": [
        {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "server",
          "href": "<RESOURCE-URI>",
          "metadata": {
            "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
            "createdDate": "2015-12-04T14:34:09.809Z",
            "createdBy": "[email protected]",
            "createdByUserId": "[email protected]",
            "lastModifiedDate": "2015-12-04T14:34:09.809Z",
            "lastModifiedBy": "[email protected]",
            "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
            "state": "AVAILABLE"
          },
          "properties": {
            "templateUuid": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
            "name": "My resource",
            "hostname": "myHostname",
            "cores": 4,
            "ram": 4096,
            "availabilityZone": "AUTO",
            "vmState": "RUNNING",
            "bootCdrom": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "bootVolume": {
              "id": "text",
              "type": "resource",
              "href": "<RESOURCE-URI>"
            },
            "cpuFamily": "INTEL_ICELAKE",
            "type": "CUBE",
            "placementGroupId": null,
            "nicMultiQueue": true
          },
          "entities": {
            "cdroms": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "image",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "description": "The image/snapshot of Ubuntu ",
                    "location": "us/las",
                    "size": 100,
                    "cpuHotPlug": true,
                    "cpuHotUnplug": true,
                    "ramHotPlug": true,
                    "ramHotUnplug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "discScsiHotPlug": true,
                    "discScsiHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "imageType": "HDD",
                    "public": true,
                    "imageAliases": [
                      "text"
                    ],
                    "cloudInit": "V1"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "volumes": {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
                  "type": "volume",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My resource",
                    "type": "HDD",
                    "size": 100,
                    "availabilityZone": "AUTO",
                    "image": "d6ad1576-fde9-4696-aa41-1ebd75bdaf49",
                    "imagePassword": "mypass123",
                    "imageAlias": "text",
                    "sshKeys": [
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/4JNoFQBsaGV974hDmloS5LOvSJjKpXs8Ed437ln712345",
                      "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCyWh6LZ7f2wxnupVgtK2096bc69Vv9uT2A58lwN3ol0A6mxqlT0f4M1NbarVUxa+MVdxBLud5PvlkbYc9mY91OyzLGZMfVWvhAYz/tJSsDtsgRUl0GFVv332zDWk0i+mAVy0N408OORm5XqV6zvIDaiB/jopyjemUp2rnP7pXU4+98ilZw6ef9DF9y4YZ64mchL5//rcrGm1Lff3pC75X/polGONHeG6m4Vs8eIu+0epJ4PJBxO+rwRYp1zMnn90UCk21KvTcYops2cte7ouXQwkGUq3vmXxnSdvuivK/asdfghjkjhyutry545tgvbn76e4rf43"
                    ],
                    "bus": "VIRTIO",
                    "licenceType": "LINUX",
                    "applicationType": "MSSQL-2019-Standard",
                    "cpuHotPlug": true,
                    "ramHotPlug": true,
                    "nicHotPlug": true,
                    "nicHotUnplug": true,
                    "discVirtioHotPlug": true,
                    "discVirtioHotUnplug": true,
                    "exposeSerial": true,
                    "requireLegacyBios": true,
                    "deviceNumber": 3,
                    "pciSlot": 7,
                    "backupunitId": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "userData": "text",
                    "bootServer": "25f67991-0f51-4efc-a8ad-ef1fb31a481c",
                    "bootOrder": "AUTO"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            },
            "nics": "[Circular Reference]",
            "securitygroups": "[Circular Reference]",
            "gpus": {
              "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
              "type": "collection",
              "href": "<RESOURCE-URI>",
              "items": [
                {
                  "id": "25f67991-0f51-4efc-a8ad-ef1fb31a400c",
                  "type": "gpu",
                  "href": "<RESOURCE-URI>",
                  "metadata": {
                    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                    "createdDate": "2015-12-04T14:34:09.809Z",
                    "createdBy": "[email protected]",
                    "createdByUserId": "[email protected]",
                    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                    "lastModifiedBy": "[email protected]",
                    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                    "state": "AVAILABLE"
                  },
                  "properties": {
                    "name": "My GPU",
                    "vendor": "NVIDIA",
                    "model": "A100",
                    "type": "passthrough"
                  }
                }
              ],
              "offset": 0,
              "limit": 1000,
              "_links": {
                "prev": "<PREVIOUS-PAGE-URI>",
                "self": "<THIS-PAGE-URI>",
                "next": "<NEXT-PAGE-URI>"
              }
            }
          }
        }
      ],
      "offset": 0,
      "limit": 1000,
      "_links": {
        "prev": "<PREVIOUS-PAGE-URI>",
        "self": "<THIS-PAGE-URI>",
        "next": "<NEXT-PAGE-URI>"
      }
    }
  }
}

List Security Group rules

get

List all rules for the specified Security Group.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the security group.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
offsetinteger · int32Optional

The first element (from the complete list of the elements) to include in the response (used together with limit for pagination).

Default: 0
limitinteger · int32 · min: 1 · max: 10000Optional

The maximum number of elements to return (use together with offset for pagination).

Default: 1000
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "firewall-rule",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My resource",
        "protocol": "TCP",
        "sourceMac": "00:0a:95:9d:68:16",
        "ipVersion": "IPv4",
        "sourceIp": "22.231.113.64",
        "targetIp": "22.231.113.64",
        "icmpCode": 0,
        "icmpType": 8,
        "portRangeStart": 8,
        "portRangeEnd": 8,
        "type": "INGRESS"
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Create Firewall rule to a Security Group

post

Create one firewall rule and attach it to the existing security group

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center

securityGroupIdstringRequired

The unique ID of the security group.

Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: firewall-rule
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
200
Successful operation
application/json
post
POST /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules HTTP/1.1
Host: api.ionos.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 275

{
  "type": "firewall-rule",
  "metadata": {},
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "firewall-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}

Retrieve security group rule by id

get

Retrieve the properties of the specified Security Group rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the Security Group.

ruleIdstringRequired

The unique ID of the Security Group rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Responses
200
Successful operation
application/json
get
GET /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Accept: */*
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "firewall-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}

Modify a Security Group Rule

put

Modifies the properties of the specified Security Group Rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the security group.

ruleIdstringRequired

The unique ID of the Security Group Rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
idstringRead-onlyOptional

The resource's unique identifier.

Example: 15f67991-0f51-4efc-a8ad-ef1fb31a480c
typeall ofOptional

The type of object that has been created.

Example: firewall-rule
string · enumOptionalPossible values:
hrefstring · uriRead-onlyOptional

URL to the object representation (absolute path).

Example: <RESOURCE-URI>
Responses
202
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 275

{
  "type": "firewall-rule",
  "metadata": {},
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "firewall-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}

Remove a Firewall Rule from a Security Group

delete

Removes the specific Firewall Rule from the Security Group and delete the Firewall rule

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center

securityGroupIdstringRequired

The unique ID of the security group.

ruleIdstringRequired

The unique ID of the firewall rule.

Responses
202
Accepted. The request has been accepted for processing.
delete
DELETE /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} HTTP/1.1
Host: api.ionos.com
Authorization: YOUR_API_KEY
Accept: */*

No content

Partially modify Security Group Rules

patch

Update the properties of the specified Security Group rule.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

securityGroupIdstringRequired

The unique ID of the security group.

ruleIdstringRequired

The unique ID of the Security Group Rule.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
namestringOptional

The name of the resource.

Example: My resource
protocolstring · enumRequired

The protocol for the rule. Property cannot be modified after it is created (disallowed in update requests).

Example: TCPPossible values:
sourceMacstring | nullableOptional

Only traffic originating from the respective MAC address is allowed. Valid format: aa:bb:cc:dd:ee:ff. Value null allows traffic from any MAC address.

Example: 00:0a:95:9d:68:16
ipVersionstring · enum | nullableOptional

The IP version for this rule. If sourceIp or targetIp are specified, you can omit this value - the IP version will then be deduced from the IP address(es) used; if you specify it anyway, it must match the specified IP address(es). If neither sourceIp nor targetIp are specified, this rule allows traffic only for the specified IP version. If neither sourceIp, targetIp nor ipVersion are specified, this rule will only allow IPv4 traffic.

Example: IPv4Possible values:
sourceIpstring | nullableOptional

Only traffic originating from the respective IP address (or CIDR block) is allowed. Value null allows traffic from any IP address (according to the selected ipVersion).

Example: 22.231.113.64
targetIpstring | nullableOptional

If the target NIC has multiple IP addresses, only the traffic directed to the respective IP address (or CIDR block) of the NIC is allowed. Value null allows traffic to any target IP address (according to the selected ipVersion).

Example: 22.231.113.64
icmpCodeinteger · int32 | nullableOptional

Defines the allowed code (from 0 to 254) if protocol ICMP or ICMPv6 is chosen. Value null allows all codes.

Example: 0
icmpTypeinteger · int32 | nullableOptional

Defines the allowed type (from 0 to 254) if the protocol ICMP or ICMPv6 is chosen. Value null allows all types.

Example: 8
portRangeStartinteger · int32 · min: 1 · max: 65535Optional

Defines the start range of the allowed port (from 1 to 65535) if protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd value null to allow all ports.

Example: 8
portRangeEndinteger · int32 · min: 1 · max: 65535Optional

Defines the end range of the allowed port (from 1 to 65535) if the protocol TCP or UDP is chosen. Leave portRangeStart and portRangeEnd null to allow all ports.

Example: 8
typestring · enumOptional

The type of the firewall rule. If not specified, the default INGRESS value is used.

Example: INGRESSPossible values:
Responses
202
Successful operation
application/json
patch
PATCH /cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}/rules/{ruleId} HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 223

{
  "name": "My resource",
  "protocol": "TCP",
  "sourceMac": "00:0a:95:9d:68:16",
  "ipVersion": "IPv4",
  "sourceIp": "22.231.113.64",
  "targetIp": "22.231.113.64",
  "icmpCode": 0,
  "icmpType": 8,
  "portRangeStart": 8,
  "portRangeEnd": 8,
  "type": "INGRESS"
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "firewall-rule",
  "href": "<RESOURCE-URI>",
  "metadata": {
    "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
    "createdDate": "2015-12-04T14:34:09.809Z",
    "createdBy": "[email protected]",
    "createdByUserId": "[email protected]",
    "lastModifiedDate": "2015-12-04T14:34:09.809Z",
    "lastModifiedBy": "[email protected]",
    "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
    "state": "AVAILABLE"
  },
  "properties": {
    "name": "My resource",
    "protocol": "TCP",
    "sourceMac": "00:0a:95:9d:68:16",
    "ipVersion": "IPv4",
    "sourceIp": "22.231.113.64",
    "targetIp": "22.231.113.64",
    "icmpCode": 0,
    "icmpType": 8,
    "portRangeStart": 8,
    "portRangeEnd": 8,
    "type": "INGRESS"
  }
}

Attach a list of Security Groups to a Server

put

Updating the list of Security Groups attached to an existing server specified by its ID. Security Groups should already exist as part of the datacenter.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
idsstring · uuid[]Required

The list of IDs

Example: ["ac51b8e4-050c-4941-b7cd-43923422fe6e","ea737d87-8754-4a42-b97c-0b1a8f619de5"]
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/securitygroups HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 87

{
  "ids": [
    "ac51b8e4-050c-4941-b7cd-43923422fe6e",
    "ea737d87-8754-4a42-b97c-0b1a8f619de5"
  ]
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "security-group",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My security group",
        "description": "My security group description"
      },
      "entities": {
        "rules": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "firewall-rule",
              "href": "<RESOURCE-URI>",
              "metadata": {
                "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                "createdDate": "2015-12-04T14:34:09.809Z",
                "createdBy": "[email protected]",
                "createdByUserId": "[email protected]",
                "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                "lastModifiedBy": "[email protected]",
                "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                "state": "AVAILABLE"
              },
              "properties": {
                "name": "My resource",
                "protocol": "TCP",
                "sourceMac": "00:0a:95:9d:68:16",
                "ipVersion": "IPv4",
                "sourceIp": "22.231.113.64",
                "targetIp": "22.231.113.64",
                "icmpCode": 0,
                "icmpType": 8,
                "portRangeStart": 8,
                "portRangeEnd": 8,
                "type": "INGRESS"
              }
            }
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "nics": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "servers": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        }
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Attach a list of Security Groups to a NIC

put

Updating the list of Security Groups attached to an existing NIC specified by its ID. Security Groups should already exist as part of the datacenter.

Authorizations
Path parameters
datacenterIdstringRequired

The unique ID of the data center.

serverIdstringRequired

The unique ID of the server.

nicIdstringRequired

The unique ID of the server.

Query parameters
prettybooleanOptional

Controls whether the response is pretty-printed (with indentations and new lines).

Default: true
depthinteger · int32 · max: 10Optional

Controls the detail depth of the response objects. GET /datacenters/[ID]

  • depth=0: Only direct properties are included; children (servers and other elements) are not included.
  • depth=1: Direct properties and children references are included.
  • depth=2: Direct properties and children properties are included.
  • depth=3: Direct properties and children properties and children's children are included.
  • depth=... and so on
Default: 0
Body
idsstring · uuid[]Required

The list of IDs

Example: ["ac51b8e4-050c-4941-b7cd-43923422fe6e","ea737d87-8754-4a42-b97c-0b1a8f619de5"]
Responses
200
Successful operation
application/json
put
PUT /cloudapi/v6/datacenters/{datacenterId}/servers/{serverId}/nics/{nicId}/securitygroups HTTP/1.1
Host: api.ionos.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 87

{
  "ids": [
    "ac51b8e4-050c-4941-b7cd-43923422fe6e",
    "ea737d87-8754-4a42-b97c-0b1a8f619de5"
  ]
}
{
  "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
  "type": "collection",
  "href": "<RESOURCE-URI>",
  "items": [
    {
      "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
      "type": "security-group",
      "href": "<RESOURCE-URI>",
      "metadata": {
        "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
        "createdDate": "2015-12-04T14:34:09.809Z",
        "createdBy": "[email protected]",
        "createdByUserId": "[email protected]",
        "lastModifiedDate": "2015-12-04T14:34:09.809Z",
        "lastModifiedBy": "[email protected]",
        "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
        "state": "AVAILABLE"
      },
      "properties": {
        "name": "My security group",
        "description": "My security group description"
      },
      "entities": {
        "rules": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            {
              "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
              "type": "firewall-rule",
              "href": "<RESOURCE-URI>",
              "metadata": {
                "etag": "45480eb3fbfc31f1d916c1eaa4abdcc3",
                "createdDate": "2015-12-04T14:34:09.809Z",
                "createdBy": "[email protected]",
                "createdByUserId": "[email protected]",
                "lastModifiedDate": "2015-12-04T14:34:09.809Z",
                "lastModifiedBy": "[email protected]",
                "lastModifiedByUserId": "63cef532-26fe-4a64-a4e0-de7c8a506c90",
                "state": "AVAILABLE"
              },
              "properties": {
                "name": "My resource",
                "protocol": "TCP",
                "sourceMac": "00:0a:95:9d:68:16",
                "ipVersion": "IPv4",
                "sourceIp": "22.231.113.64",
                "targetIp": "22.231.113.64",
                "icmpCode": 0,
                "icmpType": 8,
                "portRangeStart": 8,
                "portRangeEnd": 8,
                "type": "INGRESS"
              }
            }
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "nics": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        },
        "servers": {
          "id": "15f67991-0f51-4efc-a8ad-ef1fb31a480c",
          "type": "collection",
          "href": "<RESOURCE-URI>",
          "items": [
            "[Circular Reference]"
          ],
          "offset": 0,
          "limit": 1000,
          "_links": {
            "prev": "<PREVIOUS-PAGE-URI>",
            "self": "<THIS-PAGE-URI>",
            "next": "<NEXT-PAGE-URI>"
          }
        }
      }
    }
  ],
  "offset": 0,
  "limit": 1000,
  "_links": {
    "prev": "<PREVIOUS-PAGE-URI>",
    "self": "<THIS-PAGE-URI>",
    "next": "<NEXT-PAGE-URI>"
  }
}

Was this helpful?