My Web Scenario URL is a Sharepoint RestAPI query to read a file content. This query needs a valable access token, it was created in the step before.
This URL works with the Postman:
https://companie.sharepoint.com/site.../mysite/Shared Documents/TestNote.txt')/$value
The first problem is, the end of the URL ($value) was interpreted as a macro, my solution:
https://companie.sharepoint.com/site.../mysite/Shared Documents/TestNote.txt')/%24value
Now is there no more a macro, but it is still a bad query.
Do you have any ideas what the problem is?
Extended Log from Zabbix Proxy:
This URL works with the Postman:
https://companie.sharepoint.com/site.../mysite/Shared Documents/TestNote.txt')/$value
The first problem is, the end of the URL ($value) was interpreted as a macro, my solution:
https://companie.sharepoint.com/site.../mysite/Shared Documents/TestNote.txt')/%24value
Now is there no more a macro, but it is still a bad query.
Do you have any ideas what the problem is?
Extended Log from Zabbix Proxy:
Code:
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'{$OPENFILEURL}'
2914:20210921:075214.698 In DCget_user_macro() macro:'{$OPENFILEURL}'
2914:20210921:075214.698 End of DCget_user_macro()
2914:20210921:075214.698 End substitute_simple_macros_impl() data:'https://companie.sharepoint.com/sites/mysite/_api/web/GetFileByServerRelativeUrl('/sites/mysite/Shared Documents/TestNote.txt')/%24value'
2914:20210921:075214.698 In http_substitute_variables() data:'https://companie.sharepoint.com/sites/mysite/_api/web/GetFileByServerRelativeUrl('/sites/mysite/Shared Documents/TestNote.txt')/%24value'
2914:20210921:075214.698 End of http_substitute_variables() data:'https://companie.sharepoint.com/sites/mysite/_api/web/GetFileByServerRelativeUrl('/sites/mysite/Shared Documents/TestNote.txt')/%24value'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'Do you can read that'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'200'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:EMPTY
2914:20210921:075214.698 In http_substitute_variables() data:''
2914:20210921:075214.698 End of http_substitute_variables() data:''
2914:20210921:075214.698 query [txnlev:0] [select name,value,type from httpstep_field where httpstepid=80 order by httpstep_fieldid]
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'Bearer {token}'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'Authorization'
2914:20210921:075214.698 In http_substitute_variables() data:'Authorization'
2914:20210921:075214.698 End of http_substitute_variables() data:'Authorization'
2914:20210921:075214.698 In http_substitute_variables() data:'Bearer {token}'
2914:20210921:075214.698 End of http_substitute_variables() data:'Bearer XYZ'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'application/json;odata=verbose'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'Content-Type'
2914:20210921:075214.698 In http_substitute_variables() data:'Content-Type'
2914:20210921:075214.698 End of http_substitute_variables() data:'Content-Type'
2914:20210921:075214.698 In http_substitute_variables() data:'application/json;odata=verbose'
2914:20210921:075214.698 End of http_substitute_variables() data:'application/json;odata=verbose'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'application/json;odata=verbose'
2914:20210921:075214.698 In substitute_simple_macros_impl() data:'Accept'
2914:20210921:075214.698 In http_substitute_variables() data:'Accept'
2914:20210921:075214.698 End of http_substitute_variables() data:'Accept'
2914:20210921:075214.699 In http_substitute_variables() data:'application/json;odata=verbose'
2914:20210921:075214.699 End of http_substitute_variables() data:'application/json;odata=verbose'
2914:20210921:075214.699 In substitute_simple_macros_impl() data:'15s'
2914:20210921:075214.699 process_httptest() use step "Get OpenFile"
2914:20210921:075214.699 process_httptest() use post ""
2914:20210921:075214.699 process_httptest() go to URL "https://companie.sharepoint.com/sites/mysite/_api/web/GetFileByServerRelativeUrl('/sites/mysite/Shared Documents/TestNote.txt')/%24value"
2914:20210921:075214.705 In int_in_list() list:'200' value:400
2914:20210921:075214.705 End of int_in_list():FAIL
2914:20210921:075214.705 In process_step_data() rspcode:400 time:0.005792 speed:53694.000000
2914:20210921:075214.705 query [txnlev:0] [select type,itemid from httpstepitem where httpstepid=80]
2914:20210921:075214.705 In zbx_preprocess_item_value()
2914:20210921:075214.705 End of zbx_preprocess_item_value()
2914:20210921:075214.705 In zbx_preprocess_item_value()
2914:20210921:075214.705 End of zbx_preprocess_item_value()
2914:20210921:075214.705 In zbx_preprocess_item_value()
2914:20210921:075214.705 End of zbx_preprocess_item_value()
2914:20210921:075214.705 End of process_step_data()
2914:20210921:075214.705 query without transaction detected
2914:20210921:075214.705 query [txnlev:0] [update httptest set nextcheck=1632203594 where httptestid=65]
2914:20210921:075214.705 cannot process step "Get OpenFile" of web scenario "Sharepoint Login" on host "Sharepoint API": response code "400" did not match any of the required status codes "200"