Websites analytics

Get the list of websites you add for web analytics
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
https://webzender.com/api/v1/websites

Request example:

curl --location --request GET 'https://webzender.com/api/v1/websites' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'


Response example:


                    {
  "data": [
    {
      "id": 1,
      "domain": "example.com",
      "privacy": 1,
      "email": null,
      "password": false,
      "exclude_bots": 1,
      "exclude_ips": null,
      "created_at": "2023-08-02T00:47:15.000000Z",
      "updated_at": "2023-08-02T00:47:15.000000Z"
    },
    {
      "id": 2,
      "domain": "wordpress.com",
      "privacy": 1,
      "email": null,
      "password": false,
      "exclude_bots": 1,
      "exclude_ips": null,
      "created_at": "2023-08-02T00:47:15.000000Z",
      "updated_at": "2023-08-02T00:47:15.000000Z"
    },
    {
      "id": 3,
      "domain": "wikipedia.org",
      "privacy": 1,
      "email": null,
      "password": false,
      "exclude_bots": 1,
      "exclude_ips": null,
      "created_at": "2023-08-02T00:47:15.000000Z",
      "updated_at": "2023-08-02T00:47:15.000000Z"
    }
  ],
  "links": {
    "first": "https://webzebder.com/api/v1/websites?search_by=domain&sort_by=id&sort=desc&per_page=10&page=1",
    "last": "https://webzebder.com/api/v1/websites?search_by=domain&sort_by=id&sort=desc&per_page=10&page=1",
    "prev": null,
    "next": null
  },
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 1,
    "links": [
      {
        "url": null,
        "label": "« Previous",
        "active": false
      },
      {
        "url": "https://webzebder.com/api/v1/websites?search_by=domain&sort_by=id&sort=desc&per_page=10&page=1",
        "label": "1",
        "active": true
      },
      {
        "url": null,
        "label": "Next »",
        "active": false
      }
    ],
    "path": "https://webzebder.com/api/v1/websites",
    "per_page": 10,
    "to": 1,
    "total": 1
  },
  "status": 200
}

                    


The sample aboove have threee Projects in it Namely: example.com, wordpress.com and wikipedia.org




You can customize the API by adding this Parameters

Parameter
Type
Description
search
optional string
The search query.
search_by
optional string
Search by. Possible values are: domain for Domain. Defaults to: domain.
sort_by
optional string
Sort by. Possible values are: id for Date created, domain for Domain. Defaults to: id.
sort
optional string
Sort. Possible values are: desc for Descending, asc for Ascending. Defaults to: desc.
per_page
optional int
Results per page. Possible values are: 10, 25, 50, 100. Defaults to: 100.


Request example:

search
curl --location --request GET 'https://webzender.com/api/v1/websites?search=example'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'
Note: search only search for website Name


sort_by
curl --location --request GET 'https://webzender.com/api/v1/websites?sort_by=created_at'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'


sort
curl --location --request GET 'https://webzender.com/api/v1/websites?sort=desc'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'


per_page
curl --location --request GET 'https://webzender.com/api/v1/websites?per_page=25'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'


You can combine it e.g
curl --location --request GET 'https://webzender.com/api/v1/websites?search=example&sort_by=created_at&sort=desc&per_page=25'
--header 'Accept: application/json' \
--header 'Authorization: Bearer {api_key}'


This Explains:
 search from website where name has example, sort by date_created, display
in descending order and paginate by 25 results per page







Show

API endpoint:

GET
https://webzender.com/api/v1/websites/{id}

Request example:

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


Response example:

{
  "data": {
    "id": 6,
    "domain": "example.com",
    "privacy": 1,
    "email": null,
    "password": false,
    "exclude_bots": 1,
    "exclude_ips": null,
    "created_at": "2023-08-02T00:47:15.000000Z",
    "updated_at": "2023-08-02T00:47:15.000000Z"
  },
  "status": 200
}





Store

API endpoint:

POST
https://webzender.com/api/v1/websites

Request example:

curl --location --request POST 'https://webzender.com/api/v1/websites' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'domain={domain}' \
--data-urlencode 'privacy={privacy}' 
You can customize the API by adding this Parameters

Parameter
Type
Description
domain
required string
The domain name.
privacy
optional integer
Stats page privacy. Possible values are: 0 for Public, 1 for Private, 2 for Password. Defaults to: 1.
password
optional string
The password for the statistics page. Only works with privacy set to 2.
email
optional integer
Periodic email reports. Possible values are: 0 for Disabled, 1 for Enabled. Defaults to: 0.
exclude_bots
optional integer
Exclude common bots from being tracked. Possible values are: 0 for Disabled, 1 for Enabled. Defaults to: 1.
exclude_params
optional string
Exclude URL query parameters from being tracked. One per line..
exclude_ips
optional string
Exclude IPs from being tracked. One per line..




Update

API endpoint:

PUT PATCH
https://webzender.com/api/v1/websites/{id}

Request example:

curl --location --request PUT 'https://webzender.com/api/v1/websites/{id}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Bearer {api_key}' \
--data-urlencode 'privacy={privacy}' 

You can customize the API by adding this Parameters

Parameter
Type
Description
privacy
optional integer
Stats page privacy. Possible values are: 0 for Public, 1 for Private, 2 for Password.
password
optional string
The password for the statistics page. Only works with privacy set to 2.
email
optional integer
Periodic email reports. Possible values are: 0 for Disabled, 1 for Enabled.
exclude_bots
optional integer
Exclude common bots from being tracked. Possible values are: 0 for Disabled, 1 for Enabled.
exclude_params
optional string
Exclude URL query parameters from being tracked. One per line..
exclude_ips
optional string
Exclude IPs from being tracked. One per line..




Delete

API endpoint:

DELETE
https://webzender.com/api/v1/websites/{id}

Request example:

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