Import set API vs Scripted Rest API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi All ,
I have doubt on a few questions mentioned below . Please help me to find the answers.
1 - Where import set Api is used and where scripted rest api is used ?
2 - Which is better Basic or Auth 2.0 ? While token expires how to get new token and is it a manual or automatic process . If it is automatic then how we can configure it ?
3- What is the significance of co-relation id in integration ?
Thank You
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
28m ago
Hello @1_DipikaD ,
1) Use Import Set for data ingestion and transformation and Use Scripted for custom integrations :
| Import Set API | Scripted REST API |
| Used for bulk data loads into ServiceNow from external sources | Used for custom integrations and exposing tailored REST endpoints |
| Works with staging tables and transform maps | Allows custom logic, validations, and controlled responses |
| Best suited for ETL (Extract, Transform, Load) scenarios | Best suited for real-time integrations and external system communication |
2) Use Basic Auth only for internal use cases. OAuth 2.0 is generally better because it avoids exposing static credentials and supports token lifecycle
| Basic Auth | OAuth 2.0 |
| Simple, credentials sent with every request | More secure, token-based authentication |
| Less secure, not recommended for modern integrations | Preferred for modern integrations |
| No token expiry handling | Access tokens expire; refresh tokens automatically renew |
| Manual credential management | Configured in ServiceNow via System OAuth → Application Registry with refresh token handling |
Refer this for detailed understanding :
What is Difference between table api , import set api and scripted rest api with example ?
If my response helped mark as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
17m ago
responses inline
1 - Where import set Api is used and where scripted rest api is used ? -> scripted rest api is used when 3rd party wants to send request in particular format and response is required as per their format, import set API is mostly used to load data to table
2 - Which is better Basic or Auth 2.0 ? While token expires how to get new token and is it a manual or automatic process . If it is automatic then how we can configure it ? -> OAuth 2.0 is better in terms of security as compared to Basic auth. Before the access token expires 3rd party will have to generate the token again using refresh token. If you are consuming 3rd party using OAuth 2.0 then same process you need to follow
3- What is the significance of co-relation id in integration ? -> it's used to store the unique identifier of 3rd party during integration
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader