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: Person

GET /person

Gets information about the currently logged-in user, such as name, email address, and timezone.

Path parameters:

  • None

Query parameters:

  • None

Example request:

curl -X GET -I  -H "Authorization: Bearer $JWT" https://landscape.canonical.com/api/v2/person

Example output:

{
  "allowable_emails": [
	"[email protected]",
	"[email protected]",
	"[email protected]"
  ],
  "name": "John Smith",
  "email": "[email protected]",
  "identity": "https://10.200.100.216:8080/id/john",
  "timezone": "UTC",
  "last_login_time": "2024-03-22T18:06:09Z",
  "last_login_host": "10.252.142.1",
  "preferred_account": null
}

POST /person

Sets information for the currently logged-in user.

Required parameters:

  • None

Optional parameters:

  • name
  • email
  • timezone
  • preferred_account

Example request:

curl -X POST   -H "Authorization: Bearer $JWT"   -d '{
	"name": "John Allen Smith"
  }'   https://landscape.canonical.com/api/v2/person

Example output:

{
  "allowable_emails": [
	"[email protected]",
	"[email protected]",
	"[email protected]"
  ],
  "name": "John Allen Smith",
  "email": "[email protected]",
  "identity": "https://10.200.100.216:8080/id/john",
  "timezone": "UTC",
  "last_login_time": "2024-03-22T18:06:09Z",
  "last_login_host": "10.252.142.1",
  "preferred_account": null
}

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