Search members and groups
GET
/users/members/search
const url = 'https://feed.work.optidata.cloud/api/users/members/search?query=ana&limit=10';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://feed.work.optidata.cloud/api/users/members/search?query=ana&limit=10' \ --header 'Authorization: Bearer <token>'Finds users and groups to share a community with. Each entry says whether it is a group (is_group) and includes the member_id / member_type used in a community’s allowed_members. Includes the special “All” group.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”query
string
Text to match.
limit
integer
Maximum results (1–100).
Responses
Section titled “ Responses ”Matching members and groups.
Media typeapplication/json
object
members
required
Array<object>
A user or group that a community can be shared with.
object
key
string
member_id
required
Use as member_id in allowed_members. -1 is the “All” group.
integer
member_type
required
Whether a shared member is a user or a group.
string
is_group
required
boolean
name
string | null
email
string | null
uuid
string | null
avatar_url
string | null
Examples
Exampleexample
{ "members": [ { "key": "9c48f58b-9514-4700-b33f-d0635dbec0df", "member_id": 63, "member_type": "App\\Models\\User", "is_group": false, "name": "Bruno Lima", "email": "bruno@example.com", "uuid": "9c48f58b-9514-4700-b33f-d0635dbec0df", "avatar_url": "https://media.optidata.cloud/avatars/bruno.webp" }, { "key": "guid-group-all-users", "member_id": -1, "member_type": "App\\Models\\Group", "is_group": true, "name": "All", "email": null, "uuid": null, "avatar_url": null } ]}No authentication key was sent.
Media typeapplication/json
Authentication failures use an error key.
object
error
required
string
Examples
Exampleexample
{ "error": "JWT passport exception: Missing bearer token in request"}The authentication key is expired or not recognised. Get a fresh one and retry.
Media typeapplication/json
Authentication failures use an error key.
object
error
required
string
Examples
Exampleexample
{ "error": "JWT passport expired: Passport expired"}The request failed validation.
Media typeapplication/json
object
message
required
The first validation message.
string
errors
required
Messages keyed by field name.
object
key
additional properties
Array<string>
Examples
Exampleexample
{ "message": "The name field is required.", "errors": { "name": [ "The name field is required." ] }}