{"_id":"ha-api","_rev":"27-0307e062a7c93fae5cb11d450a318aa2","name":"ha-api","description":"HAProxy remote controller","dist-tags":{"latest":"0.0.8"},"versions":{"0.0.0":{"name":"ha-api","version":"0.0.0","description":"HAProxy remote controller","main":"ha-api.js","dependencies":{"express":"~3.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.js"},"author":{"name":"Yan Corneille"},"license":"BSD","repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"keywords":["HAProxy","REST"],"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"_id":"ha-api@0.0.0","dist":{"shasum":"e359d20bd11ea781b97d2604cbb143b55331c186","tarball":"https://registry.npmjs.org/ha-api/-/ha-api-0.0.0.tgz","integrity":"sha512-17OupfXUEizFjq2kIdHxnwHIjq/gAOkdt1ubTtnIdN2KE62sOl9fbT5q/DIWuebTir8Ddo5lZgv+H5inf5niYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3TxgT4SDM4G2nm3MGlUACntstH8E34qjXJchvkcGjOAiEA2gif3y5koHBpTRtJkBukm6yVhrJGUQuL62FoE6mdUvw="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"treyone","email":"yan.corneille@gmail.com"},"maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}]},"0.0.2":{"name":"ha-api","version":"0.0.2","description":"HAProxy remote controller","main":"ha-api.js","dependencies":{"express":"~3.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.js"},"author":{"name":"Yan Corneille"},"license":"BSD","repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"keywords":["HAProxy","REST"],"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"_id":"ha-api@0.0.2","dist":{"shasum":"1cb6ab1ea70483f330a4cf72bd89fdf37b7c4e85","tarball":"https://registry.npmjs.org/ha-api/-/ha-api-0.0.2.tgz","integrity":"sha512-8uDbvJH8GQMy5iai+u6YbGedQRrh8L/DcAx0U/2+DwxMN04BxNDn7/ziePPfaWH5oeBaa1HTyRPAqep9xPgyDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4O7Zf7+OrPAuiAJUDb5gExyzbNRBNNpm0QVtsWmZbLAIhAICu3KfGzKpsC9rgNqGQQrwgVJ5sY6oVALB4kV3GoUoQ"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"treyone","email":"yan.corneille@gmail.com"},"maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}]},"0.0.4":{"name":"ha-api","version":"0.0.4","description":"HAProxy remote controller","main":"ha-api.js","dependencies":{"express":"~3.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.js"},"author":{"name":"Yan Corneille"},"license":"BSD","repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"keywords":["HAProxy","REST"],"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"_id":"ha-api@0.0.4","dist":{"shasum":"ee8e1abe4768ea6a46745882f92a04d871cf528e","tarball":"https://registry.npmjs.org/ha-api/-/ha-api-0.0.4.tgz","integrity":"sha512-+pso2llrZUIMxihjwzTiVBZV15Rp9EPY0P7Nh9QAc2YACr0JiWXv6IhU2v3FacSu8lTcoOUkXN2GaSZ9IibHgQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3W2xCJswNgr+L7sPtCOg1XKkvfo5mxcH881yPeTvA9gIhAPSkiszCltu3gSR00WEjqd/946HGpkgd9QCsSKLGmcdG"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"treyone","email":"yan.corneille@gmail.com"},"maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}]},"0.0.7":{"name":"ha-api","version":"0.0.7","description":"HAProxy remote controller","main":"ha-api.js","dependencies":{"express":"~3.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.js"},"author":{"name":"Yan Corneille"},"license":"BSD","repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"keywords":["HAProxy","REST","API"],"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"_id":"ha-api@0.0.7","dist":{"shasum":"f25f49999084e08dc713303e166d2ade27e645ef","tarball":"https://registry.npmjs.org/ha-api/-/ha-api-0.0.7.tgz","integrity":"sha512-9I+c1l4p+aVlrKjNbA1CNoW6zxLfSDZDTK0QpxodBwAASKayPyBO4UawRN/u2X41PEFa/zclQZaLREHGt7Nb7g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHJ+g93iGVo9ckhoZHN2heuAT94JTmyM5p/1cJ6YdIvfAiBE2jPXbeR/SLyQw2mNID7CfYTS6pMOVEfSG5AQEY7JLg=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"treyone","email":"yan.corneille@gmail.com"},"maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}]},"0.0.8":{"name":"ha-api","version":"0.0.8","description":"HAProxy remote controller","main":"ha-api.js","dependencies":{"express":"~3.5.0"},"devDependencies":{},"scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node server.js"},"author":{"name":"Yan Corneille"},"license":"BSD","repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"keywords":["HAProxy","REST","API"],"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"homepage":"https://github.com/Treyone/ha-api","_id":"ha-api@0.0.8","dist":{"shasum":"ec583febee154cfa2f634da79c5364c9c36e4f98","tarball":"https://registry.npmjs.org/ha-api/-/ha-api-0.0.8.tgz","integrity":"sha512-Cm+5KuklJ5N/vtXsLJKAIcPGeurq7BO1H/2MFYzJchzVzXerQeM+IuYntpHHB1VACRJ2ZutxSJiCBJrqBI9Fjw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDI0VPzza74VWMc8gMndoxzLSdsMDBfGBqYmS58qPA11AiAv8F3E3cOA0Cc7n7EY2qnRS6AmyGjdhbtymsYYzRKyYA=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"treyone","email":"yan.corneille@gmail.com"},"maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}]}},"readme":"A NodeJS API for HAProxy.\r\nThsi can be used to expose a REST API or to control haproxy from Javascript.\r\n\r\n# Usage #\r\n    var HAApi= require('ha-api'),\r\n\t\thaapi = new HAApi({\r\n\t\t\tsocket: {\r\n\t\t\t\thost : 'haproxy.address',\r\n\t\t\t\tport : 1234\r\n\t\t\t},\r\n\t\t\tapiPort : 1111\r\n\t\t})\r\n\t\r\n# Prerequisites #\r\nHAProxy must open its configuration socket. This is done in the haproxy.cfg file using the followinf syntax:\r\n\r\n**TCP socket**\r\n\r\n\t stats socket ipv4@0.0.0.0:1234 level admin\r\n\r\n**Local domain UNIX socket**\r\n\r\n \tstats socket /tmp/haproxy.sock level admin\r\n\t\r\n\r\n# Config Parameters #\r\n**socket** : HAProxy socket information. It can be either a TCP socket\r\n\t{\r\n\t\thost : 'haproxy.address',\r\n\t\tport : 1234\r\n\t}\r\nor a UNIX local socket :\r\n{\r\n\tsocket : '/tmp/haproxy.sock'\r\n}\r\n\r\n**app** : optional express() instance. If provided, API methods will be added to this isntance. If not, a new express() will be created.\r\n\r\n**apiPort** : TCP port to expose the REST API.  \r\n\r\n# Operations #\r\n## Get HAProxy Info ##\r\n**REST**\r\n\r\n\tGET /info\r\n**Javascript**\r\n\r\n\thaapi.info(callback);\r\n\r\n## Get Stats ##\r\n**REST**\r\n\r\n\tGET /stats\r\n**Javascript**\r\n\r\n\thaapi.stats(callback);\r\n\r\nReturns a JSON formatted view of HAProxy stats\r\n\r\n## Disable and enable frontend ##\r\n**REST**\r\n\r\n\tGET /frontend/[frontend name]/disable\r\n\tGET /frontend/[frontend name]/enable\r\n**Javascript**\r\n\t\r\n\thaapi.frontend('name').disable(callback);\r\n\r\n\r\n## Disable and enable a backend server ##\r\n**REST**\r\n\r\n\tGET /backend/[backend name]/server/[server name]/disable\r\n\tGET /backend/[backend name]/server/[server name]/enable\r\n\r\n**Javascript**\r\n\t\r\n\thaapi.backend('name').server('name').disable(callback);\r\n\thaapi.backend('name').server('name').enable(callback);","maintainers":[{"name":"treyone","email":"yan.corneille@gmail.com"}],"time":{"modified":"2022-06-18T18:36:25.101Z","created":"2014-03-21T14:52:43.669Z","0.0.0":"2014-03-21T14:52:45.190Z","0.0.2":"2014-03-21T16:34:57.070Z","0.0.4":"2014-03-24T16:56:34.663Z","0.0.7":"2014-03-28T10:16:40.790Z","0.0.8":"2014-05-28T11:45:49.231Z"},"readmeFilename":"readme.md","keywords":["HAProxy","REST","API"],"repository":{"type":"git","url":"https://github.com/Treyone/ha-api.git"},"author":{"name":"Yan Corneille"},"bugs":{"url":"https://github.com/Treyone/ha-api/issues"},"license":"BSD","homepage":"https://github.com/Treyone/ha-api","users":{"hans-d":true}}