Forum Discussion
Robbe
4 years agoRegular Visitor
Web.Contents Call, not working
Hi all,
I'm trying to do an API call that should send the following Call :
https://<<BASE-URL>>/rest/insight/1.0/iql/objects?objectSchemaId=3&iql=objectId=3As documented here: Solved: Insight Rest API to query custom attributes (atlassian.com)
I currently have the following :
let
FetchPage = (url as text, pageSize as number, skipRows as number) as table =>
let
contents = Web.Contents(URL&"/rest/insight/1.0/iql/",[
RelativePath = "objects" ,
Query = [
objectSchemaId = "3" ,
iql = objectId = "7249" ,
maxResults= Text.From(pageSize),
startAt = Text.From(skipRows)]]),
json = Json.Document(contents),
Value = json[issues],
table = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
table meta [skipRows = skipRows + pageSize, total = 500]
in
FetchPage
The main issue I think is the fact that the line "iql = objectId = "7249" has a double "=".
Any Idea how I should fix my Call ?
Robbe
5 Replies
- RobbeRegular Visitor
Hi ImkeF ,
Thank you for your reply!
I indeed tried that aswell, but I got the following error :let FetchPage = (url as text, pageSize as number, skipRows as number) as table => let contents = Web.Contents(URL&"/rest/insight/1.0/iql/",[ RelativePath = "objects" , Query = [ objectSchemaId = "3" , iql = [objectId = "7249"], maxResults= Text.From(pageSize), startAt = Text.From(skipRows)]]), json = Json.Document(contents), Value = json[issues], table = Table.FromList(Value, Splitter.SplitByNothing(), null, null, ExtraValues.Error) in table meta [skipRows = skipRows + pageSize, total = 500] in FetchPageAny ideas?
Robbe
- RobbeRegular Visitor
Hi,
As soon as I put the "=" between quotations it switches the "=" to "%5B"The other suggestions you gave :
Resulted still into this:
Are you sure the nested Queries work ?Robbe