Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

API Endpoints: Login

POST /login

Login to the REST API.

Required parameters:

  • email
  • password

Optional parameters:

  • account

Example request:

curl -X POST "https://landscape.canonical.com/api/v2/login" -d '{"email": "[email protected]", "password": "pwd", "account": "onward"}'

Example output:

{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9eyJleHAiOjE3MTExNDYwNjIsEmlhdCI6MTcxYTA1OTYMiwic3ViIjoiam9obkBleGFtcGxlLmNvbSIsImFjYyI6Im9ud8FyZCIsImlkIjoxfQHtqIW_j4ICm43zN3LAsFMDpR9WpxuMBCqWiZe0_R6Vk",
  "email": "[email protected]",
  "name": "Jane Smith",
  "accounts": [
    {
      "title": "Onward, Inc.",
      "name": "onward",
      "default": true
    },
    {
      "title": "Upside Software, Ltd.",
      "name": "upside"
    }
  ],
  "current_account": "onward"
}

This page was last modified 3 months ago. Help improve this document in the forum.