public function getAPI()
    {
        if (empty($this->api)) {
            if (!empty($this->config(static::TOOL_CANVAS_API)['token'])) {
                $this->setAPI(new CanvasPest(
                    'https://' . $_SESSION[ToolProvider::class]['canvas']['api_domain'] . '/api/v1',
                    $this->config(static::TOOL_CANVAS_API)['token']
                ));
            } else {
                throw new ConfigurationException(
                    'Canvas URL and Token required',
                    ConfigurationException::CANVAS_API_INCORRECT
                );
            }
        }
        return $this->api;
    }