{"openapi":"3.0.2","info":{"title":"api Public API","version":"1.0.0"},"servers":[{"url":"https:\/\/api.zenmanage.com"}],"paths":{"\/v1\/flags":{"get":{"summary":"Retrieve all flags","description":"Evaluate and retrieve the complete list of active flags for a given environment.","parameters":[{"name":"x-zenmanage-context","in":"header","description":"The context information that is used to determine how flags should be evaluated.","required":false,"schema":{"$ref":"#\/components\/schemas\/Context"}},{"name":"x-default-value","in":"header","description":"The default value that is used if a response is not received from the API.","required":false,"schema":{"$ref":"#\/components\/schemas\/DefaultValue"}}],"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/Flag"}}}}}}},"401":{"$ref":"#\/components\/responses\/ErrorForbidden"},"500":{"$ref":"#\/components\/responses\/InternalServerError"}}}},"\/v1\/flags\/{flagKey}":{"get":{"summary":"Retrieve individual flags","description":"Evaluate and retrieve an individual active flags for a given environment.","parameters":[{"name":"x-zenmanage-context","in":"header","description":"The context information that is used to determine how flags should be evaluated.","required":false,"schema":{"$ref":"#\/components\/schemas\/Context"}},{"name":"x-default-value","in":"header","description":"The default value that is used if a response is not received from the API.","required":false,"schema":{"$ref":"#\/components\/schemas\/DefaultValue"}}],"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"},"data":{"type":"object","properties":{"flag":{"type":"object","properties":{"":{"$ref":"#\/components\/schemas\/Flag"}}}}}}}}}},"401":{"$ref":"#\/components\/responses\/ErrorForbidden"},"404":{"$ref":"#\/components\/responses\/ErrorNotFound"},"500":{"$ref":"#\/components\/responses\/InternalServerError"}}}},"\/v1\/flags\/{flagKey}\/usage":{"post":{"summary":"Store flag usage","description":"Stores flag usage for a given environment.","parameters":[{"name":"flagKey","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"success"}}}}}},"401":{"$ref":"#\/components\/responses\/ErrorForbidden"},"404":{"$ref":"#\/components\/responses\/ErrorNotFound"}}}}},"components":{"schemas":{"Context":{"type":"object","properties":{"type":{"type":"string","example":"user"},"name":{"type":"string","example":"John Doe"},"identifier":{"type":"string","example":"5ca10e14-f587-4805-9d48-e00c76f9e780"},"attributes":{"type":"object","properties":{"":{"anyOf":[{"type":"boolean","example":true},{"type":"integer","example":12456},{"type":"string","example":"west"},{"type":"array","items":{"type":"string","example":"AB2912"}}]}}}}},"DefaultValue":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"feature-flag"},"name":{"type":"string","example":"test-value"},"type":{"enum":["string","number","boolean"],"type":"string"}}}},"Flag":{"type":"object","properties":{"key":{"type":"string","example":"feature-flag"},"name":{"type":"string","example":"Feature Flag"},"type":{"enum":["string","number","boolean"],"type":"string"},"value":{"oneOf":[{"type":"object","properties":{"string":{"type":"string","example":"This is a string"}}},{"type":"object","properties":{"number":{"type":"number","example":123}}},{"type":"object","properties":{"boolean":{"type":"boolean","example":false}}}]}}},"FlagUsageHistory":{"type":"object","properties":{"period":{"type":"string","example":"7d"},"interval":{"type":"string","example":"day"},"compare":{"type":"boolean","example":true},"range":{"type":"object","properties":{"start":{"format":"date-time","type":"string","example":"2026-03-03T00:00:00Z"},"end":{"format":"date-time","type":"string","example":"2026-03-09T00:00:00Z"}}},"points":{"type":"array","items":{"type":"object","properties":{"bucket_start":{"type":"string","example":"2026-03-09T00:00:00Z"},"count":{"type":"integer","example":20},"previous_count":{"type":"integer","nullable":true,"example":14},"delta":{"type":"integer","nullable":true,"example":6},"value_breakdown":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"01valueulidexample"},"label":{"type":"string","example":"on"},"color":{"type":"string","example":"#0ea5e9"},"count":{"type":"integer","example":12}}}}}}},"value_series":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","example":"01valueulidexample"},"label":{"type":"string","example":"on"},"color":{"type":"string","example":"#0ea5e9"},"total":{"type":"integer","example":100}}}},"totals":{"type":"object","properties":{"current":{"type":"integer","example":120},"previous":{"type":"integer","nullable":true,"example":100},"delta":{"type":"integer","nullable":true,"example":20},"change_percent":{"type":"number","nullable":true,"example":20}}}}}},"responses":{"ErrorForbidden":{"description":"Unauthorized access.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"message":{"type":"string","example":"Invalid API key provided."}}}}}},"InternalServerError":{"description":"Internal Server Error.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"message":{"type":"string","example":"Internal Server Error"}}}}}},"ErrorNotFound":{"description":"Not Found.","content":{"application\/json":{"schema":{"type":"object","properties":{"status":{"type":"string","example":"error"},"message":{"type":"string","example":"Flag not found."}}}}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}}},"security":{"ApiKeyAuth":[]}}