Skip to main content

Search users

GET 

https://whatpulse.test/api/v1/users

Search for users by username. Returns a paginated list of users matching the search criteria. Only public user information (ID and username) is returned. The search is case-insensitive and matches partial usernames.

Request

Query Parameters

    search string
    per_page string

Responses

Schema
    users object[]required
  • Array [
  • idintegerrequired

    The unique identifier for the user.

    usernamestringrequired

    The username of the user.

  • ]
  • pagination objectrequired
    current_pageintegerrequired

    The current page number in the paginated result.

    per_pageintegerrequired

    The number of items per page in the paginated result.

    totalintegerrequired

    The total number of items across all pages.

    last_pageintegerrequired

    The total number of pages available in the paginated result.

    fromintegerrequired

    The starting item index for the current page.

    tointegerrequired

    The ending item index for the current page.

    links objectrequired
    firststringrequired

    The URL for the first page of results.

    laststringrequired

    The URL for the last page of results.

    prevstring | nullnullablerequired

    The URL for the previous page of results, or null if there is no previous page.

    nextstring | nullnullablerequired

    The URL for the next page of results, or null if there is no next page. If you're paginating, you can call this url to get the next page of results.

    filters objectrequired
    searchstringrequired

Authorization: http

name: httptype: httpscheme: bearer
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://whatpulse.test/api/v1/users"
method := "GET"

client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)

if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Accept", "application/json")
req.Header.Add("Authorization", "Bearer <token>")

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))
}
Request Collapse all
Base URL
https://whatpulse.test/api/v1
Auth
Parameters
— query
— query
ResponseClear

Click the Send API Request button above and see the response here!