filter
default

List the deployments that satisfy the provided filters. We accept new deployment notifications at `/events/deployments`.

Changed on
post/filter/deployments

Request

Request body

date_fromstring date required

Search for the deployments since this date.

date_tostring date required

Search for the deployments until this date.

timezoneinteger

Local time zone offset in minutes, used to adjust date_from and date_to.

accountinteger required

Session account ID.

inRepositoryID[]

Set of repositories. An empty list raises a bad response 400. Duplicates are automatically ignored.

pr_labels_includestring[]

At least one of these labels must be present in at least one deployed PR.

pr_labels_excludestring[]

None of these labels must be present in each deployed PR.

environmentsstring[]

Deployments must belong to one of these environments.

conclusionsDeploymentConclusion[]

Deployments must execute with any of these conclusions.

with_labelsobject

Deployments should contain at least one of the specified label values. null matches any label value and effectively checks the label existence.

without_labelsobject

Deployments may not contain the specified label values. null matches any label value and effectively ensures that the label does not exist.

Example request

{
  "account": 1,
  "date_from": "2021-06-23",
  "date_to": "2021-12-24",
  "in": [
    "github.com/athenianco/athenian-api",
    "github.com/athenianco/athenian-webapp",
    "github.com/athenianco/metadata"
  ],
  "environments": [
    "production",
    "staging"
  ],
  "conclusions": [
    "FAILURE"
  ],
  "with_labels": {
    "user": "github.com/lwsanty",
    "rollback": null
  }
}

Response

Deployments that satisfy the specified filters.

Example response

{
  "include": {
    "users": {
      "github.com/vmarkovtsev": {
        "avatar": "https://avatars0.githubusercontent.com/u/60340680?v=4"
      },
      "github.com/se7entyse7en": {
        "avatar": "https://avatars0.githubusercontent.com/u/60340680?v=4"
      }
    }
  },
  "deployments": [
    {
      "components": [
        {
          "repository": "github.com/athenianco/athenian-api",
          "reference": "v0.0.93"
        }
      ],
      "environment": "production",
      "date_finished": "2020-03-25T11:11:00Z",
      "date_started": "2020-03-25T11:04:00Z",
      "conclusion": "SUCCESS",
      "labels": {
        "helm_chart": "0.0.15"
      },
      "name": "production-2020-03-26-W9J3uzHl",
      "code": {
        "prs": {
          "github.com/athenianco/athenian-webapp": 32
        },
        "lines_prs": {
          "github.com/athenianco/athenian-api": 37
        },
        "lines_overall": {
          "github.com/athenianco/athenian-webapp": 1200
        },
        "commits_prs": {
          "github.com/athenianco/athenian-api": 2
        },
        "commits_overall": {
          "github.com/athenianco/athenian-api": 20
        }
      },
      "prs": [
        {
          "additions": 34,
          "author": "github.com/se7entyse7en",
          "created": "2020-05-21T18:29:00Z",
          "deletions": 3,
          "number": 176,
          "title": "Fix first account creation",
          "repository": "github.com/athenianco/athenian-api"
        }
      ],
      "releases": [
        {
          "added_lines": 1000,
          "commits": 20,
          "deleted_lines": 200,
          "name": "v0.0.93",
          "sha": "e337123fc32c38cf6a8149b518f2e58ae836c8e6",
          "published": "2020-03-25T10:57:00Z",
          "publisher": "github.com/vmarkovtsev",
          "repository": "github.com/athenianco/athenian-api",
          "url": "https://github.com/athenianco/athenian-api/releases/tag/v0.0.93",
          "age": "1000s",
          "commit_authors": [
            "github.com/vmarkovtsev"
          ],
          "prs": 3
        }
      ]
    }
  ]
}

Changes

    • info

      added the new optional request property /

    • breaking

      the ////// response property's maxLength was unset from 100 for the response status

    • breaking

      the ////// response property's minLength was decreased from 1 to 0 for the response status

    • info

      the ////// response's property pattern ^([^'\s]| ){1,100}$ was added for the status