Security Groups

Create an API Key and access token:-

For create a API Key and Access Token to refer this link :-

https://www.e2enetworks.com/help/knowledge-base/how-to-create-an-api-access-token/

List of Security Groups-

To find a list of Security Groups to send a GET request

https://api.e2enetworks.com/myaccount/api/v1/security_group/?apikey={{API_KEY}}&contact_person_id=null&location=Delhi

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Response Headers:-

content-type: application/json; charset=utf-8
status: 202 Accepted

Body

Response Body

Create a new Security Groups

To create a Security Groups , send a Post request :-

https://api.e2enetworks.com/myaccount/api/v1/security_group/?apikey={{API_KEY}}&contact_person_id=null&location=Delhi

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Response Headers:-

content-type: application/json; charset=utf-8
status: 202 Accepted

Body

Request Body-

{
 "name": "security_group_rule",
 "description": "",
 "rules":[
   {
      "network": "any",
      "rule_type": "Inbound",
      "protocol_name": "Custom_TCP",
      "port_range": "21,22"
    },
   {
   "network": "any",
   "rule_type": "Inbound",
   "protocol_name": "All_UDP",
   "port_range":  "All"
    },
   {
   "network" : "any",
   "rule_type" : "Outbound",
   "protocol_name" : "All",
   "port_range" : "All"
   }
   ],
"default": false
}

Response Body

{
    "code": 200,
    "data": {
        "resource_type": null,
        "label_id": null
    },
    "errors": {},
    "message": "Security Group created successfully."
}

Delete Security Groups

To delete a Security Groups , send a DELETE request to Security Groups endpoint :-

https://api.e2enetworks.com/myaccount/api/v1/security_group/{{ID}}/?apikey={{api_key}}&contact_person_id=null&location=Delhi

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Response Headers:-

content-type: application/json; charset=utf-8
status: 202 Accepted

Body

Request Body-

{
"code": 200,
"data": "",
"errors": {},
"message": "Security Group deleted successfully."
}

make default Security Groups-

To Make a default Security Groups to send a Post request:-

https://api.e2enetworks.com/myaccount/api/v1/security_group/{{ID}}/mark-default/?apikey={{api_key}}&contact_person_id=null

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Response Headers:-

content-type: application/json; charset=utf-8
status: 202 Accepted

Body

Response Body

    {
    "code": 200,
    "data": "",
    "errors": {},
    "message": "Security Group mark default successfully."
}

Update Security Groups

To Update a Security Groups , send a Put request :-

https://api.e2enetworks.com/myaccount/api/v1/security_group/{{ID}}/?apikey={{api_key}}&contact_person_id=null

Headers

Request Headers

Content-Type: application/json
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAi...

Response Headers:-

content-type: application/json; charset=utf-8
status: 202 Accepted

Body

Request Body-

        {
    "name": "security_group_rule",
    "description": "",
    "rules": [
        {
            "id": 87287,
            "deleted": false,
            "created_at": "2023-07-10T11:41:42.630777Z",
            "updated_at": "2023-07-10T11:41:42.630832Z",
            "rule_type": "Outbound",
            "protocol_name": "All",
            "port_range": "All",
            "network": "any",
            "network_cidr": "--",
            "network_size": 1,
            "is_active": true,
            "security_group": 41181
        },
        {
            "network": "any",
            "rule_type": "Inbound",
            "protocol_name": "Custom_TCP",
            "port_range": "10,11,11,12"
        },
        {
            "network": "any",
            "rule_type": "Inbound",
            "protocol_name": "All_UDP",
            "port_range": "All"
        }
    ]
}

Response Body

        {
    "code": 200,
    "data": "",
    "errors": {},
    "message": "Security Group updated successfully."
}