Highlighted

How to access API with arguments?

Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

This is the API page Reports.getInactivePages (Method)  and this is how to invoke the API Invoking the API Using ColdFusion . However, I want to use the QueryRowLimit=0 to return all the records. This is what I have.

<cfset inactivePagesReport = Server.CommonSpot.api.getObject('reports')>

<cfset inactivePages = inactivePagesReport.getInactivePages(0)>

<cfset records = inactivePages.QueryRowLimit = 0 >

<cfdump var="#records#" >

This is not working. It got this error: Attempt to add a field to a locked structure of type 'Reports_GetInactivePages_Result'

I haven't used Commonspot in over a decade so I am not sure how much help I can be.  It looks like on line 2 you are making the call and getting your result set, but then on line 3 you are trying to add a limiter to that result set.  According to the docs you provided, a correct call would look similar to the following:

<cfset inactivePagesReport = Server.CommonSpot.api.getObject('reports')>

<cfset inactivePages = inactivePagesReport.getInactivePages(userId=0, limit=0)>

<cfdump var="#inactivePages#" >

Views

282

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to access API with arguments?

Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

This is the API page Reports.getInactivePages (Method)  and this is how to invoke the API Invoking the API Using ColdFusion . However, I want to use the QueryRowLimit=0 to return all the records. This is what I have.

<cfset inactivePagesReport = Server.CommonSpot.api.getObject('reports')>

<cfset inactivePages = inactivePagesReport.getInactivePages(0)>

<cfset records = inactivePages.QueryRowLimit = 0 >

<cfdump var="#records#" >

This is not working. It got this error: Attempt to add a field to a locked structure of type 'Reports_GetInactivePages_Result'

I haven't used Commonspot in over a decade so I am not sure how much help I can be.  It looks like on line 2 you are making the call and getting your result set, but then on line 3 you are trying to add a limiter to that result set.  According to the docs you provided, a correct call would look similar to the following:

<cfset inactivePagesReport = Server.CommonSpot.api.getObject('reports')>

<cfset inactivePages = inactivePagesReport.getInactivePages(userId=0, limit=0)>

<cfdump var="#inactivePages#" >

Views

283

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Dec 11, 2017 0
Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

I haven't used Commonspot in over a decade so I am not sure how much help I can be.  It looks like on line 2 you are making the call and getting your result set, but then on line 3 you are trying to add a limiter to that result set.  According to the docs you provided, a correct call would look similar to the following:

<cfset inactivePagesReport = Server.CommonSpot.api.getObject('reports')>

<cfset inactivePages = inactivePagesReport.getInactivePages(userId=0, limit=0)>

<cfdump var="#inactivePages#" >

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0
2Charlie LATEST
Engaged ,
Dec 11, 2017

Copy link to clipboard

Copied

nc_tunney, super awesome! Thank you. It works.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Dec 11, 2017 0