Collaborator

invite_collaborators

Introduced in version 14

Summary: POST /v1/<namespace>/<name>/collaborators/invites

Invite one or more collaborators for a package.

Request JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "invites": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "email": {
                        "type": "string"
                    }
                },
                "required": [
                    "email"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "invites"
    ],
    "type": "object"
}

Response JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "tokens": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "email": {
                        "type": "string"
                    },
                    "token": {
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "token"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "tokens"
    ],
    "type": "object"
}

revoke_invites

Introduced in version 14

Summary: POST /v1/<namespace>/<name>/collaborators/invites/revoke

Revoke invites to the specified emails for the package.

Request JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "invites": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "email": {
                        "type": "string"
                    }
                },
                "required": [
                    "email"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "invites"
    ],
    "type": "object"
}

accept_invite

Introduced in version 14

Summary: POST /v1/<namespace>/<name>/collaborators/invites/accept

Accept a collaborator invite.

Request JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "token": {
            "type": "string"
        }
    },
    "required": [
        "token"
    ],
    "type": "object"
}

reject_invite

Introduced in version 14

Summary: POST /v1/<namespace>/<name>/collaborators/invites/reject

Reject a collaborator invite.

Request JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "token": {
            "type": "string"
        }
    },
    "required": [
        "token"
    ],
    "type": "object"
}

get_all_invites

Introduced in version 18

Summary: GET /v1/<namespace>/<name>/collaborators/invites

Get all collaborator invites for the given package.

get_all_invites changelog

  • Version 29: Retrieve account details

Response JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "invites": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "accepted-at": {
                        "format": "date-time",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "accepted-by": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    },
                    "created-at": {
                        "format": "date-time",
                        "type": "string"
                    },
                    "created-by": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    },
                    "email": {
                        "type": "string"
                    },
                    "expires-at": {
                        "format": "date-time",
                        "type": "string"
                    },
                    "invite-type": {
                        "type": "string"
                    },
                    "revoked-at": {
                        "format": "date-time",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "revoked-by": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    }
                },
                "required": [
                    "email",
                    "invite-type",
                    "created-at",
                    "created-by",
                    "accepted-at",
                    "revoked-at",
                    "expires-at"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "invites"
    ],
    "type": "object"
}

get_pending_invites

Introduced in version 14

Summary: GET /v1/<namespace>/<name>/collaborators/invites/pending

Get pending collaborator invites for the given package.

Response JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "invites": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "created_at": {
                        "format": "date-time",
                        "type": "string"
                    },
                    "created_by": {
                        "type": "string"
                    },
                    "email": {
                        "type": "string"
                    },
                    "expires_at": {
                        "format": "date-time",
                        "type": "string"
                    }
                },
                "required": [
                    "email",
                    "created_by",
                    "created_at",
                    "expires_at"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "invites"
    ],
    "type": "object"
}

get_collaborators

Introduced in version 14

Summary: GET /v1/<namespace>/<name>/collaborators

Get collaborators (permissions) for the given package.

get_collaborators changelog

  • Version 28: Retrieve more useful fields

Response JSON Schema

{
    "additionalProperties": false,
    "properties": {
        "collaborators": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "account": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    },
                    "created-at": {
                        "format": "date-time",
                        "type": "string"
                    },
                    "created-by": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    },
                    "permissions": {
                        "items": {
                            "enum": [
                                "package-collaborator"
                            ],
                            "type": "string"
                        },
                        "type": "array"
                    },
                    "updated-at": {
                        "format": "date-time",
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "updated-by": {
                        "additionalProperties": false,
                        "properties": {
                            "display-name": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "email": {
                                "type": "string"
                            },
                            "id": {
                                "type": "string"
                            },
                            "username": {
                                "oneOf": [
                                    {
                                        "type": "string"
                                    },
                                    {
                                        "type": "null"
                                    }
                                ]
                            },
                            "validation": {
                                "type": "string"
                            }
                        },
                        "required": [
                            "display-name",
                            "id",
                            "username"
                        ],
                        "type": "object"
                    }
                },
                "required": [
                    "account",
                    "permissions",
                    "created-at",
                    "created-by",
                    "updated-at"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "publisher": {
            "additionalProperties": false,
            "properties": {
                "display-name": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "email": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "username": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "validation": {
                    "type": "string"
                }
            },
            "required": [
                "display-name",
                "id",
                "username"
            ],
            "type": "object"
        }
    },
    "required": [
        "collaborators",
        "publisher"
    ],
    "type": "object"
}

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