When working with SharePoint and Power Automate, you may have used the action “Send an HTTP request to SharePoint”. It’s one of the most powerful tools in the connector, allowing you to call the SharePoint REST API directly and perform operations far beyond the standard “Get items” or “Create item” actions.
To unlock its full potential, you need to understand the query parameters — the hidden gems that control what data you fetch, how it’s filtered, and how it’s shaped in the response.
This post walks you through every usable query parameter with examples you can copy straight into your flow.
🔍 1. $select — Return Only the Fields You Need
The $select parameter lets you specify exactly which fields to return. This improves performance and makes your flow easier to parse.
Example:
_api/web/lists/getbytitle('Employees')/items?$select=ID,Title,Department,Created
✅ Returns only ID, Title, Department, and Created.
🎯 2. $filter — Filter Items Based on Conditions
Use $filter to return only records that match your criteria.
Syntax:
?$filter=FieldName operator 'value'
Common operators:eq, ne, gt, lt, ge, le, and, or, startswith(), substringof()
Examples:
_api/web/lists/getbytitle('Projects')/items?$filter=Status eq 'Active'
_api/web/lists/getbytitle('Employees')/items?$filter=Salary gt 60000 and Department eq 'HR'
_api/web/lists/getbytitle('Customers')/items?$filter=startswith(Title,'A')
📅 3. $orderby — Sort Results
Sort data ascending (asc) or descending (desc).
Example:
_api/web/lists/getbytitle('Tasks')/items?$orderby=DueDate desc
➡️ Returns latest tasks first.
You can sort by multiple columns:
?$orderby=Priority asc,Created desc
🔢 4. $top — Limit How Many Items Are Returned
Restrict results to avoid performance hits.
Example:
_api/web/lists/getbytitle('Orders')/items?$top=5
➡️ Returns only 5 items.
⏭️ 5. $skiptoken — Pagination for Large Lists
If your list exceeds 5000 items, SharePoint adds a $skiptoken in the response. Use it to get the next page.
Example:
_api/web/lists/getbytitle('Orders')/items?$skiptoken=Paged=TRUE%26p_ID=101
🔗 6. $expand — Retrieve Lookup and User Details
Use $expand to fetch details from lookup or person fields.
Example:
_api/web/lists/getbytitle('Tasks')/items?$select=Title,AssignedTo/Title,AssignedTo/EMail&$expand=AssignedTo
➡️ Returns task title plus the user’s name and email.
🧾 7. $format — Set Response Format
Optional — defines how the API returns data.
Example:
_api/web/lists/getbytitle('Employees')/items?$format=json
🔢 8. $count — Include Total Count in Results
Example:
_api/web/lists/getbytitle('Orders')/items?$count=true
Combine with $filter:
?$filter=Status eq 'Pending'&$count=true
⚡ 9. Combine $orderby, $filter, and $top
Example:
_api/web/lists/getbytitle('Projects')/items?$select=Title,StartDate,Status&$filter=Status eq 'Active'&$orderby=StartDate desc&$top=3
➡️ Returns the 3 most recent active projects.
🧩 10. $expand + $select for Lookup Fields
Example:
_api/web/lists/getbytitle('Tasks')/items?$select=Title,Project/Title,AssignedTo/Title&$expand=Project,AssignedTo
➡️ Returns task name, project name, and assigned user.
🔍 11. $search — Modern Search API
Used only in the Search endpoint:
_api/search/query?querytext='Project Alpha'&selectproperties='Title,Path,Author'
🧮 12. $inlinecount — Legacy Version of $count
Older systems may use this:
?$inlinecount=allpages
Prefer $count=true for modern usage.
🧠 Combine Parameters Like a Pro
You can chain parameters using &.
Example:
_api/web/lists/getbytitle('Employees')/items?$select=ID,Title,Department&$filter=Department eq 'IT'&$orderby=Created desc&$top=10
➡️ Fetches the 10 most recent IT employees.
💡 Pro Tips for Efficient Queries
| Tip | Description |
|---|---|
✅ Use $select | Always limit fields for performance |
🎯 Use $filter early | Filter on the server, not in Power Automate |
🔄 Combine $expand wisely | Fetch only necessary lookup details |
| 📉 Avoid large pulls | Use $top + $skiptoken for paging |
| 🧪 Test in browser | You can test queries at: /sites/yoursite/_api/... |
🧰 Common Use Cases
| Scenario | Query Example |
|---|---|
| Get today’s items | ?$filter=Created ge datetime'2025-11-03T00:00:00Z' |
| Items modified by user | ?$filter=Editor/Title eq 'John Doe'&$expand=Editor |
| Latest item | ?$orderby=Created desc&$top=1 |
| Between two dates | ?$filter=Created ge datetime'2025-10-01T00:00:00Z' and Created le datetime'2025-10-31T23:59:59Z' |
| Not null field | ?$filter=FieldName ne null |
🧱 Bonus: Use Clean JSON Metadata
In headers (for cleaner responses):
Accept: application/json;odata=nometadata
or
Accept: application/json;odata=minimalmetadata
🏁 Final Thoughts
Mastering these query parameters transforms how you interact with SharePoint through Power Automate. Instead of relying on multiple “Get Items” and “Filter array” steps, you can do it all directly in one HTTP call — faster, cleaner, and more professional.
💡 Pro Tip:
If you often use REST queries in flows, create a SharePoint REST Cheatsheet for your team. It saves hours of trial and error when writing or debugging advanced queries.
🧭 SharePoint REST API Cheatsheet
🔹 Base URL
https://<tenant>.sharepoint.com/sites/<SiteName>/_api/
🧾 Common Endpoints
| Purpose | Endpoint Example |
|---|---|
| Site info | _api/web |
| List info | _api/web/lists/getbytitle('MyList') |
| List items | _api/web/lists/getbytitle('MyList')/items |
| Single item | _api/web/lists/getbytitle('MyList')/items(1) |
| File details | _api/web/getfilebyserverrelativeurl('/sites/site/Shared Documents/test.docx') |
| Folder details | _api/web/getfolderbyserverrelativeurl('/sites/site/Shared Documents') |
| Users | _api/web/siteusers |
| Groups | _api/web/sitegroups |
| Search | _api/search/query?querytext='keyword' |
⚙️ Common HTTP Methods
| Method | Action | Notes |
|---|---|---|
| GET | Read | Use $filter, $select, $expand |
| POST | Create | Needs JSON body with __metadata |
| PATCH | Update | Requires header IF-MATCH: * |
| DELETE | Delete | Requires IF-MATCH: * or eTag |
💡 Key Headers
| Header | Purpose |
|---|---|
Accept: application/json;odata=nometadata | Clean JSON output |
Content-Type: application/json;odata=verbose | For POST/PATCH |
IF-MATCH: * | Ignore concurrency |
X-HTTP-Method: DELETE | Used for delete via POST |
🧮 Query Parameters
| Parameter | Description | Example |
|---|---|---|
$select | Choose fields | ?$select=ID,Title,Status |
$filter | Filter results | ?$filter=Status eq 'Active' |
$orderby | Sort results | ?$orderby=Created desc |
$top | Limit results | ?$top=5 |
$expand | Include lookup/person fields | ?$expand=Author,Editor |
$count | Include total count | ?$count=true |
$format | Response format | ?$format=json |
$skiptoken | Pagination | ?$skiptoken=Paged=TRUE%26p_ID=101 |
🔍 Filter Operators
| Operator | Meaning | Example |
|---|---|---|
eq | Equal | Status eq 'Active' |
ne | Not equal | Department ne 'HR' |
gt | Greater than | Salary gt 50000 |
lt | Less than | Age lt 30 |
ge | Greater or equal | Created ge datetime'2025-01-01T00:00:00Z' |
le | Less or equal | DueDate le datetime'2025-12-31T00:00:00Z' |
and / or | Combine conditions | Status eq 'Active' and Priority eq 'High' |
startswith() | Begins with | startswith(Title,'A') |
substringof() | Contains | substringof('HR',Department) |
endswith() | Ends with | endswith(Title,'Ltd') |
📋 Common Examples
| Task | Example |
|---|---|
| Get all active projects | _api/web/lists/getbytitle('Projects')/items?$filter=Status eq 'Active' |
| Get top 3 recent tasks | _api/web/lists/getbytitle('Tasks')/items?$orderby=Created desc&$top=3 |
| Get user details | _api/web/siteusers?$filter=Title eq 'John Doe' |
| Get file metadata | _api/web/getfilebyserverrelativeurl('/sites/site/Shared Documents/test.docx')/ListItemAllFields |
| Get items created this month | ?$filter=Created ge datetime'2025-11-01T00:00:00Z' |
🧠 Pro Tips
- ✅ Always use
$selectto reduce response size. - ⚡ Use
$filterfor server-side filtering (faster than Filter Array). - 📄 Pagination: handle
$skiptokenin large lists. - 👤 For user fields, use
$expand=Author,Editor. - 🚀 Test in browser first — try:
https://<tenant>.sharepoint.com/sites/<site>/_api/web/lists/getbytitle('ListName')/items