users

package
v2.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Devices

type Devices struct {
	ID           int            `json:"id"`
	Name         string         `json:"name,omitempty"`
	UserLocation []UserLocation `json:"geo_loc,omitempty"`
	ZSLocation   []ZSLocation   `json:"zs_loc,omitempty"`
}

type GetUsersFilters

type GetUsersFilters struct {
	// The start time (in seconds) for the query. The value is entered in Unix Epoch. If not entered, returns the data for the last 2 hours.
	From int `json:"from,omitempty" url:"from,omitempty"`
	// The end time (in seconds) for the query. The value is entered in Unix Epoch. If not entered, returns the data for the last 2 hours.
	To int `json:"to,omitempty" url:"to,omitempty"`
	// The Zscaler location (ID). You can add multiple location IDs.
	Loc []int `json:"loc,omitempty" url:"loc,omitempty"`
	// The department (ID). You can add multiple department IDs.
	Dept []int `json:"dept,omitempty" url:"dept,omitempty"`
	// The active geolocation (ID). You can add multiple active geolocation IDs.
	Geo []string `json:"geo,omitempty" url:"geo,omitempty"`
	// The next_offset value from the last request. You must enter this value to get the next batch from the list. When the next_offset value becomes null, the list is complete.
	Offset string `json:"offset,omitempty" url:"offset,omitempty"`
	// The number of items that must be returned per request from the list.
	Limit int `json:"limit,omitempty" url:"limit,omitempty"`
}

type Service

type Service struct {
	Client *zdx.Client
}

func New

func New(c *zdx.Client) *Service

func (*Service) Get

func (service *Service) Get(userID string) (*User, *http.Response, error)

Gets user details including the device information, active geolocations, and Zscaler locations. If the time range is not specified, the endpoint defaults to the last 2 hours.

func (*Service) GetAll

func (service *Service) GetAll(filters GetUsersFilters) ([]User, *http.Response, error)

Gets the list of all active users, their devices, active geolocations, and Zscaler locations. If the time range is not specified, the endpoint defaults to the last 2 hours.

type User

type User struct {
	ID      int       `json:"id"`
	Name    string    `json:"name,omitempty"`
	Email   string    `json:"email,omitempty"`
	Devices []Devices `json:"devices,omitempty"`
}

type UserLocation

type UserLocation struct {
	ID      int    `json:"id"`
	City    string `json:"city,omitempty"`
	Region  string `json:"region,omitempty"`
	Country string `json:"country,omitempty"`
	GeoType string `json:"geo_type,omitempty"`
}

type ZSLocation

type ZSLocation struct {
	ID   int    `json:"id"`
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL