metrics
default

Calculate metrics over developer activities.

Changed on
post/metrics/developers

Request

Request body

metricsDeveloperMetricID[] required

Requested metric identifiers.

date_fromstring date required

Date from when to start measuring the metrics.

date_tostring date required

Date until which to measure the metrics.

timezoneinteger

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

accountinteger required

Session account ID.

granularitiesGranularity[] required

The splits of the specified time range.

Example request

{
  "for": [
    {
      "repositories": [
        "github.com/athenianco/athenian-webapp",
        "github.com/athenianco/athenian-api"
      ],
      "developers": [
        "github.com/vmarkovtsev",
        "github.com/dpordomingo"
      ]
    },
    {
      "repositories": [
        "github.com/athenianco/athenian-webapp",
        "github.com/athenianco/athenian-api"
      ],
      "developers": [
        "github.com/vmarkovtsev",
        "github.com/dpordomingo"
      ]
    }
  ],
  "metrics": [
    "dev-reviews",
    "dev-prs-created",
    "dev-pr-comments"
  ],
  "date_from": "2019-10-23",
  "date_to": "2020-05-23",
  "granularities": [
    "all"
  ],
  "account": 1
}

Response

Calculated metrics.

metricsDeveloperMetricID[] required

Repeats DeveloperMetricsRequest.metrics.

date_fromstring date required

Repeats DeveloperMetricsRequest.date_from.

date_tostring date required

Repeats DeveloperMetricsRequest.date_to.

timezoneinteger

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

granularitiesGranularity[] required

The splits of the specified time range.

Example response

{
  "date_from": "2020-01-23",
  "date_to": "2020-01-24",
  "granularities": [
    "all"
  ],
  "metrics": [
    "dev-prs-created",
    "dev-reviews"
  ],
  "calculated": [
    {
      "values": [
        [
          {
            "date": "2020-01-23",
            "values": [
              5,
              10
            ]
          }
        ],
        [
          {
            "date": "2020-01-23",
            "values": [
              20,
              100
            ]
          }
        ]
      ],
      "for": {
        "repositories": [
          "github.com/athenianco/athenian-webapp",
          "github.com/athenianco/athenian-api"
        ],
        "developers": [
          "github.com/vmarkovtsev",
          "github.com/dpordomingo"
        ]
      },
      "granularity": "all"
    }
  ]
}

Changes

    • info

      added the new optional request property ///

    • info

      added the optional property //// to the response with the status

    • breaking

      the request property's minItems was increased to 1