DBaas

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 DbaaS-

To find a list of DbaaS to send a GET request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/?apikey={api_key}&location=Delhi

The request returns a JSON object that contains the following attributes:

Name

Type

Description

public_ip_address

Integer

Information regarding the network configuration.

id

Integer

A unique integer identifier created and assigned to the Database after its creation.

name

string

The name assigned to the database.

username

string

The username assigned to the database when it’s created.

created_at

Integer

A string represents both the date and time when the Dbaas is created.

status

string

A string that denotes the status of the Database.

private_ip_address

Integer

Information regarding the network configuration.

vm_id

Integer

A unique integer identifier created and assigned to the Database after its creation.

node_id

Integer

A unique integer identifier created and assigned to the Database after its creation

cluster_id

Integer

A unique integer identifier created and assigned to the Database after its

creation

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
             'Authorization': 'api_token ',
         }
   conn.request("GET", "/myaccount/api/v1/rds/cluster/?apikey={{api_key}}&location=Delhi", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

    import requests

    url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/?apikey={{api_key}}&location=Delhi"

    payload={}
    headers = {
            'Authorization': 'api_token ',
         }

    response = requests.request("GET", url, headers=headers, data=payload)

    print(response.text)

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": [
      {
          "id": 775,
          "name": "name_of_DB",
          "status": "RUNNING",
          "status_title": "Running",
          "status_actions": [
              "delete",
              "stop",
              "restart",
              "manual-snapshot",
              "restore-snapshot"
          ],
          "num_instances": 1,
          "software": {
              "name": "MySQL",
              "version": "5.6",
              "engine": "Innodb"
          },
          "master_node": {
              "instance_id": 1443,
              "cluster_id": 775,
              "node_id": 91319,
              "vm_id": 102182,
              "port": "3306",
              "public_ip_address": "164.52.209.3",
              "private_ip_address": "172.16.119.199",
              "allowed_ip_address": {
                  "whitelisted_ips": [],
                  "temp_ips": [],
                  "whitelisting_in_progress": false
              },
              "zabbix_host_id": 94885,
              "database": {
                  "id": 775,
                  "username": "Username",
                  "database": "name_of_DB",
                  "pg_detail": {}
              },
              "ram": "8 GB",
              "cpu": "2",
              "disk": "100 GB",
              "status": "Running",
              "db_status": "Running",
              "created_at": "05/Apr/2022 03:43 PM",
              "plan": {
                  "name": "DBS.8GB_MySQL_56",
                  "price": "Rs 4/Hour or Rs 2920 Monthly",
                  "template_id": 27,
                  "ram": "8",
                  "cpu": "2",
                  "disk": "100"
              }
          },
          "connectivity_detail": "{'read_end_point': [{'ip': '164.52.209.3', 'port': 3307}, {'ip': '172.16.119.199', 'port': 3307}], 'read_and_write_end_point': [{'ip': '164.52.209.3', 'port': 3306}, {'ip': '172.16.119.199', 'port': 3306}], 'status': 'updated', 'type': 1}"
      }
  ],
  "errors": {},
  "message": "Success"
}

Create a new DbaaS-

To create a DbaaS to send a Post request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/?apikey={api_key}&location=Delhi

Attributes and respective values required to send this POST request are:

Name

Type

Description

Required

password

char

Assigned the password to the database.

True

Name

string

The name assigned to the Database.

True

user

string

Assign the user name to the database

True

The request returns a JSON object that contains the following attributes:

Name

Type

Description

public_ip_address

Integer

Information regarding the network configuration.

id

Integer

A unique integer identifier created and assigned to the Database after its creation.

name

string

The name assigned to the database.

username

string

The username assigned to the database when it’s created.

created_at

Integer

A string represents both the date and time when the Dbaas is created.

status

string

A string that denotes the status of the Database.

private_ip_address

Integer

Information regarding the network configuration.

vm_id

Integer

A unique integer identifier created and assigned to the Database after its creation.

node_id

Integer

A unique integer identifier created and assigned to the Database after its creation

cluster_id

Integer

A unique integer identifier created and assigned to the Database after its

creation

PYTHON

1. Python - http.client Example

   import http.client
   import json

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = json.dumps({
       "database": {
           "name": "nameofdatabase",
           "password": "Password123@",
          "user": "username"
           },
      "group": "Default",
      "name": "nameofdatabase",
      "software_id": 2,
      "template_id": 27
       })
   headers = {
             'Authorization': 'API_Token ',
             'Content-Type': 'application/json',
  conn.request("POST", "/myaccount/api/v1/rds/cluster/?apikey={{api_key}}&location=Delhi", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
2. Python - Requests Example

    import requests
    import json

    url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/?apikey={{api_key}}&location=Delhi"

    payload = json.dumps({
         "database": {
         "name": "nameofdatabase",
         "password": "Password123@",
        "user": "username"
        },
     "group": "Default",
     "name": "username",
     "software_id": 2,
     "template_id": 27
    })
    headers = {
            'Authorization': 'API_Token ',
            'Content-Type': 'application/json',
            }

     response = requests.request("POST", url, headers=headers, data=payload)

     print(response.text)

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-

{
  "database": {
      "name": "nameofdb",
      "password": "Password@123",
      "user": "provideusername"
  },
  "group": "Default",
  "name": "nameofdb",
  "software_id": 2,
  "template_id": 27

}

Response Body

{
  "code": 200,
  "data": {
      "id": 780,
      "name": "name_of _DB",
      "status": "CREATING",
      "status_title": "Creating",
      "status_actions": [
          "delete"
      ],
      "num_instances": 1,
      "software": {
          "name": "MySQL",
          "version": "5.6",
          "engine": "Innodb"
      },
      "master_node": {
          "instance_id": 1453,
          "cluster_id": 780,
          "node_id": 91686,
          "vm_id": 102560,
          "port": "3306",
          "public_ip_address": "164.52.209.187",
          "private_ip_address": "172.16.112.40",
          "allowed_ip_address": {
              "whitelisted_ips": [],
              "temp_ips": [],
              "whitelisting_in_progress": false
          },
          "zabbix_host_id": null,
          "database": {
              "id": 780,
              "username": "Provide_username",
              "database": "Name_of_DB",
              "pg_detail": {}
          },
          "ram": "8 GB",
          "cpu": "2",
          "disk": "100 GB",
          "status": "Creating",
          "db_status": "Creating",
          "created_at": "11/Apr/2022 12:29 PM",
          "plan": {
              "name": "DBS.8GB_MySQL_56",
              "price": "Rs 4/Hour or Rs 2920 Monthly",
              "template_id": 27,
              "ram": "8",
              "cpu": "2",
              "disk": "100"
          }
      },
      "connectivity_detail": "{'read_end_point': [], 'read_and_write_end_point': [], 'status': 'updating', 'type': 1}"
  },
  "errors": {},
  "message": "Success"
}

Delete a DbaaS -

To delete a DbaaS to send a DELETE request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/780/?apikey={api_key}

The request returns a JSON object that contains the following attributes:

Name

Type

Description

name

string

The name assigned to the Database it’s time for creation.

cluster_id

integer

A unique integer identifier created and assigned to the Database after its creation

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
            'Authorization': 'api_token ',
        }
   conn.request("DELETE", "/myaccount/api/v1/rds/cluster/{{id}}/?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

    import requests

    url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/?apikey={{api_key}}"

    payload={}
    headers = {
              'Authorization': 'api_token ',
               }

    response = requests.request("DELETE", url, headers=headers, data=payload)

    print(response.text)

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": {
      "cluster_id": "780",
      "name": "Name_of_DB"
  },
  "errors": {},
  "message": "Success"
}

Take a Snapshot -

To take snapshot of DbaaS to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/snapshot?apikey={api_key}

Attributes and respective values required to send this POST request are:

Name

Type

Description

Required

Name

string

Name is assigned to take a snapshot

True

The request returns a JSON object that contains the following attributes:


1. Python - http.client Example

   import http.client
   import json

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = json.dumps({
            "name": "sanap3"
          })
    headers = {
            'Authorization': 'api_token ',
            'Content-Type': 'application/json',
            }
    conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/snapshot?apikey={{api_key}}", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

    url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/snapshot?apikey={{api_key}}"

    payload = json.dumps({
           "name": "sanap3"
            })
    headers = {
            'Authorization': 'api_token ',
            'Content-Type': 'application/json',
          }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)

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": "sanap3"
}

Response Body

{
  "code": 200,
  "data": {
      "snapshot_id": 2,
      "snapshot_details": {
          "name": "sanap3",
          "date": "2022-04-11T07:13:07Z",
          "size": "95367",
          "snapshot_id": "2"
      },
      "cluster_id": 775,
      "name": "name_of_db"
  },
  "errors": {},
  "message": "Manual Snapshot in Process."
}

Reset a Password of DataBase-

To Reset a Password of DbaaS to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/reset-password/?apikey={api_key}

Attributes and respective values required to send this POST request are:

Name

Type

Description

Required

password

char

Assign the password to the database

True

username

string

Provide username of the database

true

The request returns a JSON object that contains the following attributes:

Name

Type

Description

Name

string

The name assigned to the Database it’s time for creation.

cluster_id

integer

A unique integer identifier created and assigned to the Database after its creation

PYTHON

1. Python - http.client Example

   import http.client
   import json

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = json.dumps({
                 "password": "Password@123",
                 "username": "username"
                })
    headers = {
             'Authorization': 'Api_token',
             'Content-Type': 'application/json',
           }
    conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/reset-password/?apikey={{api_key}}", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/reset-password/?apikey={{api_key}}"

   payload = json.dumps({
                    "password": "Password@123",
                    "username": "username"
                   })
   headers = {
            'Authorization': 'Bearer ',
            'Content-Type': 'application/json',
          }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)

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-

{
  "password": "Password@123",
  "username": "provideUsername"
}

Response Body

{
  "code": 200,
  "data": {
      "cluster_id": "775",
      "name": "nameofdatabase"
  },
  "errors": {},
  "message": "User password reset in process we will notify once password is updated."

}

Stop Database

To stop a service of Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/shutdown?apikey={api_key}

The request returns a JSON object that contains the following attributes:

Name

Type

Description

Name

string

The name assigned to the Database it’s time for creation.

cluster_id

integer

A unique integer identifier created and assigned to the Database after its creation

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
               'Authorization': 'Bearer ',
           }
    conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/shutdown?apikey={{api_key}}", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
2. Python - Requests Example

   import requests

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/shutdown?apikey={{api_key}}"

   payload={}
   headers = {
               'Authorization': 'api_token ',
            }

    response = requests.request("POST", url, headers=headers, data=payload)

    print(response.text)

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": {
      "message": "Shutdown process started.",
      "cluster_id": "775",
      "name": "shubha"
  },
  "errors": {},
  "message": "Success"
}

Start Database

To start a service of Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/resume?apikey={api_key}

The request returns a JSON object that contains the following attributes:

Name

Type

Description

Name

string

The name assigned to the Database it’s time for creation.

cluster_id

integer

A unique integer identifier created and assigned to the Database after its creation

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
                'Authorization': 'api_tokrn ',
           }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/resume?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

   import requests

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/resume?apikey={{api_key}}"

   payload={}
   headers = {
                'Authorization': 'api_token ',
            }

    response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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": {
      "message": "Resume process started.",
      "cluster_id": "775",
      "name": "nameofDatabase"
  },
  "errors": {},
  "message": "Success"
}

Restart Database -

To Restart a Database to send a POST request

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/restart?apikey={api_key}

The request returns a JSON object that contains the following attributes:

Name

Type

Description

Name

string

The name assigned to the Database it’s time for creation.

cluster_id

integer

A unique integer identifier created and assigned to the Database after its creation

PYTHON

1. Python - http.client Example

   import http.client

    conn = http.client.HTTPSConnection("api.e2enetworks.com")
    payload = ''
    headers = {
                'Authorization': 'api_token ',
               }
     conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/restart?apikey={{api_key}}", payload, headers)
    res = conn.getresponse()
    data = res.read()
    print(data.decode("utf-8"))
2. Python - Requests Example

   import requests

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/restart?apikey={{api_key}}"

   payload={}
   headers = {
                'Authorization': 'api_token',
              }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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": {
      "message": "Reboot process started.",
      "cluster_id": "775",
      "name": "nameofdatabase"
  },
  "errors": {},
  "message": "Success"
}

Attach Parameter group to Database

To Attach Parameter group to Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/parameter-group/52/add?apikey={api_key}

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
                 'Authorization': 'api_token',
              }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/775/parameter-group/52/add?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

   import requests

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/parameter-group/{{id}}/add?apikey={{api_key}}"

   payload={}
   headers = {
             'Authorization': 'api_token',
         }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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": "Success"
}

Detach Parameter group to Database

To Detach Parameter group to Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/parameter-group/52/detach?apikey={api_key}

PYTHON

1. Python - http.client Example

   import http.client

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
                 'Authorization': 'api_token',
              }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/parameter-group/52/detach?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

   import requests

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/parameter-group/52/detach?apikey={{api_key}}"


   payload={}
   headers = {
             'Authorization': 'api_token',
         }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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": "Success"
}

Attach VPC to Database

To Attach VPC to Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/vpc-attach/?apikey={api_key}&location=Delhi

Attributes and respective values required to send this POST request are:-

Name

Type

Description

Required

action

string

A string that denotes the type: “Attach” or “Detach”

True

network_id

integer

A unique integer identifier created and assigned to the Vpc it’s time to create.

True

The request returns a JSON object that contains the following attributes:

Name

Type

Description

vpc_id

Type

A unique integer identifier created and assigned to the VPC after its creation

vpc_name

string

The name was assigned to the VPC after its creation.

PYTHON

1. Python - http.client Example

  import http.client
  import json

  conn = http.client.HTTPSConnection("api.e2enetworks.com")
  payload = json.dumps({
            "action": "attach",
            "network_id": "7218"
          })
   headers = {
            'Authorization': 'api_token',
            'Content-Type': 'application/json',
          }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/vpc-attach/?apikey={{api_key}}&location=Delhi", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/vpc-attach/?apikey={{api_key}}&location=Delhi"

   payload = json.dumps({
                   "action": "attach",
                   "network_id": "7218"
                     })
   headers = {
                'Authorization': 'api_token',
                'Content-Type': 'application/json',
               }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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-

{
  "action": "attach",
  "network_id": "7218"
}

Response Body

{
  "code": 200,
  "data": {
      "vpc_id": 624,
      "vpc_name": "VPC-236"
  },
  "errors": {},
  "message": "VPC attach operation successfully done"
}

Detach VPC to Database

To Detach VPC to Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/vpc-attach/?apikey={api_key}&location=Delhi

Attributes and respective values required to send this POST request are:

Name

Type

Description

Required

action

string

A string that denotes the type: “Attach” or “Detach”

True

network_id

integer

A unique integer identifier created and assigned to the Vpc it’s time to create.

True

The request returns a JSON object that contains the following attributes:

Name

Type

Description

vpc_id

Type

A unique integer identifier created and assigned to the VPC after its creation

vpc_name

string

The name was assigned to the VPC after its creation.

PYTHON

1. Python - http.client Example

  import http.client
  import json

  conn = http.client.HTTPSConnection("api.e2enetworks.com")
  payload = json.dumps({
            "action": "detach",
            "network_id": 7218
          })
   headers = {
            'Authorization': 'api_token',
            'Content-Type': 'application/json',
          }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/vpc-detach/?apikey={{api_key}}&location=Delhi", payload, headers)
  res = conn.getresponse()
  data = res.read()
  print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/vpc-detach/?apikey={{api_key}}&location=Delhi"

   payload = json.dumps({
                   "action": "detach",
                   "network_id": 7218
                     })
   headers = {
                'Authorization': 'api_token',
                'Content-Type': 'application/json',
               }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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-

{
  "action": "detach",
  "network_id": 7218
}

Response Body

{
  "code": 200,
  "data": {
      "vpc_id": 624,
      "vpc_name": "VPC-236"
  },
  "errors": {},
  "message": "VPC detach operation successfully done"
}

Enable Backup

To Enable Backup Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/enable-backup?apikey={api_key}

Name

Type

Description

Required

access_key

Char

Description

Required

bucket_location

char

Provide bucket name

True

secret_key

char

True

PYTHON

1. Python - http.client Example

  import http.client
  import json

  conn = http.client.HTTPSConnection("api.e2enetworks.com")
  payload = json.dumps({
                 "access_key": "60KK0NBIS9GXXTYFA14XVABGS6B1ZGG71ABNBRAH",
                 "bucket_location": "bucket_name",
                 "secret_key": "8KU3CIOUGX8BUEDA9NO4"
                    })
   headers = {
            'Authorization': 'api_token',
            'Content-Type': 'application/json',
          }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/enable-backup?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/enable-backup?apikey={{api_key}}"

   payload = json.dumps({
                 "access_key": "60KK0NBIS9GXXTYFA14XVABGS6B1ZGG71ABNBRAH",
                 "bucket_location": "bucket_name",
                 "secret_key": "8KU3CIOUGX8BUEDA9NO4"
                    })
   headers = {
                'Authorization': 'api_token',
                'Content-Type': 'application/json',
               }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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-

{
  "access_key": "60KK0NBIS9GXXTYFA14XVABGS6B1ZGG71ABNBRAH",
  "bucket_location": "nameofbucket",
  "secret_key": "8KU3CIOUGX8BUEDA9NO4"
}

Response Body

{
  "code": 200,
  "data": {},
  "errors": {},
  "message": "Success"
}

Disable Backup

To Disable Backup Database to send a POST request-

https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/775/disable-backup?apikey={{api_key}}

PYTHON

1. Python - http.client Example

  import http.client
  import json

   conn = http.client.HTTPSConnection("api.e2enetworks.com")
   payload = ''
   headers = {
            'Authorization': 'api_token',
            'Content-Type': 'application/json',
          }
   conn.request("POST", "/myaccount/api/v1/rds/cluster/{{id}}/disable-backup?apikey={{api_key}}", payload, headers)
   res = conn.getresponse()
   data = res.read()
   print(data.decode("utf-8"))
2. Python - Requests Example

   import requests
   import json

   url = "https://api.e2enetworks.com/myaccount/api/v1/rds/cluster/{{id}}/disable-backup?apikey={{api_key}}"

   payload = ''
   headers = {
                'Authorization': 'api_token',
                'Content-Type': 'application/json',
               }

   response = requests.request("POST", url, headers=headers, data=payload)

   print(response.text)

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": "Success"
}