Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Latest commit

 

History

History
1306 lines (916 loc) · 62.4 KB

api.md

File metadata and controls

1306 lines (916 loc) · 62.4 KB

Modules

CivoCloud/api

The CivoCloud/api module acts as an abstracton layer for accessing the various civo APIs

Typedefs

Backend : Object

CivoCloud/api

The CivoCloud/api module acts as an abstracton layer for accessing the various civo APIs

See: https://www.civo.com/api


CivoCloud/api.Civo

Kind: static class of CivoCloud/api


new Civo(options)

Param Type Default Description
options Object
options.apiToken String the provided api token from your civo account
[options.host] String https://api.civo.com/v2 An optional end point
[options.port] String | Number 443 an optional port to call

CivoCloud/api.Charges ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/charges


Charges~listCharges([options]) ⇒ Promise

gets an array of chargable service hours [GET]

Kind: inner method of Charges
Access: public
See: https://www.civo.com/api/charges#listing-charges

Param Type Description
[options] Object an optional options object
[options.from] String | Date optional from date range
[options.to] String | Date optional to date range (max 31 days)

CivoCloud/api.Domain ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/dns


Domain~listDomains() ⇒ Promise

gets an array of the domains on civo account [GET]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/dns#list-domain-names


Domain~createDomain(name) ⇒ Promise

creates a new domain within civo [POST]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/dns#setup-a-new-domain

Param Type Description
name String the ndomain name for the new domain

Domain~deleteDomain(id) ⇒ Promise

removes a new domain within civo [DELETE]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/dns#deleting-a-domain

Param Type Description
id String the domain id to be deleted

Domain~listDomainRecords(id) ⇒ Promise

gets an array of the domains on civo account [GET]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/dns#list-dns-records

Param Type Description
id String the domains id to get the records in

Domain~createDomainRecord(domainId, type, name, value, [options]) ⇒ Promise

gets an array of the domains on civo account [POST]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/dns#create-a-new-dns-record

Param Type Default Description
domainId String the domain to delete the record from
type String the type of dns record to use which can be either: 'a', 'cname', 'mx', or 'txt'
name String the portion before the domain name (e.g. 'www', or '@')
value Stirng the ip address fr this dns record to serve
[options] Object an optional options object
[options.priority] Number 10 mx records only but determines the priority of the
[options.ttl] Number 3600 the time to live for the dns record in seconds

Domain~deleteDomainRecord(domainId, id) ⇒ Promise

removes a new domain within civo [DELETE]

Kind: inner method of Domain
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/dns#deleting-a-dns-record

Param Type Description
domainId String the domain to delete the record from
id String the record to be deleted

CivoCloud/api.Firewall ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/firewall


Firewall~listFirewalls() ⇒ Promise

gets an array of the firewalls on civo account [GET]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#list-firewalls


Firewall~createFirewall(name) ⇒ Promise

creates a new firewall in civo [POST]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#create-a-new-firewall

Param Type Description
name String the name to be used to identify the firewall in civo

Firewall~deleteFirewall(id) ⇒ Promise

deletes an existing firewall within civo [DELETE]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#deleting-a-firewall

Param Type Description
id String the firewalls id to be used to identify the network in civo

Firewall~listFirewallRules(id) ⇒ Promise

gets an array of the firewalls rules on civo account [GET]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#list-firewall-rules

Param Type Description
id String the firewalls id to be used to identify the network in civo

Firewall~createFirewallRule(id, start_port, [options]) ⇒ Promise

creates a new firewall rule within an existing firewall [POST]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with a success or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#create-a-new-firewall-rule

Param Type Description
id String the Id for the firewall to create the rule in
start_port String | Number The single port or start of a range of ports to allows
[options] Object an optional object
[options.end_port] Stirng | Number the end of a range of ports
[options.protocol] String the protocol that the ule will allow e.g. 'tcp'
[options.direction] String the direction in which the rule applies to e.g. 'inwards'
[options.cidr] String a ip range in which the rule is applied to e.g. '0.0.0.0/0' for all

Firewall~deleteFirewallRule(firewallId, id) ⇒ Promise

deletes an existing firewall rule within a firewall [DELETE]

Kind: inner method of Firewall
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/firewall#deleting-a-firewall-rule

Param Type Description
firewallId String the firewalls id to be used to identify in civo
id String the firewall rules id in civo

CivoCloud/api.Instance ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/instances


instance.instanceSizes : Object

an object containing the different instance sizes for use with the API

Kind: instance property of Instance


Instance~listInstances() ⇒ Promise

gets an array of the instances on civo cloud [GET]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the instance list or rejects with an error
Access: public
See: https://www.civo.com/api/instances#list-instances


Instance~createInstance(size, network_id, hostname, [options]) ⇒ Promise

creates a new instance network in civo [POST]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#create-an-instance

Param Type Description
size String the size of the instance to create (obtained from listInstanceSizes())
network_id String the id of the private network to create the instance in
hostname String the name of the instance to use
[options] Object an optional options object
[options.template] String the id of the template to use
[options.initial_user] String the name of the initial user to create on the instance
[options.ssh_key_id] String the id of the ssh key to add to the instance
[options.region] String the region to create the instance in
[options.public_ip] Boolean specifies if a public ip should be used for the instance
[options.snapshot_id] String the id of the snapshot to load into the instance
[options.tags] String a space seperated list of tags to add to the instance

Instance~deleteInstance(id) ⇒ Promise

deletes an existing instance within civo [DELETE]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#deleting-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~getInstance(id) ⇒ Promise

gets an existing instance from civo [GET]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#retrieving-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~retagInstance(id, [options]) ⇒ Promise

updates the tags on an existing instance in civo [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#retagging-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo
[options] Object an optional options object
[options.tags] Array.<String> | String a space seperated string of tags or an array of tags

Instance~rebootInstance(id) ⇒ Promise

reboots an instance in civo [POST]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#rebooting-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~hardRebootInstance(id) ⇒ Promise

hard reboots an instance in civo [POST]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#rebooting-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~softRebootInstance(id) ⇒ Promise

soft reboots an instance in civo [POST]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#rebooting-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~stopInstance(id) ⇒ Promise

stops (shutdown) an instance in civo [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#shutting-down-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~startInstance(id) ⇒ Promise

starts an instance in civo [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#starting-an-instance-after-being-shut-down

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~resizeInstance(id, size) ⇒ Promise

resizes an instance in civo [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#updating-resizing-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo
size String the new size to resize the exsting instance to

Instance~rebuildInstance(id) ⇒ Promise

rebuilds an instance in civo [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#rebuilding-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo

Instance~restoreInstance(id, snapshot) ⇒ Promise

restores an instance in civo from a snapshot [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#restoring-an-instance-from-a-snapshot

Param Type Description
id String the instance id to be used to identify the instance in civo
snapshot String the snapshot id to specify which snapshot to restore

Instance~updateInstanceFirewall(id, [options]) ⇒ Promise

Applies a firewall to an instance [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#setting-the-firewall-for-an-instance

Param Type Description
id String the instance id to be used to identify the instance in civo
[options] Object an optional options object
[options.firewall_id] String the firewall id to specify which firewall to apply

Instance~movePublicIpToInstance(id, ipAddress) ⇒ Promise

Moves an owned public ip address from one instance you own to another instance [PUT]

Kind: inner method of Instance
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/instances#moving-a-public-ip-between-instances

Param Type Description
id String the instance id to be used to identify the instance in civo
ipAddress String the ip address to move to this instance

CivoCloud/api.InstanceRegion ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/regions


InstanceRegion~listRegions() ⇒ Promise

gets an array of the currently available regions on civo cloud [GET]

Kind: inner method of InstanceRegion
Returns: Promise - a promise wich resolves with the available region list or rejects with an error
Access: public
See: https://www.civo.com/api/regions#listing-available-regions


CivoCloud/api.InstanceSizing ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/sizes


InstanceSizing~listInstanceSizes() ⇒ Promise

gets an array of the currently available instance sizes on civo cloud [GET]

Kind: inner method of InstanceSizing
Returns: Promise - a promise wich resolves with the instance size list or rejects with an error
Access: public
See: https://www.civo.com/api/sizes#listing-available-sizes


CivoCloud/api.LoadBallancer ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/loadbalancer


LoadBallancer~listLoadBalancers() ⇒ Promise

Lists all of the available load ballancers on the civo account [GET]

Kind: inner method of LoadBallancer
Returns: Promise - resolves with a list of available load balancers or rejects with an error
Access: public
See: https://www.civo.com/api/loadbalancer#list-load-balancers


LoadBallancer~createLoadBalancer(hostname, backends, [options]) ⇒ Promise

Creates a new load ballancer on the civo account [POST]

Kind: inner method of LoadBallancer
Returns: Promise - resolves when load balancer is created or rejects with an error
Access: public
See: https://www.civo.com/api/loadbalancer#setup-a-new-load-balancer

Param Type Default Description
hostname String the hostname to receive traffic on
backends Array.<Backend> an array of backends to load ballance
[options] Object an optional object containing all optional parameters
[options.protocol] String 'http' protocol to use (either 'http' or 'https')
[options.tls_certificate] String if protocol is https then base64-encoded certificate in PEM format
[options.tls_key] String if protocol is https then base64-encoded key in PEM format
[options.port] String | Number 80 the port to listen on
[options.max_request_size] Number 20 the maximum request size in megabytes
[options.policy] String 'random' routing policy can be either 'least_conn', 'random', 'round_robin', or 'ip_hash'
[options.health_check_path] String '/' what url to use on the backends to check status
[options.fail_timeout] Number 30 how long to wait (in seconds) before determining backend failure
[options.max_conns] Number 10 how many concurrent connections a backend can handle
[options.ignore_invalid_backend_tls] Boolean true ignore invalid/self-signed tls certs on backend

LoadBallancer~updateLoadBalancer(id, [options]) ⇒ Promise

updates an existing load ballancer with new information [PUT]

Kind: inner method of LoadBallancer
Returns: Promise - resolves when load balancer is created or rejects with an error
Access: public
See: https://www.civo.com/api/loadbalancer#update-a-load-balancer

Param Type Description
id String the load balancers id to update
[options] Object an optional object containing all optional parameters
[options.hostname] String the hostname to receive traffic on
[options.backends] Array.<Backend> an array of backends to load ballance
[options.protocol] String protocol to use (either 'http' or 'https')
[options.tls_certificate] String if protocol is https then base64-encoded certificate in PEM format
[options.tls_key] String if protocol is https then base64-encoded key in PEM format
[options.port] String | Number the port to listen on
[options.max_request_size] Number the maximum request size in megabytes
[options.policy] String routing policy can be either 'least_conn', 'random', 'round_robin', or 'ip_hash'
[options.health_check_path] String what url to use on the backends to check status
[options.fail_timeout] Number how long to wait (in seconds) before determining backend failure
[options.max_conns] Number how many concurrent connections a backend can handle
[options.ignore_invalid_backend_tls] Boolean ignore invalid/self-signed tls certs on backend

LoadBallancer~deleteLoadBalancer(id) ⇒ Promise

deletes an existing load ballancer from the civo account [DELETE]

Kind: inner method of LoadBallancer
Returns: Promise - resolves when load balancer is deleted or rejects with an error
Access: public
See: https://www.civo.com/api/loadbalancer#deleting-a-load-balancer

Param Type Description
id String the id for the load balancers to delete

CivoCloud/api.Network ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/networks


Network~listNetworks() ⇒ Promise

gets an array of the private networks on civo cloud [GET]

Kind: inner method of Network
Returns: Promise - a promise wich resolves with the network list or rejects with an error
Access: public
See: https://www.civo.com/api/networks#listing-the-private-networks


Network~createNetwork(label, [options]) ⇒ Promise

creates a new private network in civo [POST]

Kind: inner method of Network
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/networks#create-a-private-network

Param Type Description
label String the name to be used to identify the key in civo
[options] Object an optional options object
[options.region] String an optional region to create the network in

Network~renameNetwork(id, label) ⇒ Promise

renames an existing network within civo [PUT]

Kind: inner method of Network
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/networks#renaming-a-network

Param Type Description
id String the networks id to be used to identify the network in civo
label String the new label to be used for the network

Network~deleteNetwork(id) ⇒ Promise

deletes an existing network within civo [DELETE]

Kind: inner method of Network
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/networks#removing-a-private-network

Param Type Description
id String the networks id to be used to identify the network in civo

CivoCloud/api.Quota ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/quota


Quota~getQuota() ⇒ Promise

gets an object of quota values [GET]

Kind: inner method of Quota
Access: public
See: https://www.civo.com/api/quota#determining-current-quota


CivoCloud/api.Snapshot ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/snapshot


Snapshot~listSnapshots() ⇒ Promise

gets an array of the snapshots on civo account [GET]

Kind: inner method of Snapshot
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/snapshots#list-snapshots


Snapshot~createSnapshot(name, instance_id, safe) ⇒ Promise

creates a snapshot of a given instance (alias of updateSnapshot) [PUT]

Kind: inner method of Snapshot
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/snapshots#create-a-new-or-update-an-old-snapshot

Param Type Description
name String the new name of the snapshot
instance_id String the id of the instance to be snapshotted
safe Boolean determins if an instance is stopped before snapshotting

Snapshot~updateSnapshot(name, instance_id, safe) ⇒ Promise

updates a snapshot of a given instance [PUT]

Kind: inner method of Snapshot
Returns: Promise - a promise wich resolves with the foirewall list or rejects with an error
Access: public
See: https://www.civo.com/api/snapshots#create-a-new-or-update-an-old-snapshot

Param Type Description
name String the new name of the snapshot
instance_id String the id of the instance to be snapshotted
safe Boolean determins if an instance is stopped before snapshotting

Snapshot~deleteSnapshot(name) ⇒ Promise

deletes an existing snapshot within civo [DELETE]

Kind: inner method of Snapshot
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/snapshots#deleting-a-snapshot

Param Type Description
name String the snapshots name to be used to identify the network in civo

CivoCloud/api.SSHKeys ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/sshkeys


SSHKeys~listSSHKeys() ⇒ Promise

gets an array of the currently available ssh keys on civo cloud [GET]

Kind: inner method of SSHKeys
Returns: Promise - a promise which resolves with the sshkeys list or rejects with an error
Access: public
See: https://www.civo.com/api/sshkeys#listing-the-ssh-keys


SSHKeys~uploadSSHKey(name, public_key) ⇒ Promise

uploads a supplied ssh key into civo [POST]

Kind: inner method of SSHKeys
Returns: Promise - a promise wich resolves with the result and id or rejects with an error
Access: public
See: https://www.civo.com/api/sshkeys#uploading-an-ssh-key

Param Type Description
name String the name to be used to identify the key in civo
public_key String the public key string to be uploaded

SSHKeys~deleteSSHKey(name) ⇒ Promise

gets an array of the currently available ssh keys on civo cloud [DELETE]

Kind: inner method of SSHKeys
Returns: Promise - a promise wich resolves with the sshkeys list or rejects with an error
Access: public
See: https://www.civo.com/api/sshkeys#removing-an-ssh-key

Param Type Description
name String the name of the public key to delete

CivoCloud/api.Template ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/templates


Template~listTemplates() ⇒ Promise

gets an array of the currently available templates on civo cloud [GET]

Kind: inner method of Template
Returns: Promise - a promise wich resolves with the available region list or rejects with an error
Access: public
See: https://www.civo.com/api/templates#listing-available-templates


Template~createTemplate(name, image_id, [options]) ⇒ Promise

creates a new template on the civo account [POST]

Kind: inner method of Template
Returns: Promise - a promise wich resolves with the available region list or rejects with an error
Access: public
See: https://www.civo.com/api/templates#create-a-new-template

Param Type Description
name String a readable name for the custom template
image_id String an openstack glance image id
[options] Object an optional object
[options.short_description] String an optional one line description of the template
[options.description] String an optional full description of the template
[options.default_username] String an optional udername to be created within the new template
[options.cloud_config] String an optional customisation script to run after the instance is first booted

Template~updateTemplate(id, [options]) ⇒ Promise

updates an existing template on the civo account [PUT]

Kind: inner method of Template
Returns: Promise - a promise wich resolves with the available region list or rejects with an error
Access: public
See: https://www.civo.com/api/templates#update-a-template

Param Type Description
id String the templates id to be used to identify the network in civo
[options] Object an optional object
[options.name] String a readable name for the custom template
[options.short_description] String an optional one line description of the template
[options.description] String an optional full description of the template
[options.default_username] String an optional udername to be created within the new template
[options.cloud_config] String an optional customisation script to run after the instance is first booted

Template~deleteTemplate(id) ⇒ Promise

deletes an existing template within civo [DELETE]

Kind: inner method of Template
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/templates#deleting-a-template

Param Type Description
id String the templates id to be used to identify the network in civo

CivoCloud/api.Webhook ⇐ Civo

Kind: static class of CivoCloud/api
Extends: Civo
See: https://www.civo.com/api/webhooks


Webhook~listWebhooks() ⇒ Promise

gets an array of the currently available ebhooks sizes on civo cloud [GET]

Kind: inner method of Webhook
Returns: Promise - a promise wich resolves with the webhook list or rejects with an error
Access: public
See: https://www.civo.com/api/webhooks#list-webhooks


Webhook~createWebhook(url, [options]) ⇒ Promise

creates and registers a new webhook onto the civo account. [POST]

Kind: inner method of Webhook
Returns: Promise - resolves with the newly created webhook or rejects with an error
Access: public
See: https://www.civo.com/api/webhooks#create-a-new-webhook

Param Type Default Description
url String a url to send the webhook request too
[options] Object an object for options
[options.events] Array.<String> | String all events an array of event names to subscribe to
[options.secret] String random string a secret to send with webhook requests

Webhook~deleteWebhook(id) ⇒ Promise

deletes an existing webhook within civo [DELETE]

Kind: inner method of Webhook
Returns: Promise - a promise wich resolves with the result or rejects with an error
Access: public
See: https://www.civo.com/api/webhooks#deleting-a-webhook

Param Type Description
id String the webhook id to be used to identify which webhook to delete in civo

Webhook~testWebhook(id) ⇒ Promise

sends a dummy payload to the specific webhook in order to test it [POST]

Kind: inner method of Webhook
Returns: Promise - resolves when the tummy payload is sent or rejects with an error
Access: public
See: https://www.civo.com/api/webhooks#test-a-webhook

Param Type Description
id String the id for the specific webhook to test

Webhook~updateWebhook(id, [options]) ⇒ Promise

creates and registers a new webhook onto the civo account. [PUT]

Kind: inner method of Webhook
Returns: Promise - resolves with the newly created webhook or rejects with an error
Access: public
See: https://www.civo.com/api/webhooks#create-a-new-webhook

Param Type Description
id String the id for the specific webhook
[options] Object an object for options
[options.url] String a url to send the webhook request too
[options.events] Array.<String> | String an array of event names to subscribe to
[options.secret] String a secret to send with webhook requests

Backend : Object

Kind: global typedef
Properties

Name Type Description
[instance_id] String the backend instance_id
[protocol] String the protocol to communicate with the backend on (either 'http' or 'https')
[port] Number the port to communicate with the backend on