Empower Your Network Automation Efforts with Curl

Transform your network automation with Curl and REST API integration


Secure your network automation with API calls that use SSL Certificates and session tokens.

Automated DDI workflow management provides numerous benefits to large-scale organizations. By minimizing manual tasks and increasing IT productivity, organizations can focus on strategic opportunities that drive business growth. Automation standardizes network management processes, enforces best practices, and rapidly delivers services at scale. This page highlights the importance of curl commands in DDI workflow automation.

Curl is a command-line tool that enables interaction with APIs by sending HTTP requests to a server and receiving responses. HTTP requests are made using different HTTP methods such as GET, POST, PUT, and DELETE, each having a unique functionality like retrieving or creating/updating a resource on the server. The server responds in formats like JSON, XML, or plain text.

In network automation, curl is a popular tool for interacting with web-based APIs and web servers. Its ability to send HTTP requests and retrieve HTTP responses makes it useful for automation tasks that involve making API calls or testing web servers.

Testing REST APIs

  • Developers and network automation engineers can use curl to test REST APIs by sending HTTP requests with different parameters and observing the responses. This can help to identify bugs or performance issues before deploying the API.

Monitoring web servers

  • Curl can be used to monitor the availability and performance of web servers by periodically sending HTTP requests and checking the response status codes and response times.

Automated bulk processing

  • Curl can be used to automate file transfers between servers using FTP or SFTP protocols. For example, you can write a script that uses curl to upload or download files from a remote server at regular intervals.

Integration with other automation tools

  • Curl can be integrated with other automation tools, such as Ansible or Puppet, to automate the deployment and configuration of web applications or APIs.

Network Automation Engineers can leverage the, curl commands are used to invoke TCPWave REST API calls. The basic functionality within the TCPWave IPAM application, including adding organizations, domains, networks, subnets, and objects, can be performed using curl commands. The examples listed below provide an overview of how to invoke the commands.

Adding Organization

  • curl -k -X POST -H ""Content-Type: application/json"" -H 'TIMS-Session-Token: 84d55774-c562-4dcf-9646-ce7fed4dabfd' -d '{ ""name"": ""Internal"", ""enable_root_zone"": ""1"", ""description"": """" }'

Adding Domain

  • curl -k -X POST -H "Content-Type: application/json" -H 'TIMS-Session-Token: ae48de10-8928-47e3-9656-e4788f0aa2e6' -d '{ "name": "curl.com", "description": "curlcom", "organization_name"$ "Internal" }'

Adding Network

  • curl -k -X POST -H "Content-Type: application/json" -H 'TIMS-Session-Token: ae48de10-8928-47e3-9656-e4788f0aa2e6' -d '{ "address": "", "mask_length": "16", "name": "Curl Network", "description": "curlnet", "createRevZone": "yes", "autoCreateBlock": "no", "dmzVisible": "no", "dnssec_enable": "no", "nsec_option": "NSEC3", "monitoringService": "no", "enable_discovery": "no", "discovery_template": "", "discoveryApplianceIp": null, "vrf_name": "", "region": "", "percentageFull": 100, "email_check": 1, "snmp_check": 0, "log_check": 0, "zoneTemplateName": "Sudheer-Test-Template", "addr1": "22", "addr2": "22", "addr3": "0", "addr4": "0", "organization_name": "Internal", "extensions": [] }'

Adding Subnet

  • curl -k -X POST -H "Content-Type: application/json" -H 'TIMS-Session-Token: 84d55774-c562-4dcf-9646-ce7fed4dabfd' -d '{ "network_address":"", "nw_mask_length": 16, "mask_length": "24", "subnet": { "name": "", "description": "", "vlan_id": "", "location_id": null, "vrf_id": "", "subnet_group_name": "", "router_option": "First IP in the subnet", "created_by": "22321", "primary_domain": "curl.com", "secondaryDomains": null, "organization_name": "Internal", "sharedNetwork": null, "dhcpFailoverPeer": "", "subnetTemplateName": null, "enable_discovery": "no", "discovery_template": null, "reclaim_objects": "no", "extensions": [], "array_params": [], "primary_dhcp_server": null, "template_id": null } }'

Adding Object

  • curl k -X POST -H "Content-Type: application/json" -H 'TIMS-Session-Token: ae48de10-8928-47e3-9656-e4788f0aa2e6' -d '{ "name": "objcurl", "class_code": "3G Phone", "alloc_type": "1", "mac": "", "ttl": "1222", "rsrv_exp_dt": "", "objectview": "", "option_template_name": "", "dhcp_server": "", "update_ns_a": true, "update_ns_ptr": true, "dyn_update_rrs_a": true, "dyn_update_rrs_ptr": true, "dyn_update_rrs_cname": true, "dyn_update_rrs_mx": true, "cloudInstanceTemplate": "" "description": "", "change_control_team": "", "end_of_life": "", "room": "", "floor": "", "systemLocation": "", "terminal_server_kvm": "", "switch_name": "", "port_name": "", "duplex_name": "", "serial_num": "", "managed_by": "", "monitored_by": "", "vmware_port": "", "vmware_user_name": "", "vmware_password": "", "addr1": "22", "addr2": "22", "addr3": "0", "addr4": "2", "subnet_address": "", "domain_name": "curl.com", "rrs": [], "organization_name": "Internal" }'

In conclusion, curl is a powerful tool for network automation, and its versatility makes it a valuable asset for developers and network engineers who work with web-based APIs and web servers. Leveraging our automated DDI workflow management can increase efficiency and decrease human errors. To see a quick demo, please contact our Sales Team.

For detailed usage, download the PDF copy.

 Download Whitepaper