Interface QueryParams

Query parameters interface for API requests

Used to define common query parameters that can be passed to API endpoints for filtering, sorting, and pagination.

const queryParams: QueryParams = {
limit: 10,
offset: 0,
sort: 'created_at',
order: 'desc',
search: 'ai assistant',
tags: ['ai', 'automation'],
active: true,
org: 'org-123'
};
// Search for active agents with specific tags
const agentQuery: QueryParams = {
q: 'customer support',
tags: ['support', 'automation'],
active: true,
limit: 20
};

const agents = await mosaia.agents.get(agentQuery);
interface QueryParams {
    q?: string;
    limit?: number;
    offset?: number;
    tags?: string[];
    active?: boolean;
    external_id?: string;
    [key: string]: any;
}

Indexable

  • [key: string]: any

    Additional custom query parameters

Properties

q?: string

Search term for text-based filtering

limit?: number

Maximum number of items to return

offset?: number

Number of items to skip (for offset-based pagination)

tags?: string[]

Array of tags to filter by

active?: boolean

Filter by active status

external_id?: string

Filter by external ID