Websites

Notes
Expert level
The API key should be sent as a Bearer token in the Authorization header of the request. Get your API key.
List

API endpoint:

GET
http://analytics.mathtasy.com/api/v1/websites

Request example:

curl --location --request GET 'http://analytics.mathtasy.com/api/v1/websites' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Mô tả
search
tùy chọn string
The search query.
search_by
tùy chọn string
Tìm kiếm theo. Possible values are: domain for Tên miền. Defaults to: domain.
sort_by
tùy chọn string
Sắp xếp theo. Possible values are: id for Date created, domain for Tên miền. Defaults to: id.
sort
tùy chọn string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
tùy chọn int
Số kết quả mỗi trang. Possible values are: 10, 25, 50, 100. Defaults to: 10.
Hiện

API endpoint:

GET
http://analytics.mathtasy.com/api/v1/websites/{id}

Request example:

curl --location --request GET 'http://analytics.mathtasy.com/api/v1/websites/{id}' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Store

API endpoint:

POST
http://analytics.mathtasy.com/api/v1/websites

Request example:

curl --location --request POST 'http://analytics.mathtasy.com/api/v1/websites' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'domain={domain}'
Parameter
Type
Mô tả
domain
bắt buộc string
Tên của tên miền.
privacy
tùy chọn integer
Stats page privacy. Possible values are: 0 for Công khai, 1 for Riêng tư, 2 for Password. Defaults to: 1.
password
tùy chọn string
The password for the statistics page. Only works with privacy set to 2.
email
tùy chọn integer
Báo cáo email định kỳ. Possible values are: 0 for Vô hiệu, 1 for Enabled. Defaults to: 0.
exclude_bots
tùy chọn integer
Exclude common bots from being tracked. Possible values are: 0 for Vô hiệu, 1 for Enabled. Defaults to: 1.
exclude_params
tùy chọn string
Exclude URL query parameters from being tracked. One per line..
exclude_ips
tùy chọn string
Exclude IPs from being tracked. One per line..
Cập nhật

API endpoint:

PUT PATCH
http://analytics.mathtasy.com/api/v1/websites/{id}

Request example:

curl --location --request PUT 'http://analytics.mathtasy.com/api/v1/websites/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}'
Parameter
Type
Mô tả
privacy
tùy chọn integer
Stats page privacy. Possible values are: 0 for Công khai, 1 for Riêng tư, 2 for Password.
password
tùy chọn string
The password for the statistics page. Only works with privacy set to 2.
email
tùy chọn integer
Báo cáo email định kỳ. Possible values are: 0 for Vô hiệu, 1 for Enabled.
exclude_bots
tùy chọn integer
Exclude common bots from being tracked. Possible values are: 0 for Vô hiệu, 1 for Enabled.
exclude_params
tùy chọn string
Exclude URL query parameters from being tracked. One per line..
exclude_ips
tùy chọn string
Exclude IPs from being tracked. One per line..
Xóa

API endpoint:

DELETE
http://analytics.mathtasy.com/api/v1/websites/{id}

Request example:

curl --location --request DELETE 'http://analytics.mathtasy.com/api/v1/websites/{id}' \
--header 'Authorization: Bearer {api_key}'