Sub Button1_Click
getIoTemplateId
End Sub
Sub getAllIoTemplates
Dim job As HttpJob
'TemplateId Global Variable , RAZ to ""
TemplateId = ""
'Get all templates
Dim ci As String
ci="https://api.safetyculture.io/templates/search"
ci = ci & "?field=name"
job.Initialize("", Me)
job.Download(ci)
job.GetRequest.SetHeader("authorization", "Bearer " & cIOToken)
Wait For (job) JobDone(job As HttpJob)
If job.Success Then
Log(job.GetString)
Else
xui.Msgbox2Async("Pb pour accèder à l'API iAuditor : /templates/search" & CRLF & "Maybe check Bearer","CEE to iAuditor","","","",Null)
End If
job.release
End Sub