Docs - Endpoints

Logs

Both endpoint groups and autogroups keep logs that can be fetched by using the /get_endpoint_logs/ and /get_autogroup_logs/ endpoints, respectively.

At a high level, endpoint group logs relate to managing instances, and autogroup logs relate to searching for offers to create instances from, as well as calls to create instances using the offers. For both types of groups, there are four levels of logs with decreasing levels of detail: debug, trace, info0, and info1.

Inputs #

/get_endpoint_stats/ #

  • One of the following:
    • id: ID of your endpoint group
    • endpoint: Name of your endpoint group
  • api_key: The API_KEY corresponding to your endpoint group used for authentication purposes

/get_autogroup_stats/ #

  • id: The ID of your autogroup
  • api_key: The API_KEY corresponding to your autogroup used for authentication purposes

Outputs #

  • info0: The contents of the info0 log
  • info1: The contents of the info1 log
  • trace: The contents of the trace log
  • debug: The contents of the debug log

Note that each log level has a fixed size, and once it is full, the log is wiped and overwritten with new log messages. It is good practice to check these regularly if you are looking for certain messages.

Example: Fetching Endpoint Logs with cURL #

1 curl https://run.vast.ai/get_endpoint_logs/ \n-X POST \n-d '{"endpoint" : "my-endpoint", "api_key" : "API_KEY_HERE"}' \n-H 'Content-Type: application/json'