Search users
GEThttps://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
- 200
- 401
- application/json
- Schema
- Example (auto)
Schema
users object[]required
pagination objectrequired
links objectrequired
filters objectrequired
{
"users": [
{
"id": 0,
"username": "string"
}
],
"pagination": {
"current_page": 0,
"per_page": 0,
"total": 0,
"last_page": 0,
"from": 0,
"to": 0
},
"links": {
"first": "string",
"last": "string"
},
"filters": {
"search": "string"
}
}
Unauthenticated
- application/json
- Schema
- Example (auto)
Schema
messagestringrequired
Error overview.
{
"message": "string"
}
Authorization: http
name: httptype: httpscheme: bearer
- go
- java
- javascript
- kotlin
- nodejs
- objective-c
- php
- powershell
- python
- r
- ruby
- rust
- swift
- NATIVE
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))
}
ResponseClear