Skip to content

Introduce Smartsheet-Integration-Source request header#121

Open
ahmed-ahmed-smartsheet wants to merge 7 commits intosmartsheet:mainlinefrom
ahmed-ahmed-smartsheet:mainline
Open

Introduce Smartsheet-Integration-Source request header#121
ahmed-ahmed-smartsheet wants to merge 7 commits intosmartsheet:mainlinefrom
ahmed-ahmed-smartsheet:mainline

Conversation

@ahmed-ahmed-smartsheet
Copy link
Copy Markdown

@ahmed-ahmed-smartsheet ahmed-ahmed-smartsheet commented Aug 18, 2025

*** DO NOT MERGE ***

Added support for the Smartsheet-Integration-Source request header in httpRequestor.js. The header is used to distinguish between human-initiated API requests vs third-party initiated request such as AI connectors or IT Service Management. Smartsheet needs a way to breakdown Public API requests source in order to enhance services and innovate building new customer experiences with the uprising use of AI tools. AI connectors wishing to integrate with Smartsheet services can do so by providing the Smartsheet-Integration-Source header for their API calls.

@mattmeyerink
Copy link
Copy Markdown
Contributor

Can you update the description with some more information about what the Smartsheet-Integration-Source header is and what it is used for? It is something that is supported by all of the public api endpoints?

@ahmed-ahmed-smartsheet
Copy link
Copy Markdown
Author

@mattmeyerink I updated the description, let me know if you need further information or clarification

@mattmeyerink
Copy link
Copy Markdown
Contributor

@ahmed-ahmed-smartsheet I think I'm still not super clear about the purpose of this header. It is an optional attribute that clients are not required to send, so we won't be able to get reliable tracking from it. There is nothing stopping an "AI Integration" from not passing this header or passing an unexpected value which defeats the purpose of adding the header in the first place.

@ahmed-ahmed-smartsheet
Copy link
Copy Markdown
Author

@mattmeyerink Made the header mandatory, please review and let me know what you think

@ahmed-ahmed-smartsheet ahmed-ahmed-smartsheet added the question Further information is requested label Oct 2, 2025
Comment on lines +78 to +112
describe('Valid Headers', function() {
it('should accept valid AI integration source', function() {
(function() {
createClient({
accessToken: 'test-token',
baseUrl: 'https://api.test.smartsheet.com/2.0/',
smartsheetIntegrationSource: 'AI,MyOrg,MyGPT'
});
}).should.not.throw();
});

it('should accept valid SCRIPT integration source', function() {
(function() {
createClient({
accessToken: 'test-token',
baseUrl: 'https://api.test.smartsheet.com/2.0/',
smartsheetIntegrationSource: 'SCRIPT,MyOrg,MyGPT'
});
}).should.not.throw();
});

it('should accept valid APPLICATION integration source', function() {
(function() {
createClient({
accessToken: 'test-token',
baseUrl: 'https://api.test.smartsheet.com/2.0/',
smartsheetIntegrationSource: 'APPLICATION,MyOrg,MyGPT'
});
}).should.not.throw();
});

it('should accept valid PERSONAL_ACCOUNT integration source', function() {
(function() {
createClient({
accessToken: 'test-token',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use something like parametrized tests to dry up these tests in a single one:

const testCases = [
      { type: 'AI', description: 'AI integration source' },
      { type: 'SCRIPT', description: 'SCRIPT integration source' },
      { type: 'APPLICATION', description: 'APPLICATION integration source' },
      { type: 'PERSONAL_ACCOUNT', description: 'PERSONAL_ACCOUNT integration source' }
    ];

{
"name": "smartsheet",
"version": "4.5.0",
"version": "4.6.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"version": "4.6.0",
"version": "4.7.0",

Copy link
Copy Markdown
Contributor

@smar-kaloyan-gangov smar-kaloyan-gangov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

question Further information is requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants