Websites API
The Websites API provides a convenient way to interact with the website-related endpoints of the Umami API.
To get started, you can access the Websites API from your Umami instance:
Get all websites
You can retrieve a list of all websites available to the user. This method supports pagination and searching.
Get a specific website
To retrieve a single website by its ID, use the getWebsite method:
Create a new website
You can create a new website by providing a name and domain:
Update a website
To update an existing website, you need its ID and the new data:
val websiteId = "your-website-id"
val updatedWebsite = websitesApi.updateWebsite(
websiteId = websiteId,
name = "My Updated Website Name"
)
Delete a website
You can delete a website by its ID. This operation does not return any data.
Reset a website
To reset all data for a website, use the resetWebsite method. This operation also does not return any data.