openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 48.3 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"email":"support@launchdarkly.com","name":"LaunchDarkly Support","url":"https://support.launchdarkly.com","x-twitter":"launchdarkly"},"description":"Build custom integrations with the LaunchDarkly REST API","license":{"name":"Apache 2.0","url":"http://www.apache.org/licenses/LICENSE-2.0.html"},"termsOfService":"https://launchdarkly.com/terms","title":"LaunchDarkly","version":"2.0.5","x-apisguru-categories":["developer_tools"],"x-logo":{"url":"https://twitter.com/launchdarkly/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://launchdarkly.github.io/ld-openapi/swagger.json","version":"2.0"}],"x-providerName":"launchdarkly.com"},"security":[{"Token":[]}],"paths":{"/":{"get":{"description":"You can issue a GET request to the root resource to find all of the resource categories supported by the API.","operationId":"getRoot","responses":{"200":{"$ref":"#/components/responses/Root200"},"401":{"$ref":"#/components/responses/Standard401"}},"tags":["Root"]}},"/auditlog":{"get":{"operationId":"getAuditLogEntries","parameters":[{"$ref":"#/components/parameters/Before"},{"$ref":"#/components/parameters/After"},{"$ref":"#/components/parameters/Q"},{"$ref":"#/components/parameters/AuditLimit"},{"$ref":"#/components/parameters/Spec"}],"responses":{"200":{"description":"Audit log entries response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogEntries"}}}},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.","tags":["Audit log"]}},"/auditlog/{resourceId}":{"get":{"operationId":"getAuditLogEntry","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"description":"Audit log entry response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditLogEntry"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Use this endpoint to fetch a single audit log entry by its resouce ID.","tags":["Audit log"]}},"/flag-statuses/{projectKey}/{environmentKey}":{"get":{"operationId":"getFeatureFlagStatuses","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"}],"responses":{"200":{"description":"List of feature flag statuses.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagStatuses"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag.","tags":["Feature flags"]}},"/flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey}":{"get":{"operationId":"getFeatureFlagStatus","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/FeatureFlagKey"}],"responses":{"200":{"description":"Status of the requested feature flag.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlagStatus"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get the status for a particular feature flag.","tags":["Feature flags"]}},"/flags/{projectKey}":{"get":{"operationId":"getFeatureFlags","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKeyQuery"},{"$ref":"#/components/parameters/Tag"}],"responses":{"200":{"description":"Flags response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlags"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get a list of all features in the given project.","tags":["Feature flags"]},"post":{"operationId":"postFeatureFlag","parameters":[{"$ref":"#/components/parameters/ProjectKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"includeInSnippet":{"description":"Whether or not this flag should be made available to the client-side JavaScript SDK.","type":"boolean"},"key":{"description":"A unique key that will be used to reference the flag in your code.","example":"new-test-flag","type":"string"},"name":{"description":"A human-friendly name for the feature flag. Remember to note if this flag is intended to be temporary or permanent.","example":"new test flag","type":"string"},"tags":{"description":"Tags for the feature flag.","items":{"example":"[]","type":"string"},"type":"array"},"temporary":{"description":"Whether or not the flag is a temporary flag.","type":"boolean"},"variations":{"description":"An array of possible variations for the flag.","items":{"$ref":"#/components/schemas/Variation"},"type":"array"}},"required":["name","key","variations"],"type":"object"}}},"description":"Create a new feature flag.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Creates a new feature flag.","tags":["Feature flags"]}},"/flags/{projectKey}/{featureFlagKey}":{"delete":{"operationId":"deleteFeatureFlag","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/FeatureFlagKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application.","tags":["Feature flags"]},"get":{"operationId":"getFeatureFlag","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/FeatureFlagKey"},{"$ref":"#/components/parameters/EnvironmentKeyQuery"}],"responses":{"200":{"description":"Flag response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlag"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Get a single feature flag by key.","tags":["Feature flags"]},"patch":{"operationId":"patchFeatureFlag","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/FeatureFlagKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"comment":{"example":"This is a comment string","type":"string"},"patch":{"items":{"$ref":"#/components/schemas/PatchOperation"},"type":"array"}},"type":"object"}}},"description":"Requires a JSON Patch representation of the desired changes to the project, and an optional comment. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.","required":true},"responses":{"200":{"$ref":"#/components/responses/FeatureFlags200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Perform a partial update to a feature.","tags":["Feature flags"]}},"/members":{"get":{"operationId":"getMembers","responses":{"200":{"description":"Projects response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Members"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Returns a list of all members in the account.","tags":["Team members"]},"post":{"operationId":"postMembers","requestBody":{"content":{"application/json":{"schema":{"items":{"properties":{"customRoles":{"items":{"$ref":"#/components/schemas/CustomRoleKeyOrId"},"type":"array"},"email":{"example":"exampleuser@email.com","type":"string"},"firstName":{"example":"Bob","type":"string"},"inlineRole":{"$ref":"#/components/schemas/Statements"},"lastName":{"example":"Loblaw","type":"string"},"role":{"$ref":"#/components/schemas/Role"}},"required":["email"],"type":"object"},"type":"array"}}},"description":"New members to invite.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Invite new members.","tags":["Team members"]}},"/members/{memberId}":{"delete":{"operationId":"deleteMember","parameters":[{"$ref":"#/components/parameters/MemberId"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a team member by ID.","tags":["Team members"]},"get":{"operationId":"getMember","parameters":[{"$ref":"#/components/parameters/MemberId"}],"responses":{"200":{"$ref":"#/components/responses/Member200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get a single team member by ID.","tags":["Team members"]},"patch":{"operationId":"patchMember","parameters":[{"$ref":"#/components/parameters/MemberId"}],"requestBody":{"$ref":"#/components/requestBodies/PatchOperationArray"},"responses":{"200":{"$ref":"#/components/responses/Member200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Modify a team member by ID.","tags":["Team members"]}},"/projects":{"get":{"operationId":"getProjects","responses":{"200":{"description":"Projects response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Projects"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Returns a list of all projects in the account.","tags":["Projects"]},"post":{"operationId":"postProject","requestBody":{"content":{"application/json":{"schema":{"properties":{"key":{"example":"new-project","type":"string"},"name":{"example":"New Project","type":"string"}},"required":["name","key"],"type":"object"}}},"description":"Project keys must be unique within an account.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Create a new project with the given key and name.","tags":["Projects"]}},"/projects/{projectKey}":{"delete":{"operationId":"deleteProject","parameters":[{"$ref":"#/components/parameters/ProjectKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account.","tags":["Projects"]},"get":{"operationId":"getProject","parameters":[{"$ref":"#/components/parameters/ProjectKey"}],"responses":{"200":{"$ref":"#/components/responses/Projects200"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Fetch a single project by key.","tags":["Projects"]},"patch":{"operationId":"patchProject","parameters":[{"$ref":"#/components/parameters/ProjectKey"}],"requestBody":{"$ref":"#/components/requestBodies/PatchOperationArray"},"responses":{"200":{"$ref":"#/components/responses/Projects200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Modify a project by ID.","tags":["Projects"]}},"/projects/{projectKey}/environments":{"post":{"operationId":"postEnvironment","parameters":[{"$ref":"#/components/parameters/ProjectKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"color":{"description":"A color swatch (as an RGB hex value with no leading '#', e.g. C8C8C8).","example":"417505","type":"string"},"defaultTtl":{"description":"The default TTL for the new environment.","example":0,"type":"number"},"key":{"description":"A project-unique key for the new environment.","example":"dev","type":"string"},"name":{"description":"The name of the new environment.","example":"Development","type":"string"}},"required":["name","key","color"],"type":"object"}}},"description":"New environment.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Create a new environment in a specified project with a given name, key, and swatch color.","tags":["Environments"]}},"/projects/{projectKey}/environments/{environmentKey}":{"delete":{"operationId":"deleteEnvironment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete an environment in a specific project.","tags":["Environments"]},"get":{"operationId":"getEnvironment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"}],"responses":{"200":{"description":"Environment response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Get an environment given a project and key.","tags":["Environments"]},"patch":{"operationId":"patchEnvironment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"}],"requestBody":{"$ref":"#/components/requestBodies/PatchOperationArray"},"responses":{"200":{"description":"Environment response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Environment"}}}},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Modify an environment by ID.","tags":["Environments"]}},"/roles":{"get":{"operationId":"getCustomRoles","responses":{"200":{"description":"Custom roles response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRoles"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Return a complete list of custom roles.","tags":["Custom roles"]},"post":{"operationId":"postCustomRole","requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"Description of the custom role.","example":"Description of revenue team role here","type":"string"},"key":{"$ref":"#/components/schemas/CustomRoleKeyOrId"},"name":{"description":"Name of the custom role.","example":"revenue team","type":"string"},"policy":{"items":{"$ref":"#/components/schemas/Policy"},"type":"array"}},"required":["name","key","policy"],"type":"object"}}},"description":"New role or roles to create.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Create a new custom role.","tags":["Custom roles"]}},"/roles/{customRoleKey}":{"delete":{"operationId":"deleteCustomRole","parameters":[{"$ref":"#/components/parameters/CustomRoleKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a custom role by key.","tags":["Custom roles"]},"get":{"operationId":"getCustomRole","parameters":[{"$ref":"#/components/parameters/CustomRoleKey"}],"responses":{"200":{"$ref":"#/components/responses/CustomRole200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get one custom role by key.","tags":["Custom roles"]},"patch":{"operationId":"patchCustomRole","parameters":[{"$ref":"#/components/parameters/CustomRoleKey"}],"requestBody":{"$ref":"#/components/requestBodies/PatchOperationArray"},"responses":{"200":{"$ref":"#/components/responses/CustomRole200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Modify a custom role by key.","tags":["Custom roles"]}},"/segments/{projectKey}/{environmentKey}":{"get":{"operationId":"getUserSegments","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/Tag"}],"responses":{"200":{"description":"Segments response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSegments"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Get a list of all user segments in the given project.","tags":["User segments"]},"post":{"operationId":"postUserSegment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"description":{"description":"A description for the user segment.","example":"Users in this segment will have access to beta features.","type":"string"},"key":{"description":"A unique key that will be used to reference the user segment in feature flags.","example":"new-segment","type":"string"},"name":{"description":"A human-friendly name for the user segment.","example":"new segment","type":"string"},"tags":{"description":"Tags for the user segment.","items":{"example":"[]","type":"string"},"type":"array"}},"required":["name","key"],"type":"object"}}},"description":"Create a new user segment.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Creates a new user segment.","tags":["User segments"]}},"/segments/{projectKey}/{environmentKey}/{userSegmentKey}":{"delete":{"operationId":"deleteUserSegment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserSegmentKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a user segment.","tags":["User segments"]},"get":{"operationId":"getUserSegment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserSegmentKey"}],"responses":{"200":{"description":"User segment response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSegment"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Get a single user segment by key.","tags":["User segments"]},"patch":{"operationId":"patchUserSegment","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserSegmentKey"}],"requestBody":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatchOperation"},"type":"array"}}},"description":"Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' Feature flag patches also support JSON Merge Patch format. 'https://tools.ietf.org/html/rfc7386' The addition of comments is also supported.","required":true},"responses":{"200":{"$ref":"#/components/responses/UserSegment200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Perform a partial update to a user segment.","tags":["User segments"]}},"/user-search/{projectKey}/{environmentKey}":{"get":{"operationId":"getSearchUsers","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/Query"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/Offset"},{"$ref":"#/components/parameters/After"}],"responses":{"200":{"description":"Users response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource.","tags":["Users"]}},"/users/{projectKey}/{environmentKey}":{"get":{"operationId":"getUsers","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/Limit"},{"$ref":"#/components/parameters/HMAC"},{"$ref":"#/components/parameters/ScrollId"}],"responses":{"200":{"description":"Users response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Users"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection.","tags":["Users"]}},"/users/{projectKey}/{environmentKey}/{userKey}":{"delete":{"operationId":"deleteUser","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserKey"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a user by ID.","tags":["Users"]},"get":{"operationId":"getUser","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserKey"}],"responses":{"200":{"description":"User response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Get a user by key.","tags":["Users"]}},"/users/{projectKey}/{environmentKey}/{userKey}/flags":{"get":{"operationId":"getUserFlagSettings","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserKey"}],"responses":{"200":{"description":"User flags settings response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFlagSettings"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Fetch a single flag setting for a user by key.","tags":["User settings"]}},"/users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey}":{"get":{"operationId":"getUserFlagSetting","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserKey"},{"$ref":"#/components/parameters/FeatureFlagKey"}],"responses":{"200":{"description":"User flag setting response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserFlagSetting"}}}},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Fetch a single flag setting for a user by key.","tags":["User settings"]},"put":{"operationId":"putFlagSetting","parameters":[{"$ref":"#/components/parameters/ProjectKey"},{"$ref":"#/components/parameters/EnvironmentKey"},{"$ref":"#/components/parameters/UserKey"},{"$ref":"#/components/parameters/FeatureFlagKey"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"setting":{"description":"The variation value to set for the user. Must match the variation type of the flag.\n","type":"boolean"}},"type":"object"}}},"required":true},"responses":{"204":{"$ref":"#/components/responses/Standard204"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Specifically enable or disable a feature flag for a user based on their key.","tags":["User settings"]}},"/webhooks":{"get":{"operationId":"getWebhooks","responses":{"200":{"description":"Webhooks response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhooks"}}}},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Fetch a list of all webhooks.","tags":["Webhooks"]},"post":{"operationId":"postWebhook","requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"The name of the webhook.","example":"Example hook","type":"string"},"on":{"description":"Whether this webhook is enabled or not.","example":true,"type":"boolean"},"secret":{"description":"If sign is true, and the secret attribute is omitted, LaunchDarkly will automatically generate a secret for you.","example":"<password>","type":"string"},"sign":{"description":"If sign is false, the webhook will not include a signature header, and the secret can be omitted.","type":"boolean"},"url":{"description":"The URL of the remote webhook.","example":"https://example.com/example","type":"string"}},"required":["url","sign","on"],"type":"object"}}},"description":"New webhook.","required":true},"responses":{"201":{"$ref":"#/components/responses/Standard201"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"}},"summary":"Create a webhook.","tags":["Webhooks"]}},"/webhooks/{resourceId}":{"delete":{"operationId":"deleteWebhook","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"204":{"$ref":"#/components/responses/Standard204"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Delete a webhook by ID.","tags":["Webhooks"]},"get":{"operationId":"getWebhook","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"responses":{"200":{"$ref":"#/components/responses/Webhooks200"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"}},"summary":"Get a webhook by ID.","tags":["Webhooks"]},"patch":{"operationId":"patchWebhook","parameters":[{"$ref":"#/components/parameters/ResourceId"}],"requestBody":{"$ref":"#/components/requestBodies/PatchOperationArray"},"responses":{"200":{"$ref":"#/components/responses/Webhooks200"},"400":{"$ref":"#/components/responses/Standard400"},"401":{"$ref":"#/components/responses/Standard401"},"404":{"$ref":"#/components/responses/Standard404"},"409":{"$ref":"#/components/responses/Standard409"}},"summary":"Modify a webhook by ID.","tags":["Webhooks"]}}},"servers":[{"url":"https://app.launchdarkly.com/api/v2"}],"components":{"parameters":{"After":{"description":"A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have occured after this timestamp.","in":"query","name":"after","required":false,"schema":{"type":"number","format":"int64"}},"AuditLimit":{"description":"A limit on the number of audit log entries to be returned, between 1 and 20.","in":"query","name":"limit","required":false,"schema":{"type":"number"}},"Before":{"description":"A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned will have before this timestamp.","in":"query","name":"before","required":false,"schema":{"type":"number"}},"CustomRoleKey":{"description":"The custom role key.","in":"path","name":"customRoleKey","required":true,"schema":{"type":"string"}},"EnvironmentKey":{"description":"The environment key, used to tie together flag configuration and users under one environment so they can be managed together.","in":"path","name":"environmentKey","required":true,"schema":{"type":"string"}},"EnvironmentKeyQuery":{"description":"By default, each feature will include configurations for each environment. You can filter environments with the env query parameter. For example, setting env=production will restrict the returned configurations to just your production environment.","in":"query","name":"env","required":false,"schema":{"type":"string"}},"FeatureFlagKey":{"description":"The feature flag's key. The key identifies the flag in your code.","in":"path","name":"featureFlagKey","required":true,"schema":{"type":"string"}},"HMAC":{"description":"This parameter is required when following \"next\" links.","in":"query","name":"h","required":false,"schema":{"type":"string"}},"Limit":{"description":"Pagination limit.","in":"query","name":"limit","required":false,"schema":{"type":"integer"}},"MemberId":{"description":"The member ID.","in":"path","name":"memberId","required":true,"schema":{"type":"string"}},"Offset":{"description":"Specifies the first item to return in the collection.","in":"query","name":"offset","required":false,"schema":{"type":"integer"}},"ProjectKey":{"description":"The project key, used to tie the flags together under one project so they can be managed together.","in":"path","name":"projectKey","required":true,"schema":{"type":"string"}},"Q":{"description":"Text to search for. You can search for the full or partial name of the resource involved or fullpartial email address of the member who made the change.","in":"query","name":"q","required":false,"schema":{"type":"string"}},"Query":{"description":"Search query.","in":"query","name":"q","required":false,"schema":{"type":"string"}},"ResourceId":{"description":"The resource ID.","in":"path","name":"resourceId","required":true,"schema":{"type":"string"}},"ScrollId":{"description":"This parameter is required when following \"next\" links.","in":"query","name":"scrollId","required":false,"schema":{"type":"string"}},"Spec":{"description":"A resource specifier, allowing you to filter audit log listings by resource.","in":"query","name":"spec","required":false,"schema":{"type":"string"}},"Tag":{"description":"Filter by tag. A tag can be used to group flags across projects.","in":"query","name":"tag","required":false,"schema":{"type":"string"}},"UserKey":{"description":"The user's key.","in":"path","name":"userKey","required":true,"schema":{"type":"string"}},"UserSegmentKey":{"description":"The user segment's key. The key identifies the user segment in your code.","in":"path","name":"userSegmentKey","required":true,"schema":{"type":"string"}}},"responses":{"CustomRole200":{"description":"Custom role response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomRole"}}}},"FeatureFlags200":{"description":"Feature flag response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureFlag"}}}},"Member200":{"description":"Member response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Member"}}}},"Projects200":{"description":"Successful Project response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Project"}}}},"Root200":{"description":"A list of links to available resources in the API.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Links"}}}},"Standard201":{"description":"Resource created."},"Standard204":{"description":"Action completed successfully."},"Standard400":{"description":"Invalid request body."},"Standard401":{"description":"Invalid access token."},"Standard404":{"description":"Invalid resource specifier."},"Standard409":{"description":"Status conflict."},"UserSegment200":{"description":"User segment response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSegment"}}}},"Webhooks200":{"description":"Webhook response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}},"requestBodies":{"PatchOperationArray":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PatchOperation"},"type":"array"}}},"description":"Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'","required":true}},"securitySchemes":{"Token":{"description":"https://app.launchdarkly.com/settings#/tokens","in":"header","name":"Authorization","type":"apiKey"}},"schemas":{"Action":{"description":"An action to perform on a resource.","example":"updateOn","type":"string"},"Actions":{"items":{"$ref":"#/components/schemas/Action"},"type":"array"},"AuditLogEntries":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/AuditLogEntry"},"type":"array"}},"type":"object"},"AuditLogEntry":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"comment":{"example":"This is a comment string","type":"string"},"date":{"example":1472243938774,"format":"int64","type":"integer"},"description":{"example":"Changed the name from Test to Testing","type":"string"},"kind":{"example":"environment","type":"string"},"member":{"$ref":"#/components/schemas/Member"},"name":{"example":"Testing","type":"string"},"shortDescription":{"example":"\"\"","type":"string"},"target":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"name":{"example":"Testing","type":"string"},"resources":{"items":{"example":"proj/alexis:env/test","type":"string"},"type":"array"}},"type":"object"},"title":{"example":"[Reese Applebaum](mailto:refapp@launchdarkly.com) changed the name of [Testing](https://app.launchdarkly.com/settings#/projects)","type":"string"},"titleVerb":{"example":"changed the name of","type":"string"}},"type":"object"},"Clause":{"properties":{"attribute":{"example":"groups","type":"string"},"negate":{"type":"boolean"},"op":{"example":"in","type":"string"},"values":{"items":{"example":"Top Customers","type":"object"},"type":"array"}},"type":"object"},"CustomRole":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"description":{"description":"Description of the custom role.","example":"Description of revenue team role here","type":"string"},"key":{"$ref":"#/components/schemas/CustomRoleKeyOrId"},"name":{"description":"Name of the custom role.","example":"revenue team","type":"string"},"policy":{"items":{"$ref":"#/components/schemas/Policy"},"type":"array"}},"type":"object"},"CustomRoleKeyOrId":{"description":"The 20-hexdigit id or the key for a custom role.","example":"revenue-team","type":"string"},"CustomRoles":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"$ref":"#/components/schemas/CustomRole"}},"type":"object"},"Environment":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"apiKey":{"description":"The SDK key for backend LaunchDarkly SDKs.","example":"XXX","type":"string"},"color":{"description":"The swatch color for the environment.","example":"417505","type":"string"},"defaultTrackEvents":{"description":"Set to true to send detailed event information for new flags.","example":false,"type":"boolean"},"defaultTtl":{"description":"The default TTL.","example":0,"type":"number"},"key":{"description":"The key for the environment.","example":"production","type":"string"},"mobileKey":{"description":"The SDK key for mobile LaunchDarkly SDKs.","example":"XXX","type":"string"},"name":{"description":"The name of the environment.","example":"Production","type":"string"},"secureMode":{"description":"Determines if this environment is in safe mode.","example":false,"type":"boolean"}},"type":"object"},"Fallthrough":{"properties":{"rollout":{"$ref":"#/components/schemas/Rollout"},"variation":{"type":"integer"}},"type":"object"},"FeatureFlag":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"_maintainer":{"$ref":"#/components/schemas/Member"},"creationDate":{"description":"A unix epoch time in milliseconds specifying the creation time of this flag.","example":1443652232590,"format":"int64","type":"number"},"description":{"description":"Description of the feature flag.","example":"This flag controls whether test feature is turned on or not.","type":"string"},"environments":{"additionalProperties":{"$ref":"#/components/schemas/FeatureFlagConfig"},"type":"object"},"includeInSnippet":{"example":false,"type":"boolean"},"key":{"example":"test-feature","type":"string"},"kind":{"description":"Whether the feature flag is a boolean flag or multivariate.","example":"boolean","type":"string"},"maintainerId":{"description":"The ID of the member that should maintain this flag.","example":"561c579cd8fd5c2704000001","type":"string"},"name":{"description":"Name of the feature flag.","example":"Test Feature","type":"string"},"tags":{"description":"An array of tags for this feature flag.","example":"[]","items":{"type":"string"},"type":"array"},"temporary":{"description":"Whether or not this flag is temporary.","example":false,"type":"boolean"},"variations":{"description":"The variations for this feature flag.","example":"[ { \"value\": \"a\" }, { \"value\": \"b\" } ]","items":{"$ref":"#/components/schemas/Variation"},"type":"array"}},"type":"object"},"FeatureFlagConfig":{"properties":{"archived":{"type":"boolean"},"fallthrough":{"$ref":"#/components/schemas/Fallthrough"},"lastModified":{"example":1469326565348,"format":"int64","type":"integer"},"offVariation":{"type":"integer"},"on":{"type":"boolean"},"prerequisites":{"items":{"$ref":"#/components/schemas/Prerequisite"},"type":"array"},"rules":{"items":{"$ref":"#/components/schemas/Rule"},"type":"array"},"salt":{"example":"YWx0ZXJuYXRlLnBhZ2U=","type":"string"},"sel":{"example":"45501b9314dc4641841af774cb038b96","type":"string"},"targets":{"items":{"$ref":"#/components/schemas/Target"},"type":"array"},"trackEvents":{"description":"Set to true to send detailed event information for this flag.","example":false,"type":"boolean"},"version":{"example":65,"type":"integer"}},"type":"object"},"FeatureFlagStatus":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"default":{"type":"object"},"lastRequested":{"example":"2016-08-16T21:10:11.886Z","type":"string"},"name":{"description":"| Name | Description |\n| --------:| ----------- |\n| new | the feature flag was created within the last 7 days, and has not been requested yet |\n| active | the feature flag was requested by your servers or clients within the last 7 days |\n| inactive | the feature flag was created more than 7 days ago, and hasn't been requested by your servers or clients within the past 7 days |\n| launched | one variation of the feature flag has been rolled out to all your users for at least 7 days |\n","enum":["new","active","inactive","launched"],"type":"string"}},"type":"object"},"FeatureFlagStatuses":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/FeatureFlagStatus"},"type":"array"}},"type":"object"},"FeatureFlags":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/FeatureFlag"},"type":"array"}},"type":"object"},"Id":{"description":"The unique resource id.","example":"5a580a01b4ff89217bdf9dc1","type":"string"},"Link":{"properties":{"href":{"example":"/api/v2/endpoint","type":"string"},"type":{"example":"application/json","type":"string"}},"type":"object"},"Links":{"properties":{"next":{"$ref":"#/components/schemas/Link"},"self":{"$ref":"#/components/schemas/Link"}},"type":"object"},"Member":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"_pendingInvite":{"type":"boolean"},"customRoles":{"items":{"$ref":"#/components/schemas/Id"},"type":"array"},"email":{"example":"user@launchdarkly.com","type":"string"},"isBeta":{"type":"boolean"},"role":{"$ref":"#/components/schemas/Role"}},"type":"object"},"Members":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"$ref":"#/components/schemas/Member"}},"type":"object"},"PatchOperation":{"properties":{"op":{"example":"replace","type":"string"},"path":{"example":"/on","type":"string"},"value":{"type":"object"}},"required":["op","path","value"],"type":"object"},"Policy":{"properties":{"actions":{"$ref":"#/components/schemas/Actions"},"effect":{"description":"Effect of the policy - allow or deny.","example":"deny","type":"string"},"resources":{"$ref":"#/components/schemas/Resources"}},"type":"object"},"Prerequisite":{"properties":{"key":{"type":"string"},"variation":{"type":"integer"}},"type":"object"},"Project":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"environments":{"items":{"$ref":"#/components/schemas/Environment"},"type":"array"},"key":{"example":"zentasks","type":"string"},"name":{"example":"Zentasks","type":"string"}},"type":"object"},"Projects":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/Project"},"type":"array"}},"type":"object"},"Resource":{"description":"A resource specifier string","example":"proj/*:env/*:flag/my-flag","type":"string"},"Resources":{"items":{"$ref":"#/components/schemas/Resource"},"type":"array"},"Role":{"enum":["writer","reader","admin","owner"],"type":"string"},"Rollout":{"properties":{"variations":{"items":{"$ref":"#/components/schemas/WeightedVariation"},"type":"array"}},"type":"object"},"Rule":{"properties":{"clauses":{"items":{"$ref":"#/components/schemas/Clause"},"type":"array"},"rollout":{"$ref":"#/components/schemas/Rollout"},"variation":{"type":"integer"}},"type":"object"},"Statement":{"properties":{"actions":{"$ref":"#/components/schemas/Actions"},"effect":{"enum":["allow","deny"],"type":"string"},"notactions":{"$ref":"#/components/schemas/Actions"},"notresources":{"$ref":"#/components/schemas/Resources"},"resources":{"$ref":"#/components/schemas/Resources"}},"type":"object"},"Statements":{"items":{"$ref":"#/components/schemas/Statement"},"type":"array"},"Target":{"properties":{"values":{"items":{"example":"\"1461797806427-7-115540266\", \"00142875-a39d-4028-a3b7-987ccd151649\"","type":"string"},"type":"array"},"variation":{"type":"integer"}},"type":"object"},"User":{"properties":{"anonymous":{"type":"boolean"},"avatar":{"type":"string"},"country":{"type":"string"},"custom":{"example":{"company":"example.com"},"type":"object"},"email":{"type":"string"},"firstName":{"type":"string"},"ip":{"type":"string"},"key":{"example":"a00bea","type":"string"},"lastName":{"type":"string"},"name":{"example":"Bob Loblaw","type":"string"},"secondary":{"type":"string"}},"type":"object"},"UserFlagSetting":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"_value":{"description":"The most important attribute in the response. The _value is the current setting for the user. For a boolean feature toggle, this will be true, false, or null if there is no defined fallthrough value.","example":true,"type":"boolean"},"setting":{"description":"The setting attribute indicates whether you've explicitly targeted this user to receive a particular variation. For example, if you have explicitly turned off a feature toggle for a user, setting will be false. A setting of null means that you haven't assigned that user to a specific variation.","type":"boolean"}},"type":"object"},"UserFlagSettings":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"example":{"alternate.page":{"_links":{"self":{"href":"/api/v2/users/lacuna/production/Abbie_Braun/flags/alternate.page","type":"application/json"}},"_value":"false,"},"sort.order":{"_links":{"_value":true,"self":{"href":"/api/v2/users/lacuna/production/Abbie_Braun/flags/sort.order","type":"application/json"}}}},"type":"object"}},"type":"object"},"UserRecord":{"properties":{"avatar":{"example":"https://s3.amazonaws.com/uifaces/faces/twitter/shylockjoy/73.jpg","type":"string"},"environmentId":{"example":"54ac2d97de674204ddd61096","type":"string"},"lastPing":{"example":"2015-03-03T02:37:22.492Z","format":"int64","type":"string"},"ownerId":{"$ref":"#/components/schemas/Id"},"user":{"$ref":"#/components/schemas/User"}},"type":"object"},"UserSegment":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"creationDate":{"description":"A unix epoch time in milliseconds specifying the creation time of this flag.","example":1443652232590,"format":"int64","type":"number"},"description":{"description":"Description of the user segment.","example":"Users in this segment can access beta features.","type":"string"},"excluded":{"description":"An array of user keys that should not be included in this segment, unless they are also listed in \"included\".","items":{"type":"string"},"type":"array"},"included":{"description":"An array of user keys that are included in this segment.","items":{"type":"string"},"type":"array"},"key":{"description":"Unique identifier for the user segment.","example":"beta-testers","type":"string"},"name":{"description":"Name of the user segment.","example":"Beta Testers","type":"string"},"rules":{"description":"An array of rules that can cause a user to be included in this segment.","items":{"$ref":"#/components/schemas/UserSegmentRule"},"type":"array"},"tags":{"description":"An array of tags for this user segment.","items":{"type":"string"},"type":"array"},"version":{"type":"integer"}},"required":["key","name","creationDate"],"type":"object"},"UserSegmentRule":{"properties":{"bucketBy":{"type":"string"},"clauses":{"items":{"$ref":"#/components/schemas/Clause"},"type":"array"},"weight":{"type":"integer"}},"type":"object"},"UserSegments":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/UserSegment"},"type":"array"}},"type":"object"},"Users":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/UserRecord"},"type":"array"},"totalCount":{"example":3,"type":"number"}},"type":"object"},"Variation":{"properties":{"description":{"example":"The true variation","type":"string"},"name":{"example":"True","type":"string"},"value":{"type":"object"}},"required":["value"],"type":"object"},"Webhook":{"properties":{"_id":{"$ref":"#/components/schemas/Id"},"_links":{"$ref":"#/components/schemas/Links"},"name":{"description":"The name of the webhook.","example":"Example hook","type":"string"},"on":{"description":"Whether this webhook is enabled or not.","example":true,"type":"boolean"},"secret":{"description":"If defined, the webhooks post request will include a X-LD-Signature header whose value will contain an HMAC SHA256 hex digest of the webhook payload, using the secret as the key.","example":"frobozz","type":"string"},"tags":{"description":"Tags assigned to this webhook.","items":{"example":"[]","type":"string"},"type":"array"},"url":{"description":"The URL of the remote webhook.","example":"https://example.com/example","type":"string"}},"type":"object"},"Webhooks":{"properties":{"_links":{"$ref":"#/components/schemas/Links"},"items":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array"}},"type":"object"},"WeightedVariation":{"properties":{"variation":{"type":"integer"},"weight":{"type":"integer"}},"type":"object"}}}}