Changes

Jump to navigation Jump to search
Line 1: Line 1:  +
{{Integration TOC}}
 
This is a read-only [https://www.odata.org/ OData v4] API service for accessing questionnaire results.
 
This is a read-only [https://www.odata.org/ OData v4] API service for accessing questionnaire results.
 +
 +
Due to the way how questionnaire data is saved, using the [[Resco CRM Connector|universal REST API]] to retrieve questionnaire results can be fairly complicated for many users. Also, the resulting data is hard to digest in analytical tools, for example, Power BI or Excel, whereas OData is natively supported by many analytics apps.
 +
 +
When using OData, one record in the response corresponds to one answered questionnaire. The response is in a tree structure, answer groups are sub-records. Tools like [[Power BI]] can flatten these into one line.
    
== Authentication ==
 
== Authentication ==
   −
The service uses standard '''BASIC''' authentication with the organization username and password.
+
The service uses standard '''BASIC''' authentication with the organization's username and password.
    
== Service document ==
 
== Service document ==
Line 13: Line 18:  
=== URI ===
 
=== URI ===
   −
https://[baseURI]/odata/questionnaires/v4/[organization]/
+
The service URI depends on server settings; whether the server uses domain organization selection or simple URL organization selection.
 +
 
 +
* <code>https://[baseURI]/odata/questionnaires/v4/[organization]/</code>
 +
* <code>https://[organization].[baseURI]/odata/questionnaires/v4/</code>
 +
 
 +
==== Examples ====
 +
 
 +
* Resco Cloud:      <code><nowiki>https://my_org.rescocrm.com/odata/questionnaires/v4/        </nowiki></code>
 +
* Resco Cloud US:    <code><nowiki>https://my_org.us1.rescocrm.com/odata/questionnaires/v4/    </nowiki></code>
 +
* Resco Inspections: <code><nowiki>https://inspections.resco.net/odata/questionnaires/v4/my_org/</nowiki></code>
    
=== Adjustment of names ===
 
=== Adjustment of names ===
Line 25: Line 39:  
=== Example ===
 
=== Example ===
   −
Request: <nowiki>https://build.rescocrm.com/odata/questionnaires/v4/[organization]/ </nowiki>
+
Request: <nowiki>https://inspections.resco.net/odata/questionnaires/v4/[organization]/ </nowiki>
    
Response:
 
Response:
    
<syntaxhighlight lang="json">{
 
<syntaxhighlight lang="json">{
   "@odata.context": "http://build.rescocrm.com/odata/questionnaires/v4/[organization]/$metadata",
+
   "@odata.context": "http://inspections.resco.net/odata/questionnaires/v4/[organization]/$metadata",
 
   "value": [
 
   "value": [
 
     {
 
     {
Line 52: Line 66:  
== Data request ==
 
== Data request ==
   −
Request for results of questionnaires. The resulting dataset depends on query applied. Without a query a single page of questionnaire results is returned. &gt;&gt;&gt;Default (and max) page size is 1000.
+
Request for results of questionnaires. The resulting dataset depends on query applied. Without a query a single page of questionnaire results is returned. Default (and max) page size is 1000.
    
=== URI ===
 
=== URI ===
   −
https://[baseURI]/odata/questionnaires/v4/[organization]/[AdjustedTemplateName]
+
* <code>https://[baseURI]/odata/questionnaires/v4/[organization]/[AdjustedTemplateName]</code>
 +
* <code>https://[organization].[baseURI]/odata/questionnaires/v4/[AdjustedTemplateName]</code>
    
=== Detailed info ===
 
=== Detailed info ===
Line 88: Line 103:  
=== Example ===
 
=== Example ===
   −
Request: <nowiki> https://build.rescocrm.com/odata/questionnaires/v4/[organization]/Template_Regular_Inspection </nowiki>
+
Request: <nowiki> https://inspections.resco.net/odata/questionnaires/v4/[organization]/Template_Regular_Inspection </nowiki>
    
Response:
 
Response:
    
<syntaxhighlight lang="json">{
 
<syntaxhighlight lang="json">{
   "@odata.context": "http://build.rescocrm.com/odata/questionnaires/v4/[organization]/$metadata#Template_Regular_Inspection",
+
   "@odata.context": "http://inspections.resco.net/odata/questionnaires/v4/[organization]/$metadata#Template_Regular_Inspection",
 
   "value": [
 
   "value": [
 
     {
 
     {
Line 149: Line 164:  
   ]
 
   ]
 
}</syntaxhighlight>
 
}</syntaxhighlight>
 +
 
== Metadata document ==
 
== Metadata document ==
   Line 155: Line 171:  
=== URI ===
 
=== URI ===
   −
https://[baseURI]/odata/questionnaires/v4/[organization]/$metadata
+
* <code>https://[baseURI]/odata/questionnaires/v4/[organization]/$metadata</code>
 +
* <code>https://[organization].[baseURI]/odata/questionnaires/v4/$metadata</code>
    
=== Detailed info ===
 
=== Detailed info ===
Line 169: Line 186:  
=== Example ===
 
=== Example ===
   −
Request: <nowiki> https://build.rescocrm.com/odata/questionnaires/v4/[organization]/$metadata </nowiki>
+
Request: <nowiki> https://inspections.resco.net/odata/questionnaires/v4/[organization]/$metadata </nowiki>
    
Response (shortened):
 
Response (shortened):
Line 283: Line 300:  
* Should we really use a display name of the questionnaire for generating URLs?
 
* Should we really use a display name of the questionnaire for generating URLs?
 
-->
 
-->
 +
 +
[[Category:Resco Cloud]] [[Category:Resco Inspections]]

Navigation menu