---
title: Supprimer un groupe de sécurité
slug: supprimer-un-groupe-de-securite
docTags: 
createdAt: 2026-06-04T15:50:56.155Z
---

{
  "id": "PNbr1aPeEc2RXjuiEbDbe",
  "type": "api-oas-v2",
  "data": {
    "method": "DELETE",
    "url": "https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}",
    "servers": [
      {
        "url": "https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}"
      }
    ],
    "name": "Delete a Security Group",
    "description": "Deletes the specified Security Group.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "datacenterId",
          "type": "string",
          "description": "The unique ID of the data center."
        },
        {
          "kind": "required",
          "name": "securityGroupId",
          "type": "string",
          "description": "The unique ID of the Security Group."
        }
      ],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [
        {
          "kind": "optional",
          "name": "pretty",
          "type": "boolean",
          "description": "<p>Controls whether the response is pretty-printed (with indentations and new lines).</p>",
          "default": true
        }
      ],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "TokenAuthentication",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Please provide header value as 'Bearer ' and don't forget to add 'Bearer' HTTP Authorization Scheme before the token.</p>",
          "in": "header"
        },
        {
          "id": "BasicAuthentication",
          "name": "BasicAuthentication",
          "kind": "optional",
          "type": "http",
          "description": "<p>You will need to base64 encode the string containing your credentials. \nNote:\n\n</p>",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "202",
        "description": "Accepted. The request has been accepted for processing.",
        "jsonExample": "",
        "isExpanded": true,
        "headers": [
          {
            "kind": "optional",
            "name": "X-RateLimit-Remaining",
            "type": "integer<int32>",
            "description": "The number of requests that can still be made without triggering a rate limit.",
            "format": "int32"
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Limit",
            "type": "integer<int32>",
            "description": "The average number of requests per minute allowed.",
            "format": "int32"
          },
          {
            "kind": "optional",
            "name": "X-RateLimit-Burst",
            "type": "integer<int32>",
            "description": "The maximum number of concurrent requests allowed.",
            "format": "int32"
          },
          {
            "kind": "optional",
            "name": "Location",
            "type": "string",
            "description": "Callback URL to poll async operation status.",
            "pattern": "https://[apiBaseUri]/requests/[requestId]/status"
          }
        ]
      },
      {
        "statusCode": "default",
        "description": "<p>Any erroneous status code:\n400 (parse error),\n401 (auth error),\n402 (trial access),\n403 (insufficient privileges),\n404 (not found),\n405 (unsupported HTTP method),\n415 (unsupported content type),\n422 (validation error),\n429 (request rate limit exceeded),\n500 (server error),\nor 503 (maintenance).</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Error",
            "schema": [
              {
                "name": "httpStatus",
                "kind": "optional",
                "type": "integer<int32>",
                "readOnly": true,
                "description": "HTTP status code of the operation.",
                "example": 400,
                "format": "int32"
              },
              {
                "name": "messages",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/components/schemas/ErrorMessage",
                "customType": "ErrorMessage[]",
                "schema": [
                  {
                    "name": "errorCode",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "Application internal error code.",
                    "example": "123"
                  },
                  {
                    "name": "message",
                    "kind": "optional",
                    "type": "string",
                    "readOnly": true,
                    "description": "<p>A human-readable message.</p>",
                    "example": "Error message example."
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Error",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "Wn9oo1wmnlACfxKSLtWqj",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request DELETE \\\n     --url 'https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}?pretty=true' \\\n     --header 'accept: application/json'"
        },
        {
          "id": "5edTPYWK7Pk0yghjZ4anA",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'DELETE',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}?pretty=true\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "WQBdFKIHs_scdjF1q4D0h",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}?pretty=true\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Delete.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "H_vSUblYV3rCdmxZNO7Vf",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.ionos.com/cloudapi/v6/datacenters/{datacenterId}/securitygroups/{securityGroupId}?pretty=true\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"DELETE\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "Wn9oo1wmnlACfxKSLtWqj"
    },
    "results": {
      "languages": [
        {
          "id": "VMCsGuQeYHhjwzmSFQnAH",
          "language": "202",
          "code": "// Accepted. The request has been accepted for processing.\n"
        },
        {
          "id": "q4yXdrX65eLh7qYwJ1MR6",
          "language": "default",
          "code": "// Any erroneous status code:\n400 (parse error),\n401 (auth error),\n402 (trial access),\n403 (insufficient privileges),\n404 (not found),\n405 (unsupported HTTP method),\n415 (unsupported content type),\n422 (validation error),\n429 (request rate limit exceeded),\n500 (server error),\nor 503 (maintenance).\n{\n  \"httpStatus\": 400,\n  \"messages\": [\n    {\n      \"errorCode\": \"123\",\n      \"message\": \"Error message example.\"\n    }\n  ]\n}"
        }
      ],
      "selectedLanguageId": "VMCsGuQeYHhjwzmSFQnAH"
    }
  },
  "children": [
    {
      "text": "",
      "id": "PUkKqz-xOeM2M6taGvKCT"
    }
  ]
}