flagsmith api
Call the Flagsmith API with the CLI’s credentials
flagsmith api <path> [flags]Examples
# GET any endpoint with the CLI's credentials applied
flagsmith api api/v1/organisations/
# typed fields build a JSON body (POST is implied)
flagsmith api api/v1/projects/ -F name="Acme" -F organisation=13
# -X sets the method — e.g. a bodiless DELETE
flagsmith api api/v1/projects/102/ -X DELETE
# call the SDK API with the environment key instead
flagsmith api --sdk api/v1/flags/Options
-F, --field stringArray typed field key=value (repeatable)
-H, --header stringArray request header 'Name: value' (repeatable)
-h, --help help for api
-i, --include include the response status line and headers
--input string request body from a file, or - for stdin
-X, --method string HTTP method (default "GET")
-f, --raw-field stringArray string field key=value (repeatable)
--sdk call the SDK API with the environment key instead of the Admin APIOptions inherited from parent commands
--api-url string Flagsmith API base URL (env: FLAGSMITH_API_URL) (default "https://api.flagsmith.com")
-c, --config-path string path to flagsmith.json (env: FLAGSMITH_CONFIG_PATH)
-e, --environment string environment as its client-side SDK key (env: FLAGSMITH_ENVIRONMENT)
--jq string filter JSON output through a jq expression (implies --json)
--json output JSON instead of human-readable text (env: FLAGSMITH_JSON_OUTPUT)
--no-input never prompt or open a browser; fail if required input is missing (env: FLAGSMITH_NO_INPUT)
--organisation string organisation ID or name (env: FLAGSMITH_ORGANISATION)
-p, --project string project ID or name (env: FLAGSMITH_PROJECT)
--sdk-api-url string SDK API base URL for flag evaluation (env: FLAGSMITH_SDK_API_URL)
--yes answer confirmations affirmativelySEE ALSO
- flagsmith - The Flagsmith command-line interface