Hi @saranya_poovendiran, those warnings come from FDK’s no-deprecated-apis lint rule, which does static pattern matching on your frontend JS. It does not prove you’re calling v1 APIs.
Important: Even /api/v2/agents can trigger this warning (confirmed in community). The message mentions v1 deprecation, but the linter also flags restricted or sensitive admin endpoints - the wording is misleading.
What to check at the flagged lines
Open these exact lines and look for URL/path strings or deprecated platform APIs:
| File | Lines |
|---|---|
app/scripts/app.js |
28 |
app/scripts/dashboard.js |
142, 213, 329, 496, 571 |
Common triggers:
// Path strings in frontend code (even v2)
'/api/v2/agents'
'/api/v2/roles'
'/api/v2/groups'
// Deprecated data method
client.data.get('domainName') // → use currentHost
// Actual v1 (would also trigger)
'/api/v1/'
Your listed endpoints likely causing warnings:
GET /api/v2/agentsandGET /api/v2/agents/<id>GET /api/v2/rolesandGET /api/v2/roles/<roleId>- Possibly
GET /api/v2/groups
These are admin-style APIs flagged by the linter when referenced from frontend request templates/invocations.
What to do
1. Move admin REST calls to serverless (SMI)
Keep invokeTemplate in frontend, but route sensitive calls through server/server.js → $request.invokeTemplate(). Some admin endpoints are restricted from frontend Request Method and may return 403 at runtime anyway.
2. Prefer platform data methods where possible
| Instead of REST | Use |
|---|---|
| Current agent info | client.data.get('loggedInUser') |
| Ticket details | client.data.get('ticket') |
| Domain / account URL | client.data.get('currentHost') (not domainName) |
3. Warnings vs errors
These are warnings - pack/validate can still succeed. Marketplace review may ask you to justify admin API usage.
Quick debug
NODE_DEBUG=fdk fdk validate
Check log/fdk.log for no-deprecated-apis details.
If you share the code at one flagged line (e.g. dashboard.js:142), we can pinpoint the exact pattern.