Skip to content

K2 is not returning the SharePoint list column value using swagger #2

@DR06

Description

@DR06

Hi,

My goal is to display the SharePoint online list item to my K2 smartform.
for that I am using REST service broker and that broker requires "Swagger descriptor file".

So I created the API for fetching the SharePoint online list item using Microsoft graph and created the swagger file from it.

While testing I am getting the proper HTTP response as 200 but its not returning me any column value.

I am pasting my swagger file and the response from the API when I tested from POSTMAN for your reference

Swagger descriptor:

{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "Microsoft Graph - Example"
},
"host": "graph.microsoft.com",
"schemes": [
"https"
],

"/beta/SharePoint/sites/e5a8b628-7deb-4250-bddc-6188951e7562,df669d0a-2a06-4c1c-8abe-d80a92d4c377/lists/e618e01c-f44d-485f-be21-f42ea593198d/items?expand=ColumnSet": {
  "get": {
    "tags": [
      "LoadList"
    ],
    "operationId": "LoadList",
    "consumes": [ ],
    "produces": [
      "application/json"
    ],
    "parameters": [ ],
    "responses": {
      "200": {
        "description": "Success",
        "schema": {
          "$ref": "#/definitions/ListData"
        }
      }
    }
  }
}

},
"definitions": {
"Object": {
"type": "object",
"properties": { }
},

"ListData": {
  "type": "object",
  "properties": {
    "Title": {
      "type": "string"
  
}
  }
  }

}

}

and here is the response of the API from POSTMAN

{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#sharePoint/sites('e5a8b628-7deb-4250-bddc-6188951e7562%2Cdf669d0a-2a06-4c1c-8abe-d80a92d4c377')/lists('e618e01c-f44d-485f-be21-f42ea593198d')/items",
"value": [
{
"@odata.etag": ""01981ee2-d0dd-4558-aba1-5d329d78f182,2"",
"createdBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"createdDateTime": "2017-03-28T10:12:56Z",
"eTag": "01981ee2-d0dd-4558-aba1-5d329d78f182,2",
"id": "01981ee2-d0dd-4558-aba1-5d329d78f182",
"lastModifiedBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"lastModifiedDateTime": "2017-03-30T04:58:54Z",
"webUrl": "https://trelleborg.sharepoint.com/sites/development/DivyaRaj/Lists/Change%20Requests/1_.000",
"listItemId": 1,
"columnSet@odata.context": "https://graph.microsoft.com/beta/$metadata#sharePoint/sites('e5a8b628-7deb-4250-bddc-6188951e7562%2Cdf669d0a-2a06-4c1c-8abe-d80a92d4c377')/lists('e618e01c-f44d-485f-be21-f42ea593198d')/items('01981ee2-d0dd-4558-aba1-5d329d78f182')/columnSet/$entity",
"columnSet": {
"Title": "Test1",
"k5x4": "Divya Raj",
"lavb": "Problem statement test 1",
"LinkTitleNoMenu": "Test1",
"LinkTitle": "Test1",
"Author": "Divya Raj",
"AuthorId": 42,
"Modified": "2017-03-30T04:58:54-07:00",
"id": "1",
"Editor": "Divya Raj",
"EditorId": 42,
"Created": "2017-03-28T10:12:56-07:00",
"Attachments": false,
"ContentType": "Item",
"Edit": "",
"UIVersionString": "1.0",
"ItemChildCount": "0",
"FolderChildCount": "0"
}
},
{
"@odata.etag": ""2c1b0d2a-6bc3-40c1-8652-6c87248173df,2"",
"createdBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"createdDateTime": "2017-03-28T10:13:27Z",
"eTag": "2c1b0d2a-6bc3-40c1-8652-6c87248173df,2",
"id": "2c1b0d2a-6bc3-40c1-8652-6c87248173df",
"lastModifiedBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"lastModifiedDateTime": "2017-03-30T04:59:06Z",
"webUrl": "https://trelleborg.sharepoint.com/sites/development/DivyaRaj/Lists/Change%20Requests/2
.000",
"listItemId": 2,
"columnSet@odata.context": "https://graph.microsoft.com/beta/$metadata#sharePoint/sites('e5a8b628-7deb-4250-bddc-6188951e7562%2Cdf669d0a-2a06-4c1c-8abe-d80a92d4c377')/lists('e618e01c-f44d-485f-be21-f42ea593198d')/items('2c1b0d2a-6bc3-40c1-8652-6c87248173df')/columnSet/$entity",
"columnSet": {
"Title": "Test2",
"k5x4": "Anand Patil",
"lavb": "Problem Statement test 2",
"LinkTitleNoMenu": "Test2",
"LinkTitle": "Test2",
"Author": "Divya Raj",
"AuthorId": 42,
"Modified": "2017-03-30T04:59:06-07:00",
"id": "2",
"Editor": "Divya Raj",
"EditorId": 42,
"Created": "2017-03-28T10:13:27-07:00",
"Attachments": false,
"ContentType": "Item",
"Edit": "",
"UIVersionString": "1.0",
"ItemChildCount": "0",
"FolderChildCount": "0"
}
},
{
"@odata.etag": ""7cca1ff9-db25-4ea8-a196-f3d792954f9b,2"",
"createdBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"createdDateTime": "2017-03-28T11:55:19Z",
"eTag": "7cca1ff9-db25-4ea8-a196-f3d792954f9b,2",
"id": "7cca1ff9-db25-4ea8-a196-f3d792954f9b",
"lastModifiedBy": {
"user": {
"id": "3d14e513-cd99-4d7c-b74f-27eeae4a424d",
"displayName": "Divya Raj"
}
},
"lastModifiedDateTime": "2017-03-30T04:59:41Z",
"webUrl": "https://trelleborg.sharepoint.com/sites/development/DivyaRaj/Lists/Change%20Requests/3
.000",
"listItemId": 3,
"columnSet@odata.context": "https://graph.microsoft.com/beta/$metadata#sharePoint/sites('e5a8b628-7deb-4250-bddc-6188951e7562%2Cdf669d0a-2a06-4c1c-8abe-d80a92d4c377')/lists('e618e01c-f44d-485f-be21-f42ea593198d')/items('7cca1ff9-db25-4ea8-a196-f3d792954f9b')/columnSet/$entity",
"columnSet": {
"Title": "Test3",
"k5x4": "Dino",
"lavb": "Problem Statement test 3",
"LinkTitleNoMenu": "Test3",
"LinkTitle": "Test3",
"Author": "Divya Raj",
"AuthorId": 42,
"Modified": "2017-03-30T04:59:41-07:00",
"id": "3",
"Editor": "Divya Raj",
"EditorId": 42,
"Created": "2017-03-28T11:55:19-07:00",
"Attachments": false,
"ContentType": "Item",
"Edit": "",
"_UIVersionString": "1.0",
"ItemChildCount": "0",
"FolderChildCount": "0"
}
}
]
}


Looking for some help over here.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions