API Documentation

Hitflow provides APIs that enable the use and integration of our montoring service into tools developed by you.
To allow secure access to your account data, without disclosing your personal ID and password, our APIs use an authentication key system. This set of keys allows the generation of unique session tokens that are used to make queries with our APIs.

  • Summary

Generalities

The Hitflow API protocol uses GET, POST, DELETE and PUT methods.

The access URL is https://wapi.hitflow.net to which the path to the targeted API is added, for example:
https://wapi.hitflow.net/v1/user/infos

If data has to be sent to the query (in the case of a POST or PUT query), the format accepted by the API is "application/x-www-form-urlencoded".

API responses are still in JSON format with at least one "error" attribute containing a entire to inform about the status of the query.

{
 "error": 0,
}

Token authentication

API is used using a session token in the query header. To generate this token, you need to make a call to the "auth/credential" API using two keys created beforehand from your manager.

Creating authentication keys

Log in to your manager then go to the "API" tab in the "Settings" section of the navigation menu.

  1. From this list, click the Add a Key button to open the form to create a new access.
  2. Set a name that will allow you to easily identify the app using your access key and then validate.
  3. After a few moments, you'll see a new key in the list.
  4. You need to activate this key by clicking the button before you can use it in your app.

Generating a session token

Now that you've created the application key and the secret key in your manager, you'll be able to use them to generate a session token.

The generation of a session token is done from this URL https://wapi.hitflow.net/v1/auth/credential by sending two settings: app_key et secret_key.

Example of a token-generating query

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" https://wapi.hitflow.net/v1/auth/credential -d "app_key=xxxxxxxxxxxxxxxx&secret_key=xxxxxxxxxxxxxxxxxxxxxxxx"

If successful, the API will return a response of this form:

{
 "error": 0,
 "token": "57ab2c78beb7f5b6b29a68f1f0ff30de3eaf7b46fc6fcf4d420ed10321faa4ff",
 "account": "5ccxxxxxxxxxxxxxxxxxxxxx"
}

Attributes of the answer:

  • error : value 0 indicates the success of the query.
  • token : contains the unique character chain for authentication.
  • account : represents your account's unique identifier.

Using the session token

The generated session token must be sent to the query header via the attribute:

HitFlow-Token-Access

Example of a query using the session token

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/user/infos

The API will return account information as the example below:

{
 "error": 0,
 "infos": {
  "id": "5ccxxxxxxxxxxxxxxxxxxxxx",
  "time_create": 1556219006, "email": "[email protected]",
  "lastname": "Hitflow",
  "firstname": null,
  "language": "en_US.utf8",
  "timezone": "Europe\/Paris",
  "ads_news": true,
  "ads_dev": true,
  "accounts": {
   "5ccxxxxxxxxxxxxxxxxxxxxx": {
    "name": "My Account",
    "enabled": true
   }
  },
  "validated": true,
  "wizard_onstartup": false
 }
}

Expiration of a session token

A session token is automatically deactivated after 600 seconds of inactivity. When a invalid token is used, the API will systematically return the following message:

{
 "error":10000,
 "msg":"Unauthorized."
}

Dashboard

GET/v1/dashboard

Returns the information allowing the display of the dashboard in the manager.

Headers

  • HitFlow-Token-Access : Session Token

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/dashboard

Example of response

{ "error": 0, "online": { "count" => 0, "list" => {} }, "disabled": { "count" => 0, "list" => {} }, "error": { "count" => 0, "list" => {} } }

Uptimes

POST/v1/uptimes/search

Returns the list of uptimes tests for the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

query

Type :String

Description :String of characters containing the search terms to be found in the list.

Required :No

Default value :-

status

Type :Array

Description :

Integer array to limit the display of entries :

  • 1 : Status is "deactivated"
  • 2 : Status is "error"
  • 3 : Status is "online"
  • 4 : Status is "unknown"

Required :No

Default value :-

types

Type :Array

Description :

Array containing the types of entries to be displayed in the list.
The possible values are : icmp, tcp, udp, http, https, ftp, ws

Required :No

Default value :-

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptimes/search

Example of response

{ "error": 0, "count": 1, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "icmp", "time_create": 1556228110, "time_enable": 1582732121, "time_disable": 1582513563, "time_down": 1585491752, "time_up": 1585491830, "name": "Uptime Test", "status": 0, "enable": true, "check_rate": "300", "response_uptime": 100, "host": "xxx.xxx.xxx.xxx", "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 } } }

GET/v1/uptime/{id}

Returns information about the service availability test.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "type": "https", "time_create": 1556224073, "time_update": 1585670858, "time_enable": 1582732121, "time_disable": 1582513563, "time_down": 1578452985, "time_up": 1582732139, "time_delete": null, "time_lastcheck": 1585670858, "time_nextcheck": 1585670918, "name": "Uptime Test", "status": 0, "enable": true, "check_rate": "60", "check_timeout": "30", "response_time_limit": "30000", "check_countries": ["FR", "GB", "PL", "CA", "US", "SG", "AU"], "alert_contacts": [ "5ccxxxxxxxxxxxxxxxxxxxxx" ], "alert_after": "0", "alert_onbackup": true, "response_time_avg": 1427.33, "response_time_avg_checkers": { "uk-eoh1she": 1025.16, ... }, "response_uptime": 100, "response_uptime_checkers": { "uk-eoh1she": 100, ... }, "response_data": { "1585587600": { "success": 49, "error": 0, "time": 84004, "time_count": 49, "checkers": { "uk-eoh1she": { "success": 4, "error": 0, "time": 8909, "time_count": 4 }, ... } }, ... }, "host": "example.hitflow.net", "port": "443", "path": "\/", "auth_username": null, "auth_password": null, "check_ssl_error": "true", "headers": null, "post_data": null, "words_contains": null, "words_notcontains": null, "http_status_code": ["204", "205", "206", "303", "400", "401", "403", "404", "405", "406", "408", "410", "413", "444", "429", "494", "495", "496", "499", "500", "501", "502", "503", "504", "505", "506", "507", "508", "509", "510", "511", "520", "521", "522", "523", "524", "598", "599"], "check_error": true, "request_data": null, "request_method": "get" } }

PUT/v1/uptime/{id}/enable

Enables or disables service availability testing.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=false"

Example of response

{ "error": 0, "status": false, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/uptime/{id}

Removes the account availability test.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error":0 }

POST/v1/uptime/{id}/interval

Changes the control interval for the test whose ID is passed in the URL.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

interval

Type :Integer

Description :The interval must be one of the following values: 60, 300, 600, 1800, 3600.

Required :No

Default value :300

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/5ccxxxxxxxxxxxxxxxxxxxxx/interval -d "interval=3600"

Example of response

{ "error": 0, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

POST/v1/uptime/reports/requests

Returns a list of tests performed on a service according to a time interval.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element.

Required :Yes

Default value :-

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :200

time_begin

Type :Integer

Description :Start date of data display (unix timestamp).

Required :No

Default value :yesterday midnight

time_end

Type :Integer

Description :End date of report display (unix timestamp).

Required :No

Default value :today midnight

probes

Type :Array

Description :Table containing the code of the probes.

Required :No

Default value :NULL

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/reports/requests -d "id= 5ccxxxxxxxxxxxxxxxxxxxxx&time_begi=1585612800&time_end=1585699199"

Example of response

{ "error": 0, "time_begin": 1585612800, "time_end": 1585695600, "days": 0.999988425925926, "preset": "hourly", "requests": { "data": { "count": 440, "success": 988, "error": 12 }, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "hit_type": "icmp", "time_create": 1585752094, "time_day": 1585699200, "report": { "error": "0", "status": "0", "version": "1", "host": "xxx.xxx.xxx.xxx", "count": "5", "transmitted": "5", "received": "5", "loss": "0", "time": "4000", "min": "332.146", "avg": "622.926", "max": "720.636", "mdev": "148.582" }, "checker": { "code": "fr-ceesh0i", "name": "Strasbourg 1", "continent": "EU", "country": "FR", "city": "Strasbourg" }, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, ... } } }

GET/v1/uptime/reports/request/{id}

Returns the specific information of a test performed on a service.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/reports/request/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "time": 1585736990, "type": "https", "report": { "error": "0", "status": "0", "version": "1", "host": "https:\/\/hitflow.net:443\/", "timeout": "30", "http_code": "200", "http_header": "GET \/ HTTP\/1.1\r\nHost: hitflow.net\r\nUser-Agent: Mozilla\/5.0+(compatible; HitFlow\/1.0\/5ccxxxxxxxxxxxxxxxxxxxxx; https:\/\/hitflow.net\/)\r\nAccept: *\/*\r\nHitFlow-Reference: 5ccxxxxxxxxxxxxxxxxxxxxx", "http_method": "GET", "namelookup_time": "61", "connect_time": "4", "tls_handshake_time": "49", "response_time": "1856", "total_time": "1970", "redirect_url": "0", "data_size": "57397", "curl_errno": "0" }, "checker": { "code": "uk-eoh1she", "name": "London 1", "continent": "EU", "country": "GB", "city": "London" } }

POST/v1/uptime/reports/alerts

Returns a list of alerts sent for a service according to a time interval.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element.

Required :Yes

Default value :-

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :200

time_begin

Type :Integer

Description :Start date of data display (unix timestamp).

Required :No

Default value :yesterday midnight

time_end

Type :Integer

Description :End date of report display (unix timestamp).

Required :No

Default value :today midnight

probes

Type :Array

Description :Table containing the code of the probes.

Required :No

Default value :NULL

fullcontent

Type :Boolean

Description :Parameter allowing to return all the information (true) or limit to the essential (false).

Required :No

Default value :false

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/reports/alerts -d "id= 5ccxxxxxxxxxxxxxxxxxxxxx&time_begin=1585612800&time_end=1585699199"

Example of response

{ "error": 0, "time_begin": 1585612800, "time_end": 1585782000, "days": 1.999988425925926, "preset": "hourly", "alerts": { "count": 20, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "telegram", "time_create": 1585746140, "hit_status": "0", "to": "XXXX XXXXX \/\/ @XXXXXX [999999999]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "email", "time_create": 1585746140, "hit_status": "0", "to": "[email protected]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "slack", "time_create": 1585746140, "hit_status": "0", "url": "https:\/\/hooks.slack.com\/services\/XXXXXXXXX\/XXXXXXXXX\/XXXXXXXXXXXXXXXXXXXXXXXX", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, ... } } }

GET/v1/uptime/reports/alert/{id}

Returns the specific information of an alert sent about a service.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/reports/alert/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "time": 1585659291, "type": "telegram", "hit_status": "0", "content": { "error": "0", "message": "Nous ne d\u00e9tectons actuellement plus de probl\u00e8me sur le service \"Test Name\" (icmp:\/\/xxx.xxx.xxx.xxx).\n\nLa perturbation que nous avons constat\u00e9 \u00e9tait d'une dur\u00e9e de 3 minutes 55 secondes." }, "to": "XXXXXXXX \/\/ @xxxxxxx [999999999]" }

GET/v1/uptime/{id}/response-time

Returns a list of response times for the last 24 hours.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/uptime/5ccxxxxxxxxxxxxxxxxxxxxx/response-time

Example of response

{ "error":0, "data": { "1600768800":766, "1600772400":319, "1600776000":1157, "1600779600":674, "1600783200":550, "1600786800":658, "1600790400":880, "1600794000":700, "1600797600":780, "1600801200":580, "1600804800":666, "1600808400":379, "1600812000":1066, "1600815600":592, "1600819200":565, "1600822800":777, "1600826400":1088, "1600830000":639, "1600833600":451, "1600837200":640, "1600840800":648, "1600844400":1073, "1600848000":898, "1600851600":1031 } }

Servers

POST/v1/servers/search

Returns the list of servers to monitor for the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

query

Type :String

Description :String of characters containing the search terms to be found in the list.

Required :No

Default value :-

status

Type :Array

Description :

Integer array to limit the display of entries :

  • 1 : Status is "deactivated"
  • 2 : Status is "error"
  • 3 : Status is "online"
  • 4 : Status is "unknown"

Required :No

Default value :-

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/servers/search

Example of response

{ "error": 0, "count": 2, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow Api", "status": 0, "enable": true, "time_lastping": 1588458048, "remote_addr": "xxx.xxx.xxx.xxx", "system_os": "linux", "system_uptime": 5429821, "load_average": 1.41, "total_cpu_usage": 99, "total_ram_usage": 84.16, "total_storage_usage": 47.37, "network_usage_rx": 0, "network_usage_tx": 0, "threshold_avg": "5", "threshold_cpu": "0", "threshold_ram": "90", "threshold_disk": "80", "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow Website", "status": 0, "enable": true, "time_lastping": 1588458042, "remote_addr": "xxx.xxx.xxx.xxx", "system_os": "linux", "system_uptime": 5429745, "load_average": 0.35, "total_cpu_usage": 99.02, "total_ram_usage": 39.79, "total_storage_usage": 42.11, "network_usage_rx": 0, "network_usage_tx": 0, "threshold_avg": "5", "threshold_cpu": "0", "threshold_ram": "80", "threshold_disk": "80", "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 } } }

GET/v1/server/{id}

Returns information about the server to be monitored.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "type": null, "time_create": 1561407103, "time_update": 1583307253, "time_enable": 1582732108, "time_disable": 1582513564, "time_down": 1586869216, "time_up": 1586869532, "time_delete": null, "name": "Hitflow Website", "status": 0, "enable": true, "alert_onbackup": true, "auth_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "time_lastping": 1588458332, "time_lastping_timeout": 1588458992, "remote_addr": "xxx.xxx.xxx.xxx", "system_os": "linux", "system_uptime": 5430045, "load_average": 0.42, "total_cpu_usage": 39.15, "total_ram_usage": 39.64, "total_swap_usage": 0, "total_storage_usage": 42.11, "network_usage_rx": 0, "network_usage_tx": 0, "process_list": [ ["systemd", "root", 0, 9, 0.46], ["kthreadd", "root", 0, 0, 0], ["kworker\/0:0H", "root", 0, 0, 0], ["mm_percpu_wq", "root", 0, 0, 0], ["ksoftirqd\/0", "root", 0, 0, 0], ["rcu_sched", "root", 0, 0, 0], ["rcu_bh", "root", 0, 0, 0], ["migration\/0", "root", 0, 0, 0], ["watchdog\/0", "root", 0, 0, 0], ["cpuhp\/0", "root", 0, 0, 0], ["kdevtmpfs", "root", 0, 0, 0], ["netns", "root", 0, 0, 0], ["rcu_tasks_kthre", "root", 0, 0, 0], ["kauditd", "root", 0, 0, 0], ["khungtaskd", "root", 0, 0, 0], ["oom_reaper", "root", 0, 0, 0], ["writeback", "root", 0, 0, 0], ["kcompactd0", "root", 0, 0, 0], ["ksmd", "root", 0, 0, 0], ["khugepaged", "root", 0, 0, 0], ["crypto", "root", 0, 0, 0], ["kintegrityd", "root", 0, 0, 0], ["kblockd", "root", 0, 0, 0], ["ata_sff", "root", 0, 0, 0], ["md", "root", 0, 0, 0], ["edac-poller", "root", 0, 0, 0], ["devfreq_wq", "root", 0, 0, 0], ["watchdogd", "root", 0, 0, 0], ["kswapd0", "root", 0, 0, 0], ["kworker\/u3:0", "root", 0, 0, 0], ["ecryptfs-kthrea", "root", 0, 0, 0], ["kthrotld", "root", 0, 0, 0], ["acpi_thermal_pm", "root", 0, 0, 0], ["scsi_eh_0", "root", 0, 0, 0], ["scsi_tmf_0", "root", 0, 0, 0], ["scsi_eh_1", "root", 0, 0, 0], ["scsi_tmf_1", "root", 0, 0, 0], ["ipv6_addrconf", "root", 0, 0, 0], ["kstrp", "root", 0, 0, 0], ["charger_manager", "root", 0, 0, 0], ["scsi_eh_2", "root", 0, 0, 0], ["scsi_tmf_2", "root", 0, 0, 0], ["raid5wq", "root", 0, 0, 0], ["jbd2\/sda1-8", "root", 0, 0, 0], ["ext4-rsv-conver", "root", 0, 0, 0], ["kworker\/0:1H", "root", 0, 0, 0], ["systemd-journald", "root", 0, 75, 3.86], ["iscsi_eh", "root", 0, 0, 0], ["systemd-udevd", "root", 0, 4, 0.21], ["ib-comp-wq", "root", 0, 0, 0], ["ib-comp-unb-wq", "root", 0, 0, 0], ["ib_mcast", "root", 0, 0, 0], ["ib_nl_sa_wq", "root", 0, 0, 0], ["rdma_cm", "root", 0, 0, 0], ["lvmetad", "root", 0, 1, 0.05], ["systemd-timesyncd", "systemd-timesync", 0, 3, 0.15], ["systemd-networkd", "systemd-network", 0, 5, 0.26], ["systemd-resolved", "systemd-resolve", 0, 5, 0.26], ["networkd-dispat", "root", 0, 13, 0.67], ["rsyslogd", "syslog", 0, 4, 0.21], ["accounts-daemon", "root", 0, 5, 0.26], ["systemd-logind", "root", 0, 5, 0.26], ["atd", "root", 0, 2, 0.1], ["cron", "root", 0, 2, 0.1], ["lxcfs", "root", 0, 3, 0.15], ["memcached", "memcache", 0, 10, 0.51], ["dbus-daemon", "messagebus", 0, 4, 0.21], ["sshd", "root", 0, 6, 0.31], ["agetty", "root", 0, 2, 0.1], ["agetty", "root", 0, 1, 0.05], ["unattended-upgr", "root", 0, 15, 0.77], ["polkitd", "root", 0, 5, 0.26], ["master", "root", 0, 3, 0.15], ["kworker\/0:0", "root", 0, 0, 0], ["pickup", "postfix", 0, 5, 0.26], ["kworker\/0:1", "root", 0, 0, 0], ["kworker\/u2:0", "root", 0, 0, 0], ["kworker\/u2:2", "root", 0, 0, 0], ["kworker\/u2:1", "root", 0, 0, 0], ["python", "root", 0, 23, 1.18], ["xfsalloc", "root", 0, 0, 0], ["xfs_mru_cache", "root", 0, 0, 0] ], "threshold_avg": "5", "threshold_cpu": "90", "threshold_ram": "80", "threshold_storage": null, "threshold_ping": "10", "threshold_disk": "80", "alert_contacts": ["5ccxxxxxxxxxxxxxxxxxxxxx"], "alert_doublecheck": true } }

PUT/v1/server/{id}/enable

Enables or disables monitoring of a server.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=false"

Example of response

{ "error": 0, "status": false, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/server/{id}

Deletes the monitored server and all information related to that server.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error":0 }

POST/v1/server/reports

Returns a list of reports sent for a server according to a time interval.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element.

Required :Yes

Default value :-

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :200

time_begin

Type :Integer

Description :Start date of data display (unix timestamp).

Required :No

Default value :yesterday midnight

time_end

Type :Integer

Description :End date of report display (unix timestamp).

Required :No

Default value :today midnight

fullcontent

Type :Boolean

Description :Parameter allowing to return all the information (true) or limit to the essential (false).

Required :No

Default value :false

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/reports -d "id=5ccxxxxxxxxxxxxxxxxxxxxx&time_begin=1585612800&time_end=1585699199"

Example of response

{ "error": 0, "time_begin": 1585612800, "time_end": 1585695600, "days": 0.999988425925926, "preset": "hourly", "reports": { "data": { "count": 1, "success": 200, "error": 0 }, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "server_status": 0, "time_create": 1585781737, "time_day": 1585699200, "status": 200, "report": "{\"uptime\":2753446,\"load_average\":0.3,\"cpu_usage\":5.01,\"ram_usage\":36.92,\"swap_usage\":0,\"storage_usage\":42.11,\"remote_addr\":\"xxx.xxx.xxx.xxx\",\"system_os\":\"linux\"}", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, } } }

GET/v1/server/report/{id}

Returns the specific information of a report sent by the server.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/report/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "time": 1588290953, "report_status": 200, "report": "{\"uptime\":5262645,\"load_average\":0.01,\"cpu_usage\":6.59,\"ram_usage\":39.02,\"swap_usage\":0,\"storage_usage\":42.11,\"remote_addr\":\"xxx.xxx.xxx.xxx\",\"system_os\":\"linux\"}", "server_status": 0, "json": "{\"load_average\":[0.01,0.03,0],\"uptime\":5262645,\"operating_system\":\"Linux\",\"swap\":{\"available\":0,\"total\":0,\"used\":0},\"memory\":{\"available\":1186,\"total\":1945,\"used\":499},\"process\":[[\"systemd\",\"root\",0,9],[\"kthreadd\",\"root\",0,0],[\"kworker\\\/0:0H\",\"root\",0,0],[\"mm_percpu_wq\",\"root\",0,0],[\"ksoftirqd\\\/0\",\"root\",0,0],[\"rcu_sched\",\"root\",0,0],[\"rcu_bh\",\"root\",0,0],[\"migration\\\/0\",\"root\",0,0],[\"watchdog\\\/0\",\"root\",0,0],[\"cpuhp\\\/0\",\"root\",0,0],[\"kdevtmpfs\",\"root\",0,0],[\"netns\",\"root\",0,0],[\"rcu_tasks_kthre\",\"root\",0,0],[\"kauditd\",\"root\",0,0],[\"khungtaskd\",\"root\",0,0],[\"oom_reaper\",\"root\",0,0],[\"writeback\",\"root\",0,0],[\"kcompactd0\",\"root\",0,0],[\"ksmd\",\"root\",0,0],[\"khugepaged\",\"root\",0,0],[\"crypto\",\"root\",0,0],[\"kintegrityd\",\"root\",0,0],[\"kblockd\",\"root\",0,0],[\"ata_sff\",\"root\",0,0],[\"md\",\"root\",0,0],[\"edac-poller\",\"root\",0,0],[\"devfreq_wq\",\"root\",0,0],[\"watchdogd\",\"root\",0,0],[\"kswapd0\",\"root\",0,0],[\"kworker\\\/u3:0\",\"root\",0,0],[\"ecryptfs-kthrea\",\"root\",0,0],[\"kthrotld\",\"root\",0,0],[\"acpi_thermal_pm\",\"root\",0,0],[\"scsi_eh_0\",\"root\",0,0],[\"scsi_tmf_0\",\"root\",0,0],[\"scsi_eh_1\",\"root\",0,0],[\"scsi_tmf_1\",\"root\",0,0],[\"ipv6_addrconf\",\"root\",0,0],[\"kstrp\",\"root\",0,0],[\"charger_manager\",\"root\",0,0],[\"scsi_eh_2\",\"root\",0,0],[\"scsi_tmf_2\",\"root\",0,0],[\"raid5wq\",\"root\",0,0],[\"jbd2\\\/sda1-8\",\"root\",0,0],[\"ext4-rsv-conver\",\"root\",0,0],[\"kworker\\\/0:1H\",\"root\",0,0],[\"systemd-journald\",\"root\",0,67],[\"iscsi_eh\",\"root\",0,0],[\"systemd-udevd\",\"root\",0,4],[\"ib-comp-wq\",\"root\",0,0],[\"ib-comp-unb-wq\",\"root\",0,0],[\"ib_mcast\",\"root\",0,0],[\"ib_nl_sa_wq\",\"root\",0,0],[\"rdma_cm\",\"root\",0,0],[\"lvmetad\",\"root\",0,1],[\"systemd-timesyncd\",\"systemd-timesync\",0,3],[\"systemd-networkd\",\"systemd-network\",0,5],[\"systemd-resolved\",\"systemd-resolve\",0,5],[\"networkd-dispat\",\"root\",0,13],[\"rsyslogd\",\"syslog\",0,4],[\"accounts-daemon\",\"root\",0,5],[\"systemd-logind\",\"root\",0,5],[\"atd\",\"root\",0,2],[\"cron\",\"root\",0,2],[\"lxcfs\",\"root\",0,3],[\"memcached\",\"memcache\",0,10],[\"dbus-daemon\",\"messagebus\",0,4],[\"sshd\",\"root\",0,6],[\"agetty\",\"root\",0,2],[\"agetty\",\"root\",0,1],[\"unattended-upgr\",\"root\",0,15],[\"polkitd\",\"root\",0,5],[\"master\",\"root\",0,3],[\"qmgr\",\"postfix\",0,4],[\"kworker\\\/0:1\",\"root\",0,0],[\"tlsmgr\",\"postfix\",0,5],[\"pickup\",\"postfix\",0,5],[\"kworker\\\/u2:2\",\"root\",0,0],[\"kworker\\\/u2:0\",\"root\",0,0],[\"kworker\\\/u2:1\",\"root\",0,0],[\"python\",\"root\",0,23],[\"xfsalloc\",\"root\",0,0],[\"xfs_mru_cache\",\"root\",0,0],[\"kworker\\\/0:0\",\"root\",0,0],[\"\\\/usr\\\/sbin\\\/apach\",\"root\",0,39]],\"storage\":[{\"total\":19,\"name\":\"\\\/\",\"used\":8},{\"total\":0,\"name\":\"\\\/boot\\\/efi\",\"used\":0}],\"cpu\":6.590000000000001,\"network\":{\"tx\":0,\"rx\":0},\"remote_addr\":\"xxx.xxx.xxx.xxx\"}", "output": "{\"error\":0,\"msg\":\"OK\"}" }

POST/v1/server/alerts

Returns a list of alerts sent for a server according to a time interval.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element.

Required :Yes

Default value :-

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :200

time_begin

Type :Integer

Description :Start date of data display (unix timestamp).

Required :No

Default value :yesterday midnight

time_end

Type :Integer

Description :End date of report display (unix timestamp).

Required :No

Default value :today midnight

fullcontent

Type :Boolean

Description :Parameter allowing to return all the information (true) or limit to the essential (false).

Required :No

Default value :false

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/alerts -d "id=5ccxxxxxxxxxxxxxxxxxxxxx&time_begin=1585612800&time_end=1585699199"

Example of response

{ "error": 0, "time_begin": 1585612800, "time_end": 1588204800, "days": 30, "preset": "daily", "alerts": { "count": 6, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "slack", "time_create": 1586869535, "server_status": "0", "url": "https:\/\/hooks.slack.com\/services\/XXXXXXXXX\/XXXXXXXXX\/XXXXXXXXXXXXXXXXXXXXXXXXX", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "email", "time_create": 1586869535, "server_status": "0", "to": "[email protected]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "telegram", "time_create": 1586869535, "server_status": "0", "to": "XXXXXXXX \/\/ @xxxxxxx [999999999]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "email", "time_create": 1586869220, "server_status": "106", "to": "[email protected]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "telegram", "time_create": 1586869220, "server_status": "106", "to": "XXXXXXXX \/\/ @xxxxxxx [999999999]", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": "slack", "time_create": 1586869219, "server_status": "106", "url": "https:\/\/hooks.slack.com\/services\/XXXXXXXXX\/XXXXXXXXX\/XXXXXXXXXXXXXXXXXXXXXXXXX", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" } } } }

GET/v1/server/alert/{id}

Returns the specific information of an alert sent for a server.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/server/alert/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "time": 1586869535, "type": "email", "server_status": "0", "content": { "object": "[Hitflow.fr] Le serveur \"Hitflow Website\" est de nouveau op\u00e9rationnel", "html": "<html>\n<head>\n<meta charset=\"utf-8\">\n\n<style type=\"text\/css\">\nbody\n{\n\tpadding:0;\n\tmargin:0;\n\tcolor:#1d223d;\n\tbackground:#fff;\n}\n.header\n{\n\tmargin:0;\n\tpadding:10px 20px;\n\tcolor:#fff;\n\tbackground:#29292A;\n}\n.content\n{\n\tmargin:0;\n\tpadding:10px;\n}\n<\/style>\n<\/head>\n<body style=\"margin:0;padding:0;color:#1d223d;\" bgcolor=\"#fff\">\n\t<div class=\"header\" style=\"margin:0;padding:10px 20px;color:#fff;background:#29292A;\" bgcolor=\"#29292A\">Hitflow<\/div>\n\t<div class=\"content\" style=\"margin:0;padding:10px;color:#1d223d;\" bgcolor=\"#fff\">\n\t\t<p>Bonjour,<\/p>\n<p>Le serveur <strong>Hitflow Website<\/strong> (linux \/ xxx.xxx.xxx.xxx) est de nouveau op\u00e9rationnel.<\/p>\n<p>La perturbation constat\u00e9e sur le serveur a dur\u00e9e 5 minutes 16 secondes.<\/p>\n<p>Cordialement<\/p>\n<p>\n Hitflow<br \/>\n <a href=\"https:\/\/hitflow.net\" title=\"\">https:\/\/hitflow.net<\/a><br \/>\n <a href=\"https:\/\/twitter.com\/HitflowFR\" title=\"\">https:\/\/twitter.com\/HitflowFR<\/a>\n<\/p>\n\t<\/div>\n<\/body>\n<\/html>", "text": "Hitflow\n\nBonjour,\n\nLe serveur Hitflow Website (linux \/ xxx.xxx.xxx.xxx) est de nouveau op\u00e9rationnel.\n\nLa perturbation constat\u00e9e sur le serveur a dur\u00e9e 5 minutes 16 secondes.\n\nCordialement\nHitflow\nhttps:\/\/hitflow.net\nhttps:\/\/twitter.com\/HitflowFR" }, "to": "[email protected]" }

SSL Certificates

POST/v1/certificates/search

Returns the list of SSL certificate tests for the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

query

Type :String

Description :String of characters containing the search terms to be found in the list.

Required :No

Default value :-

status

Type :Array

Description :

Integer array to limit the display of entries :

  • 1 : Status is "deactivated"
  • 2 : Status is "error"
  • 3 : Status is "online"
  • 4 : Status is "unknown"

Required :No

Default value :-

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/certificates/search

Example of response

{ "error": 0, "count": 2, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow Website", "status": 0, "enable": true, "check_rate": "86400", "response_uptime": null, "url": "https:\/\/hitflow.net", "issuer": "Let's Encrypt Authority X3", "time_valide_from": "1587453091", "time_valide_to": "1595229091", "signatureTypeSN": "RSA-SHA256", "signatureTypeLN": "sha256WithRSAEncryption", "signatureTypeNID": "668", "hash": "1ae313a3", "certname": "\/CN=hitflow.net", "subject": { "CN": "hitflow.net" }, "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow Manager", "status": 0, "enable": true, "check_rate": "86400", "response_uptime": null, "url": "https:\/\/manager.hitflow.net", "issuer": "Let's Encrypt Authority X3", "time_valide_from": "1585087276", "time_valide_to": "1592863276", "signatureTypeSN": "RSA-SHA256", "signatureTypeLN": "sha256WithRSAEncryption", "signatureTypeNID": "668", "hash": "1c64231a", "certname": "\/CN=manager.hitflow.net", "subject": { "CN": "manager.hitflow.net" }, "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 }, } }

GET/v1/certificate/{id}

Returns the SSL Certificate test information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/certificate/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "time_create": 1574691015, "time_update": 1588435391, "time_enable": 1582732127, "time_disable": 1582513564, "time_down": null, "time_up": 1582732138, "time_delete": null, "time_lastcheck": 1588435391, "time_nextcheck": 1588521791, "time_lastreminder": 1588363806, "time_nextreminder": 1588450206, "name": "Hitflow Manager", "status": 0, "enable": true, "check_rate": "86400", "check_countries": null, "check_timeout": 60, "alert_contacts": ["5ccxxxxxxxxxxxxxxxxxxxxx"], "alert_onbackup": true, "alert_onchange": true, "response_uptime": null, "response_uptime_checkers": null, "response_data": null, "url": "https:\/\/manager.hitflow.net", "reminder_first": "15", "reminder_second": "7", "reminder_final": "3", "issuer": "Let's Encrypt Authority X3", "time_valide_from": "1585087276", "time_valide_to": "1592863276", "signatureTypeSN": "RSA-SHA256", "signatureTypeLN": "sha256WithRSAEncryption", "signatureTypeNID": "668", "hash": "1c64231a", "certname": "\/CN=manager.hitflow.net", "subject": { "CN": "manager.hitflow.net" } } }

PUT/v1/certificate/{id}/enable

Enables or disables monitoring of an SSL certificate.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/certificate/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=false"

Example of response

{ "error": 0, "status": false, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/certificate/{id}

Deletes the SSL Certificate test and related information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/certificate/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0 }

POST/v1/certificate/{id}/interval

Changes the check interval for testing the SSL certificate.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

interval

Type :Integer

Description :The interval must be one of the following values: 86400, 172800, 604800, 1296000.

Required :No

Default value :604800

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/certificate/5ccxxxxxxxxxxxxxxxxxxxxx/interval -d "interval=86400"

Example of response

{ "error": 0, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

Domain Names

POST/v1/domains/search

Returns the list of domain names to be monitored from the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

query

Type :String

Description :String of characters containing the search terms to be found in the list.

Required :No

Default value :-

status

Type :Array

Description :

Integer array to limit the display of entries :

  • 1 : Status is "deactivated"
  • 2 : Status is "error"
  • 3 : Status is "online"
  • 4 : Status is "unknown"

Required :No

Default value :-

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/domains/search

Example of response

{ "error": 0, "count": 2, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow NET", "status": 0, "enable": true, "check_rate": 86400, "domain_name": "hitflow.net", "registrar": "OVH sas", "owner": null, "time_valide_from": "1572566400", "time_valide_to": "1604249684", "state": "clientDeleteProhibited clientTransferProhibited", "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 2 }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "name": "Hitflow FR", "status": 0, "enable": true, "check_rate": 86400, "domain_name": "hitflow.fr", "registrar": "AFNIC", "owner": { "type": "PERSON", "contact": "Ano Nymous" }, "time_valide_from": "1508889600", "time_valide_to": "1603612087", "state": "ACTIVE", "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "count_contacts": 1 } } }

GET/v1/domain/{id}

Returns the domain name test information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/domain/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "time_create": 1574592912, "time_update": 1588367407, "time_enable": 1582732132, "time_disable": 1582513564, "time_down": 1580748624, "time_up": 1588367406, "time_delete": null, "time_lastcheck": 1588367406, "time_nextcheck": null, "time_lastreminder": 1588367406, "time_nextreminder": 1588453806, "name": "Hitflow NET", "status": 0, "enable": true, "check_rate": 86400, "alert_contacts": [ "5ccxxxxxxxxxxxxxxxxxxxxx", "5ccxxxxxxxxxxxxxxxxxxxxx" ], "alert_onbackup": true, "alert_onchange": true, "domain_name": "hitflow.net", "reminder_first": "30", "reminder_second": "7", "reminder_final": "3", "registrar": "OVH sas", "owner": null, "time_valide_from": "1572566400", "time_valide_to": "1604249684", "state": "clientDeleteProhibited clientTransferProhibited" } }

PUT/v1/domain/{id}/enable

Activates or deactivates the monitoring of a domain name.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/domain/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=false"

Example of response

{ "error": 0, "status": false, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/domain/{id}

Changes the check interval for the domain name test.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/domain/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error":0 }

Contacts

POST/v1/contacts/search

Returns the list of contacts for the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/contacts/search

Example of response

{ "error": 0, "count": 1, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "type": null, "locale": "en_US.utf8", "enable": false, "list": [{ "type": "email", "email": "[email protected]" }], "telegram_counter": 1, "name": "Default Contact", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, ... } }

GET/v1/contact/{id}

Returns contact information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/contact/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "type": null, "locale": "en_US.utf8", "timezone": "Europe\/Paris", "enable": false, "time_create": 1565713630, "time_update": 1578068747, "time_delete": null, "list": [{ "type": "email", "email": "[email protected]" }, { "type": "telegram", "linked": "false", "code": 00000000, "chat_id": null, "firstname": null, "username": null, "lastname": null }], "telegram_counter": 1, "email_format": "html", "hours_allowed": [ [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] ], "name": "Default contact", "uptimes": [{ "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "type": "icmp", "enable": true, "name": "Uptime Test", "host": "xxx.xxx.xxx.xxx", "port": null, "linked": false }, ... ], "certificates": [{ "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "enable": true, "name": "Certificat Test", "url": "https:\/\/hitflow.net", "linked": false }, ... ], "domains": [{ "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "enable": true, "name": "Domain Test", "domain_name": "hitflow.net", "linked": false }, ... ], "servers": [{ "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "enable": true, "name": "Server Test", "remote_addr": "xxx.xxx.xxx.xxx", "linked": false }, ... ] } }

PUT/v1/contact/{id}/enable

Enable or disable alerts for the contact.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/contact/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=true"

Example of response

{ "error": 0, "status": true, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/contact/{id}

Delete the contact from the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/contact/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error":0 }

Public Status Pages

POST/v1/statuspages/search

Returns the list of public status pages for the account.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/statuspages/search

Example of response

{ "error": 0, "count": 2, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "title": "status.hitflow.fr", "enable": true, "password": null, "uri_uid": "xxxxxxxxxxxxx", "uri_hostname": "status.hitflow.fr", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }, "5ccxxxxxxxxxxxxxxxxxxxxx": { "title": "status.hitflow.net", "enable": true, "password": null, "uri_uid": "xxxxxxxxxxxxx", "uri_hostname": "status.hitflow.net", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" } } }

GET/v1/statuspage/{id}

Returns information about the public status page.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/statuspage/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "time_create": 1574672721, "time_update": 1582732170, "time_delete": null, "time_disable": null, "title": "status.hitflow.net", "title_public": "Status of Hitflow.net services during the last 90 days....", "enable": true, "logo_url": null, "password": null, "uri_uid": "xxxxxxxxxxxxx", "uri_hostname": "status.hitflow.net", "uri_protocol": "http", "hits": [ "5ccxxxxxxxxxxxxxxxxxxxxx", "5ccxxxxxxxxxxxxxxxxxxxxx", "5ccxxxxxxxxxxxxxxxxxxxxx", "5ccxxxxxxxxxxxxxxxxxxxxx", "5ccxxxxxxxxxxxxxxxxxxxxx" ], "style_css": null, "auto_refresh": "0", "tracker_ga": "UA-xxxxxxxxx-x" } }

PUT/v1/statuspage/{id}/enable

Enables or disables access to the public status page.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/statuspage/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=true"

Example of response

{ "error": 0, "status": true, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/statuspage/{id}

Deletes the public status page and all information related to that page.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/statuspage/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0 }

Maintenances

POST/v1/maintenances/search

Returns the account maintenance list.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/maintenances/search

Example of response

{ "error": 0, "count": 1, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "time_begin": 1588586400, "time_end": 1588975140, "name": "Test Hitflow", "type": "weekly", "id": "5ccxxxxxxxxxxxxxxxxxxxxx" } } }

GET/v1/maintenance/{id}

Returns maintenance information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/maintenance/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "data": { "id": "5ccxxxxxxxxxxxxxxxxxxxxx", "version": 1, "account_id": "5ccxxxxxxxxxxxxxxxxxxxxx", "time_create": 1588411736, "time_update": 1588411736, "time_delete": null, "time_begin": 1588586400, "time_end": 1588975140, "name": "Test Hitflow", "type": "weekly", "auto_toggle": true, "uptimes": [ "5ccxxxxxxxxxxxxxxxxxxxxx", ], "servers": null, "repeat_done": false, "toggle_off_done": false, "toggle_on_done": false } }

DELETE/v1/maintenance/{id}

Deletes an account maintenance.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/maintenance/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0 }

Integrations

POST/v1/integrations/search

Returns the account integrations list.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

index

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :0

limit

Type :Integer

Description :Value from 0 to 1000.

Required :No

Default value :50

query

Type :String

Description :String of characters containing the search terms to be found in the list.

Required :No

Default value :-

types

Type :Array

Description :

Array containing the types of entries to be displayed in the list.
The possible values are : slack, zapier

Required :No

Default value :-

cURL Example

curl -XPOST -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/integrations/search

Example of response

{ "error":0, "count":1, "list": { "5ccxxxxxxxxxxxxxxxxxxxxx": { "type":"slack", "time_create":1592383925, "name":"Hitflow", "enable":true, "data": { "team_name":"Hitflow", "channel":"#hitflow-monitoring" }, "id":"5ccxxxxxxxxxxxxxxxxxxxxx" } } }

GET/v1/integration/{id}

Returns integration information.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XGET -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/integration/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error":0, "data": { "type":"slack", "time_create":1592383925, "time_update":1592389254, "time_enable":1592389241, "time_disable":null, "name":"Hitflow", "enable":true, "data": { "team_name":"Hitflow", "channel":"#hitflow-monitoring" }, "id":"5ccxxxxxxxxxxxxxxxxxxxxx" } }

PUT/v1/integration/{id}/enable

Enables or disables integration alerts.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

enable

Type :Boolean

Description :Parameter allowing activation (true) or deactivation (false).

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/integration/5ccxxxxxxxxxxxxxxxxxxxxx/enable -d "enable=true"

Example of response

{ "error": 0, "status": true, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }

DELETE/v1/integration/{id}

Deletes an account integration.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

cURL Example

curl -XDELETE -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/integration/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0 }

PUT/v1/integration/{id}

Rename an account integration.

Headers

  • HitFlow-Token-Access : Session Token
  • HitFlow-Account-Selected : Unique Account ID

Parameters

Name

Type

Description

Required

Default value

id

Type :String

Description :Unique identifier of the element (in the URL).

Required :Yes

Default value :-

name

Type :String

Description :

String containing the name of the entry.

Required :Yes

Default value :-

cURL Example

curl -XPUT -H "Content-type: application/x-www-form-urlencoded" -H "HitFlow-Token-Access: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -H "HitFlow-Account-Selected: 5ccxxxxxxxxxxxxxxxxxxxxx" https://wapi.hitflow.net/v1/integration/5ccxxxxxxxxxxxxxxxxxxxxx

Example of response

{ "error": 0, "id": "5ccxxxxxxxxxxxxxxxxxxxxx" }