Cohorts

create_cohort

Introduced in version 13

Summary: POST /v2/cohorts

Create a cohort key for given snaps.

JSON encoded body should be an object with snaps as an array of snap names to generate cohort keys for.

Returns a JSON encoded object with cohort-keys as an object keyed by the given snap names, with the cohort key as the value.

create_cohort changelog

  • Version 13: Add new API for creating cohort

Request JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "snaps": {
            "introduced_at": 13,
            "items": {
                "type": "string"
            },
            "type": "array"
        }
    },
    "required": [
        "snaps"
    ],
    "type": "object"
}

Response JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "cohort-keys": {
            "type": "object"
        }
    },
    "required": [
        "cohort-keys"
    ],
    "type": "object"
}

© 2019 Canonical Ltd. Ubuntu and Canonical are registered trademarks of Canonical Ltd.