client = $client; } public function getAllTemplate() { if ($this->client->checkApiExits()) { $response = TlsHttpClientFactory::vCenter() ->withHeaders([ 'vmware-api-session-id' => $this->client->token ]) ->get("https://{$this->client->apiUri}/rest/com/vmware/content/library")->json(); if (!isset($response['type'])) { return $response['value']; } return false; } return "Login_Again"; } }