List user agents
client.Zones.UserAgents.List(ctx, zoneID, query) (*ZoneUserAgentListResponse, error)
GET/zones/{zoneId}/user-agents
Returns a list of user agents in the specified zone. User agents represent client software (browsers, desktop apps, CLI tools) registered via OAuth 2.0 Dynamic Client Registration.
Parameters
zoneID string
Returns
List user agents
package main
import (
"context"
"fmt"
"github.com/keycardai/keycard-go"
)
func main() {
client := keycard.NewClient(
)
userAgents, err := client.Zones.UserAgents.List(
context.TODO(),
"zoneId",
keycard.ZoneUserAgentListParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", userAgents.Items)
}
{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"identifier": "identifier",
"name": "x",
"organization_id": "organization_id",
"slug": "slug",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}Returns Examples
{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"identifier": "identifier",
"name": "x",
"organization_id": "organization_id",
"slug": "slug",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}