Tags
Last modified by Hostkey Admin on 2022/07/14 11:51
We keep auxiliary and temporary information about servers and their components in tags. Tags may be assigned to any server's element. Some tags are visible to the end-user, some are not.
Tag actions:
Resource | Action | Description |
---|---|---|
tags.php | add | Action add a tag to the server or change existing tag |
tags.php | remove | Action removes a tag for a server |
tags.php | list | Action gets all tags for the server |
tags.php | user_search | Action find the servers with tags |
Tags/Add
HTTP Method - POST
Parameter | Required | Type | Value/default | Description |
---|---|---|---|---|
action | * | string | add | Main action - Action add a tag to the server or change existing tag |
token | * | string | Your session token | |
id | * | int | Your server ID | |
tag | * | string | Tag name | |
value | * | string | Tag value | |
extra | string | extra value if necessary to keep several values for the key |
Example create new tag cURL:
curl -s "https://invapi.hostkey.com/tags.php" -X POST \
--data "action=add" \
--data "token=" \
--data "id=" \
--data "tag=" \
--data "value=" \
--data "extra="
--data "action=add" \
--data "token=" \
--data "id=" \
--data "tag=" \
--data "value=" \
--data "extra="
Example change existing tag cURL:
curl -s "https://invapi.hostkey.com/tags.php" -X POST \
--data "action=add" \
--data "token=" \
--data "id=" \
--data "tag=" \
--data "value=" \
--data "extra="
--data "action=add" \
--data "token=" \
--data "id=" \
--data "tag=" \
--data "value=" \
--data "extra="
Tags/Remove
HTTP Method - POST
Parameter | Required | Type | Value/default | Description |
---|---|---|---|---|
action | * | string | remove | Main action - removes a tag from a server |
token | * | string | Your session token | |
id | * | int | Your server ID | |
tag | * | string | Tag name |
curl -s "https://invapi.hostkey.com/tags.php" -X POST \
--data "action=remove" \
--data "token=" \
--data "id=" \
--data "tag="
--data "action=remove" \
--data "token=" \
--data "id=" \
--data "tag="
Tags/List
HTTP Method - POST
Parameter | Required | Type | Value/default | Description |
---|---|---|---|---|
action | * | string | list | Main action - retrive all tags from the server server_id |
token | * | string | Your session token | |
id | * | int | Your server ID |
curl -s "https://invapi.hostkey.com/tags.php" -X POST \
--data "action=list" \
--data "token=" \
--data "id="
--data "action=list" \
--data "token=" \
--data "id="
Tags/User_search
HTTP Method - POST
Parameter | Required | Type | Value/default | Description |
---|---|---|---|---|
action | * | string | user_search | Main action - this request searches for servers IDs with tag name or value matching search_pattern as a substing |
token | * | string | Your session token | |
value | * | string | search pattern |
curl -s "https://invapi.hostkey.com/tags.php" -X POST \
--data "action=user_search" \
--data "token=" \
--data "value="
--data "action=user_search" \
--data "token=" \
--data "value="