Skip to content

Web Tags API

Get all web tags

  • Method: GET
  • Path: /ml/web-tags
  • Description: Retrieves multiple web tags.

Example using curl:

bash
curl -X GET \
  -H "Authorization: Bearer <your-token>" \
  https://api.almeta.cloud/ml/web-tags
  • Response:
    • web_tags (array of objects): The list of retrieved web tags.

Get a web tag by ID

  • Method: GET
  • Path: /ml/web-tags/:web_tag_id
  • Description: Retrieves a single web tag by its ID.
  • Request Parameters:
ParameterTypeDescription
web_tag_idstringThe ID of the web tag to retrieve.

Example using curl:

bash
curl -X GET \
  -H "Authorization: Bearer <your-token>" \
  https://api.almeta.cloud/ml/web-tags/wt_1234567890abcd
  • Response:
    • web_tag (object): The retrieved web tag object.

Create a new web tag

  • Method: POST
  • Path: /ml/web-tags
  • Description: Creates a new web tag.
  • Request Body:
PropertyTypeDescription
namestringThe name of the new web tag.
enabledbooleanIndicates whether the new web tag is enabled.
allow_originsarray of stringsThe list of allowed origins for the new web tag.

Example using curl:

bash
curl -X POST \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{
    "name": "New Web Tag",
    "enabled": true,
    "allow_origins": ["https://almeta.cloud"]
}' \
https://api.almeta.cloud/ml/web-tags
  • Response:
  • web_tag (object): The newly created web tag object.

Update a web tag

  • Method: PATCH
  • Path: /ml/web-tags/:web_tag_id
  • Description: Updates a web tag by its ID.
  • Request Parameters:
ParameterTypeDescription
web_tag_idstringThe ID of the web tag to update.
  • Request Body:
PropertyTypeDescription
namestringThe updated name of the web tag. (optional)
enabledbooleanIndicates whether the web tag is enabled. (optional)
allow_originsarray of stringsThe updated list of allowed origins for the web tag. (optional)

Example using curl:

bash
curl -X PATCH \
  -H "Authorization: Bearer <your-token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Web Tag",
    "enabled": false,
    "allow_origins": ["https://almeta.cloud"]
  }' \
  https://api.almeta.cloud/ml/web-tags/wt_1234567890abcd
  • Response:
    • web_tag (object): The updated web tag object.