{"id":20244529,"url":"https://github.com/retailmenotsandbox/flapjack-syrup","last_synced_at":"2025-06-13T20:39:56.724Z","repository":{"id":24822871,"uuid":"28237373","full_name":"RetailMeNotSandbox/flapjack-syrup","owner":"RetailMeNotSandbox","description":"Create or manipulate objects in your Flapjack environment","archived":false,"fork":false,"pushed_at":"2014-12-19T19:08:31.000Z","size":225,"stargazers_count":6,"open_issues_count":2,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-10T20:55:10.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RetailMeNotSandbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-12-19T16:41:27.000Z","updated_at":"2020-07-28T04:36:26.000Z","dependencies_parsed_at":"2022-07-25T14:32:31.484Z","dependency_job_id":null,"html_url":"https://github.com/RetailMeNotSandbox/flapjack-syrup","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RetailMeNotSandbox/flapjack-syrup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Fflapjack-syrup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Fflapjack-syrup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Fflapjack-syrup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Fflapjack-syrup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RetailMeNotSandbox","download_url":"https://codeload.github.com/RetailMeNotSandbox/flapjack-syrup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RetailMeNotSandbox%2Fflapjack-syrup/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259718193,"owners_count":22901179,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T09:15:56.114Z","updated_at":"2025-06-13T20:39:56.705Z","avatar_url":"https://github.com/RetailMeNotSandbox.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flapjack-syrup\n\nSyrup is a command-line utility for creating and modifying resources in a Flapjack environment.\n\n## Installation\n\nTo install directly from source, checkout the repository, navigate to the directory, and then install:\n\n    $ bundle install\n\nTo build and install a gem instead:\n\n    $ gem build flapjack-syrup.gemspec\n    $ gem install flapjack-syrup-\u003cVERSION\u003e.gem\n\n## Dependencies\n\n* ruby 1.9.3\n* flapjack-diner 1.0\n* methadone 1.7\n* trollop 2.0\n\n## Usage\n\nSyrup is a command-based app, similar to git, and is called with the following general form:\n\n    $ syrup --GLOBALS RESOURCE ACTION --OPTIONS\n\nGlobal arguments:\n\n    --host, -h \u003cs\u003e:   Host to connect to (default: localhost)\n    --port, -p \u003cs\u003e:   Port to connect to (default: 3081)\n     --log, -l \u003cs\u003e:   Flapjack API log (default: flapjack_diner.log)\n      --pretty, -r:   Pretty-print JSON output\n     --version, -v:   Print version and exit\n        --help, -e:   Show this message\n\n\nAvailable commands are listed below.\n\n### contact\n* [contact create](#contact-create)\n* [contact get](#contact-get)\n* [contact update](#contact-update)\n* [contact delete](#contact-delete)\n\n### medium\n* [medium create](#medium-create)\n* [medium get](#medium-get)\n* [medium update](#medium-update)\n* [medium delete](#medium-delete)\n\n### pagerduty\n* [pagerduty create](#pagerduty-create)\n* [pagerduty get](#pagerduty-get)\n* [pagerduty update](#pagerduty-update)\n* [pagerduty delete](#pagerduty-delete)\n\n### rule\n* [rule create](#rule-create)\n* [rule get](#rule-get)\n* [rule update](#rule-update)\n* [rule delete](#rule-delete)\n\n### entity\n* [entity create-ALL](#entity-create-ALL)\n* [entity get](#entity-get)\n* [entity update](#entity-update)\n* [entity status](#entity-create)\n* [entity test](#entity-delete)\n\n### check\n* [check update](#check-update)\n* [check status](#check-status)\n* [check test](#check-test)\n\n----\n\n### contact create\n\nCreate a new contact.\n\nBy default, this will create a new e-mail medium attached to the contact.\n\nNOTE: Flapjack creates and maintains a 'default' notification rule for all contacts. You can modify the 'blackhole' attributes on this rule, but any other changes will cause a new blank rule to be created.\n\nExample:\n\n    syrup --GLOBALS contact create --first-name FIRST --last-name LAST --email EMAIL\n\nAvailable options:\n\n                  --id, -i \u003cs\u003e:   Unique identifier (generated if omitted)\n          --first-name, -f \u003cs\u003e:   First name (required)\n           --last-name, -l \u003cs\u003e:   Last name (required)\n               --email, -e \u003cs\u003e:   Email address (required)\n            --interval, -n \u003ci\u003e:   Notification interval for email (default: 7200)\n    --rollup-threshold, -r \u003ci\u003e:   Rollup threshold for email (default: 0)\n            --timezone, -t \u003cs\u003e:   Time zone\n                --tags, -a \u003cs\u003e:   Tags (comma-separated)\n                --no-media, -o:   Do not automatically create the email medium\n                    --help, -h:   Show this message\n\n### contact get\n\nGet JSON contact data.\n\nSpecify IDs as comma-separated values, or no IDs to get all contacts.\n\nExample:\n\n    syrup --GLOBALS contact get [--ids FIRST,SECOND,THIRD]\n\nAvailable options:\n\n    --ids, -i \u003cs\u003e:   Contact identifiers (comma-separated, or get all if omitted)\n       --help, -h:   Show this message\n\n### contact update\n\nModify existing contacts.\n\nSpecify IDs as comma-separated values, or no IDs to update all contacts.\n\nExample:\n\n    syrup --GLOBALS contact update [--ids FIRST,SECOND] [--first_name FIRST] [--add_entities ID1,ID2,ID3]\n\nOptions:\n\n                --ids, -i \u003cs\u003e:   Contact identifiers (comma-separated)\n         --first-name, -f \u003cs\u003e:   First name\n          --last-name, -l \u003cs\u003e:   Last name\n              --email, -e \u003cs\u003e:   Email address (of the CONTACT, not the notification medium)\n           --timezone, -t \u003cs\u003e:   Time zone\n               --tags, -a \u003cs\u003e:   Replace all tags on contact (comma-separated)\n       --add-entities, -d \u003cs\u003e:   Link to entities (comma-separated)\n    --remove-entities, -r \u003cs\u003e:   Unlink from entities (comma-separated)\n          --add-rules, -u \u003cs\u003e:   Apply notification rules (comma-separated)\n       --remove-rules, -m \u003cs\u003e:   Remove notification rules (comma-separated)\n                   --help, -h:   Show this message\n\n### contact delete\n\nDelete contacts.\n\nSpecify IDs as comma-separated values.\n\nExample:\n\n    syrup --GLOBALS contact delete --ids FIRST,SECOND,THIRD\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Contact identifiers (comma-separated)\n       --help, -h:   Show this message\n\n### medium create\n\nCreate a new notification medium for a contact.\n\nSupported media types are `email`, `jabber`, and `sms`. PagerDuty is handled separately - see `pagerduty create` below.\n\nExample:\n\n    syrup --GLOBALS medium create --id CONTACT --type TYPE --address ADDRESS\n\nOptions:\n\n                  --id, -i \u003cs\u003e:   Parent contact ID (required)\n                --type, -t \u003cs\u003e:   Medium type (required)\n             --address, -a \u003cs\u003e:   Medium address (required)\n            --interval, -n \u003ci\u003e:   Notification interval (default: 7200)\n    --rollup-threshold, -r \u003ci\u003e:   Rollup threshold (default: 0)\n                    --help, -h:   Show this message\n\n### medium get\n\nGet JSON medium data.\n\nSpecify IDs as comma-separated values, or no IDs to get all media.\n\nExample:\n\n    syrup --GLOBALS medium get [--ids FIRST,SECOND,THIRD]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Media Identifiers (comma-separated, form \"\u003ccontactID\u003e_\u003ctype\u003e\")\n       --help, -h:   Show this message\n\n### medium update\n\nModify existing media.\n\nSpecify IDs as comma-separated values, or no IDs to update all media.\n\nExample:\n\n    syrup --GLOBALS medium update [--ids FIRST,SECOND] [--address ADDRESS] [--interval INTERVAL]\n\nOptions:\n\n                 --ids, -i \u003cs\u003e:   Media identifiers (comma-separated, form \"\u003ccontactID\u003e_\u003ctype\u003e\")\n             --address, -a \u003cs\u003e:   New medium address\n            --interval, -n \u003cs\u003e:   New medium interval\n    --rollup-threshold, -r \u003cs\u003e:   New rollup threshold\n                    --help, -h:   Show this message\n\n### medium delete\n\nDelete media.\n\nSpecify IDs as comma-separated values.\n\nExample:\n\n    syrup --GLOBALS medium delete --ids FIRST,SECOND,THIRD\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Media identifiers (comma-separated, form \"\u003ccontactID\u003e_\u003ctype\u003e\", required)\n       --help, -h:   Show this message\n\n### pagerduty create\n\nGive PagerDuty credentials to a contact.\n\nPagerDuty is handled separately from media because it uses its own unique API calls.\n\nExample:\n\n    syrup --GLOBALS pagerduty create --id CONTACT --service-key KEY --username USER --password PASS [--subdomain DOMAIN]\n\nOptions:\n\n             --id, -i \u003cs\u003e:   Parent contact ID (required)\n    --service-key, -s \u003cs\u003e:   PagerDuty service key\n      --subdomain, -u \u003cs\u003e:   PagerDuty subdomain\n       --username, -e \u003cs\u003e:   PagerDuty username\n       --password, -p \u003cs\u003e:   PagerDuty password\n               --help, -h:   Show this message\n\n### pagerduty get\n\nGet JSON pagerduty credentials.\n\nSpecify contact IDs as comma-separated values, or no IDs to get all.\n\nExample:\n\n    syrup --GLOBALS pagerduty get [--ids FIRST,SECOND,THIRD]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Contact identifiers (comma-separated, or get all if omitted)\n       --help, -h:   Show this message\n\n### pagerduty update\n\nModify existing pagerduty credentials.\n\nSpecify contact IDs as comma-separated values, or no IDs to update all.\n\nExample:\n\n    syrup --GLOBALS pagerduty update [--ids FIRST,SECOND] [--username USER] [--password PASS]\n\nOptions:\n\n            --ids, -i \u003cs\u003e:   Parent contact IDs\n    --service-key, -s \u003cs\u003e:   PagerDuty service key\n      --subdomain, -u \u003cs\u003e:   PagerDuty subdomain\n       --username, -e \u003cs\u003e:   PagerDuty username\n       --password, -p \u003cs\u003e:   PagerDuty password\n               --help, -h:   Show this message\n\n### pagerduty delete\n\nDelete PagerDuty credentials from a contact.\n\nSpecify contact IDs as comma-separated values.\n\nExample:\n\n    syrup --GLOBALS pagerduty delete --ids FIRST,SECOND,THIRD\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Contact identifiers (comma-separated, required)\n       --help, -h:   Show this message\n\n### rule create\n\nCreate a notification rule.\n\nNotification rules monitor a specific set of entities. This can be defined in any combination of four ways:\n\n  * A list of entity names\n  * A regular expression for entity names\n  * A list of entity tags\n  * A regular expression for entity tags\n\nEach rule has a single contact to notify, and a set of media types to use for each alert type (`UNKNOWN`, `WARNING`, `CRITICAL`).\n\nNotifications can be disabled for an alert type by setting the \"blackhole\" state on that type.\n\nExample:\n\n    syrup --GLOBALS rule create --id CONTACT [--entities ONE,TWO] [--regex-entities /RX1/,/RX2/] [--critical-media email,jabber]\n\nOptions:\n\n                --id, -i \u003cs\u003e:   ID of contact to notify (required)\n          --entities, -e \u003cs\u003e:   Entities (comma-separated)\n    --regex-entities, -r \u003cs\u003e:   Entity regex (comma-separated)\n              --tags, -t \u003cs\u003e:   Tags (comma-separated)\n        --regex-tags, -g \u003cs\u003e:   Tag regex (comma-separated)\n     --unknown-media, -u \u003cs\u003e:   UNKNOWN notification media types (comma-separated)\n     --warning-media, -w \u003cs\u003e:   WARNING notification media types (comma-separated)\n    --critical-media, -c \u003cs\u003e:   CRITICAL notification media types (comma-separated)\n     --unknown-blackhole, -n:   Flag to ignore UNKNOWN alerts\n     --warning-blackhole, -a:   Flag to ignore WARNING alerts\n    --critical-blackhole, -l:   Flag to ignore CRITICAL alerts\n                  --help, -h:   Show this message\n\n### rule get\n\nGet JSON notification rule data.\n\nSpecify IDs as comma-separated values, or no IDs to get all.\n\nExample:\n\n    syrup --GLOBALS rule get [--ids FIRST,SECOND,THIRD]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Rule identifiers (comma-separated, or get all if omitted)\n       --help, -h:   Show this message\n\n### rule update\n\nModify a notification rule.\n\nSpecify IDs as comma-separated values, or no IDs to modify all.\n\nNotification rules monitor a specific set of entities. This can be defined in any combination of four ways:\n\n  * A list of entity names\n  * A regular expression for entity names\n  * A list of entity tags\n  * A regular expression for entity tags\n\nEach rule has a single contact to notify, and a set of media types to use for each alert type (`UNKNOWN`, `WARNING`, `CRITICAL`).\n\nNotifications can be disabled for an alert type by setting the \"blackhole\" flag, or reactivated with the \"active\" flag.\n\nNOTE: Flapjack creates and maintains a 'default' notification rule for all contacts. You can modify the 'blackhole' attributes on this rule, but any other changes will cause a new blank rule to be created.\n\nExample:\n\n    syrup --GLOBALS rule update [--ids ONE,TWO] [--entities ONE,TWO] [--regex-entities /RX1/,/RX2/] [--critical-media email,jabber] [--unknown-blackhole] [--critical-active]\n\nOptions:\n\n               --ids, -i \u003cs\u003e:   Rule IDs to apply changes to\n          --entities, -e \u003cs\u003e:   Entity names (comma-separated)\n    --regex-entities, -r \u003cs\u003e:   Entity regexes (comma-separated)\n              --tags, -t \u003cs\u003e:   Tags (comma-separated)\n        --regex-tags, -g \u003cs\u003e:   Tag regexes (comma-separated)\n     --unknown-media, -u \u003cs\u003e:   UNKNOWN notification media types (comma-separated)\n     --warning-media, -w \u003cs\u003e:   WARNING notification media types (comma-separated)\n    --critical-media, -c \u003cs\u003e:   CRITICAL notification media types (comma-separated)\n     --unknown-blackhole, -n:   Ignore UNKNOWN alerts\n     --warning-blackhole, -a:   Ignore WARNING alerts\n    --critical-blackhole, -l:   Ignore CRITICAL alerts\n        --unknown-active, -k:   Activate UNKNOWN alerts\n        --warning-active, -v:   Activate WARNING alerts\n           --critical-active:   Activate CRITICAL alerts\n                  --help, -h:   Show this message\n\n### rule delete\n\nDelete a notification rule.\n\nSpecify IDs as comma-separated values.\n\nExample:\n\n    syrup --GLOBALS rule delete --ids FIRST,SECOND,THIRD\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Rule identifiers (comma-separated, required)\n       --help, -h:   Show this message\n\n### entity create-ALL\n\nCreate special 'ALL' entity.\n\nThe 'ALL' entity (ID ALL, name ALL) is a special entity that aggregates all entities.\n\nTo use ALL, attach a user to the entity. Update the user's default notification rule to enable 'blackhole' for all alert types, then add another rule to allow specific checks or entities.\n\nExample:\n\n  syrup --GLOBALS entity create-ALL\n\nOptions:\n\n    --help, -h:   Show this message\n\n### entity get\n\nGet JSON entity data.\n\nSpecify IDs as comma-separated values, or no IDs to get all.\n\nExample:\n\n    syrup --GLOBALS entity get [--ids FIRST,SECOND,THIRD]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Entity identifiers (comma-separated, or get all if omitted)\n       --help, -h:   Show this message\n\n### entity update\n\nModify an entity.\n\nSpecify IDs as comma-separated values, or no IDs to modify all.\n\nExample:\n\n    syrup --GLOBALS entity update [--ids ONE,TWO] [--add-tags TAG1,TAG2] [--remove-tags TAG3] [--add-contacts ID1,ID2] [--remove-contacts ID3]\n\nOptions:\n\n                --ids, -i \u003cs\u003e:   Entity identifiers (comma-separated, or get all if omitted)\n       --add-contacts, -d \u003cs\u003e:   Add contacts for this entity (comma-separated)\n    --remove-contacts, -e \u003cs\u003e:   Remove contacts for this entity (comma-separated)\n                   --help, -h:   Show this message\n\n### entity status\n\nGet JSON entity status data.\n\nSpecify IDs as comma-separated values, or no IDs to get all.\n\nEntity status includes detailed information on every check linked to that entity ID.\n\nExample:\n\n    syrup --GLOBALS entity status [--ids FIRST,SECOND,THIRD]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Entities to get status for (comma-separated)\n       --help, -h:   Show this message\n\n### entity test\n\nTest notifications for an entity.\n\nSpecify IDs as comma-separated values, or no IDs to get all.\n\nRunning this command will send a test notification on every check for the entity, in the same way that a real alert would be\napplied.\n\nExample:\n\n    syrup --GLOBALS entity test [--ids FIRST,SECOND,THIRD] [--summary 'Testing entities']\n\nOptions:\n\n        --ids, -i \u003cs\u003e:   Entities to test notifications for (comma-separated)\n    --summary, -s \u003cs\u003e:   Notification text to send\n           --help, -h:   Show this message\n\n### check update\n\nModify a check.\n\nSpecify IDs as comma-separated values, or no IDs to update all.\n\nCheck IDS are a combination of the entity name and check name, separated by a colon.\n\nNote that tagging support is listed on the flapjack-diner page, and may be coming with the next Flapjack release.\n\nWARNING: There is no way to re-enable a check via the API once it has been disabled! Flapjack will re-enable it when a new event is received for it.\n\n\nExample:\n\n    syrup --GLOBALS check update [--ids ENTITY:CHECK,ENTITY:CHECK] [--add_tags TAG,TAG] [--disable]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Check identifiers (comma-separated, format \"\u003centity_name\u003e:\u003ccheck_name\u003e\")\n    --disable, -d:   Disable the check\n       --help, -h:   Show this message\n\n### check status\n\nGet JSON check status data.\n\nSpecify IDs as comma-separated values, or no IDs to get all. Check IDS are a combination of the entity name and check name,\nseparated by a colon.\n\n\nExample:\n\n    syrup --GLOBALS check status [--ids ENTITY:CHECK,ENTITY:CHECK,ENTITY:CHECK]\n\nOptions:\n\n    --ids, -i \u003cs\u003e:   Checks to get status for (comma-separated, format \"\u003centity_name\u003e:\u003ccheck_name\u003e\")\n       --help, -h:   Show this message\n\n### check test\n\nTest notifications for a check.\n\nSpecify IDs as comma-separated values. Check IDS are a combination of the entity name and check name, separated by a colon.\n\nRunning this command will send a test notification on the check, in the same way that a real alert would be applied.\n\nExample:\n\n    syrup --GLOBALS check test --ids ENTITY:CHECK,ENTITY:CHECK,ENTITY:CHECK [--summary 'Testing checks']\n\nOptions:\n\n        --ids, -i \u003cs\u003e:   Checks to test notifications for (comma-separated, format \"\u003centity_name\u003e:\u003ccheck_name\u003e\")\n    --summary, -s \u003cs\u003e:   Notification text to send\n           --help, -h:   Show this message\n\n## Contributing\n\n1. Create an issue on GitHub\n2. Fork the project into your personal account\n3. Make your changes\n4. Submit a Pull Request\n\nPlease include tests with your changes. Adding tests for existing work is also greatly appreciated.\n\n## License\n\nThis project is released under the MIT License. See LICENSE.txt for details.\n\nCopyright (c) 2014 RetailMeNot, Inc.\n\nCode developed by Geoff Hicks (ghicks-rmn and gffhcks on GitHub)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailmenotsandbox%2Fflapjack-syrup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretailmenotsandbox%2Fflapjack-syrup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailmenotsandbox%2Fflapjack-syrup/lists"}