Gets all the remote catalogs:
This endpoint returns all the remote catalogs
curl --location 'http://localhost/api/v1/catalog'
--header 'Authorization ••••••'
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost/api/v1/catalog");
request.Headers.Add("Authorization", "••••••");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
var responseString = await response.Content.ReadAsStringAsync();
package main
import (
"fmt"
"net/http"
"strings"
"io"
)
func main() {
url := "http://localhost/api/v1/catalog"
method := "get"
client := &http.Client{}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", "••••••")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
[
{
"architecture": "string",
"catalog_id": "string",
"created_at": "string",
"description": "string",
"download_count": "int",
"id": "string",
"is_compressed": "bool",
"last_downloaded_at": "string",
"last_downloaded_user": "string",
"metadata_path": "string",
"minimum_requirements": "*MinimumSpecRequirement",
"name": "string",
"pack_contents": [
{
"created_at": "string",
"deleted_at": "string",
"hash": "string",
"is_dir": "bool",
"name": "string",
"path": "string",
"size": "int64",
"updated_at": "string"
}
],
"pack_path": "string",
"pack_relative_path": "string",
"pack_size": "int64",
"path": "string",
"provider": "*CatalogManifestProvider",
"required_claims": "[]string",
"required_roles": "[]string",
"revoked": "bool",
"revoked_at": "string",
"revoked_by": "string",
"size": "int64",
"tags": "[]string",
"tainted": "bool",
"tainted_at": "string",
"tainted_by": "string",
"type": "string",
"untainted_by": "string",
"updated_at": "string",
"version": "string",
"virtual_machine_contents": [
{
"created_at": "string",
"deleted_at": "string",
"hash": "string",
"is_dir": "bool",
"name": "string",
"path": "string",
"size": "int64",
"updated_at": "string"
}
]
}
]
{
"code": "int",
"message": "string",
"stack": [
{
"code": "int",
"description": "string",
"error": "string",
"path": "string"
}
]
}
{
"error": "OAuthErrorType",
"error_description": "string",
"error_uri": "string"
}