Skip to content

Support Environment lookup #102

@miguelbernadi

Description

@miguelbernadi

As far as I have seen, there is currently no support to retrieve the list of environments configured for a project. I'm generating alerts programmatically, and I'd prefer to be able to look up the environments to validate alert fdefinitions instead of firing against the API and letting sentry figure out if it was there or not (as I can cache and revalidate results, saving requests against a loaded API).

Is this something the project would accept? Any guidance on how/where to add it (or where it was as I missed it)? I'd be happy to contribute an implementation instead of maintaining a fork of this project.

Upstream API

Sentry API Endpoint: GET /api/0/projects/{org}/{project}/environments/

Query Parameters:

  • visibility (optional): Filter by "visible" (default), "hidden", or "all"

Response Structure:

  [
    {
      "id": "1",
      "name": "production",
      "isHidden": false
    }
  ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions