I'm working on a flow that can search confluence using external services.
I can search successfully via postman. I am able to hit confluence via external services and obtain data but the flow throws an unhandled fault when parsing the response:
Error Occurred: Unable to map response for parameter: 200 and invokable action: Confluence5.getRestApiContentSearch.
I have reviewed the response and the schema definition and as far as I can tell it does match up. I will post the definition and the response at the end of this post, in case there is something obvious I am missing. I have also posted them as gists on github if its easier to read request response
The only thing that i have noticed in the schema is that Restrictions is an empty object.
"definitions": {
"Restrictions": {},
"_links": {.....
In the docs it says "A property must include a value" but i'm not sure of the implications of that. Any suggestions on what to look for or test would be appreciated.
The flow is just a proof of concept and only runs the external service action and does not reference the response at all.
SCHEMA
{
"swagger": "2.0",
"info": {
"description": "defaultDescription",
"version": "0.1",
"title": "confluence search"
},
"paths": {
"/rest/api/content/search": {
"get": {
"produces": [
"application/json"
],
"parameters": [
{
"name": "limit",
"in": "query",
"required": false,
"type": "string",
"x-example": "2"
},
{
"name": "cql",
"in": "query",
"required": false,
"type": "string",
"x-example": "space=sfdc"
}
],
"responses": {
"200": {
"description": "Definition generated from Swagger Inspector",
"schema": {
"$ref": "#/definitions/Model0"
}
}
},
"security": [
{
"Secured": []
}
]
}
}
},
"securityDefinitions": {
"Secured": {
"type": "basic"
}
},
"definitions": {
"Restrictions": {},
"_links": {
"properties": {
"webui": {
"type": "string"
},
"tinyui": {
"type": "string"
},
"self": {
"type": "string"
}
}
},
"_expandable": {
"properties": {
"container": {
"type": "string"
},
"metadata": {
"type": "string"
},
"extensions": {
"type": "string"
},
"operations": {
"type": "string"
},
"children": {
"type": "string"
},
"history": {
"type": "string"
},
"ancestors": {
"type": "string"
},
"body": {
"type": "string"
},
"version": {
"type": "string"
},
"descendants": {
"type": "string"
},
"space": {
"type": "string"
}
}
},
"Results": {
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"status": {
"type": "string"
},
"title": {
"type": "string"
},
"restrictions": {
"$ref": "#/definitions/Restrictions"
},
"_links": {
"$ref": "#/definitions/_links"
},
"_expandable": {
"$ref": "#/definitions/_expandable"
}
}
},
"Model0links": {
"properties": {
"self": {
"type": "string"
},
"next": {
"type": "string"
},
"base": {
"type": "string"
},
"context": {
"type": "string"
}
}
},
"Model0": {
"properties": {
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Results"
}
},
"start": {
"type": "integer",
"format": "int32"
},
"limit": {
"type": "integer",
"format": "int32"
},
"size": {
"type": "integer",
"format": "int32"
},
"cqlQuery": {
"type": "string"
},
"searchDuration": {
"type": "integer",
"format": "int32"
},
"totalSize": {
"type": "integer",
"format": "int32"
},
"_links": {
"$ref": "#/definitions/Model0links"
}
}
}
}
}
RESPONSE THAT THROWS ERROR (COPIED FROM FLOW DEBUGGER AND FORMATTED)
{
"results":[
{
"id":"86573808",
"type":"page",
"status":"current",
"title":"Tasks",
"restrictions":{
},
"_links":{
"webui":"/display/SFDC/Tasks",
"tinyui":"/x/8AIpBQ",
"self":"https://confluence.ashoka.org/rest/api/content/86573808"
},
"_expandable":{
"container":"",
"metadata":"",
"extensions":"",
"operations":"",
"children":"",
"history":"/rest/api/content/86573808/history",
"ancestors":"",
"body":"",
"version":"",
"descendants":"",
"space":"/rest/api/space/SFDC"
}
},
{
"id":"90210910",
"type":"page",
"status":"current",
"title":"documentation migration plan and training plan",
"restrictions":{
},
"_links":{
"webui":"/display/SFDC/documentation+migration+plan+and+training+plan",
"tinyui":"/x/XoJgBQ",
"self":"https://confluence.ashoka.org/rest/api/content/90210910"
},
"_expandable":{
"container":"",
"metadata":"",
"extensions":"",
"operations":"",
"children":"",
"history":"/rest/api/content/90210910/history",
"ancestors":"",
"body":"",
"version":"",
"descendants":"",
"space":"/rest/api/space/SFDC"
}
}
],
"start":0,
"limit":2,
"size":2,
"cqlQuery":"space=SFDC and type=page",
"searchDuration":24,
"totalSize":19,
"_links":{
"self":"https://confluence.ashoka.org/rest/api/content/search?cql=space%3DSFDC+and+type%3Dpage",
"next":"/rest/api/content/search?limit=2&start=2&cql=space%3DSFDC+and+type%3Dpage",
"base":"https://confluence.ashoka.org",
"context":""
}
}