How to get data of all columns of an isheet item?

27231

HighQ Api provide an api to get an  iSheet item by item id, but this will get the iSheet item by an iSheet View (use the Default View if the isheet view id not specified).

With this one, I can only get all data (all column data) of an isheet item if I have an iSheet View that is configured to have all columns of the iSheet.

Is there a way that I can get the iSheet item with all of it column data without preparing a iSheet View with all the columns?

 

 

Regards,

Ha Nguyen

  • Ha Nguyen Danh, in short, No. Access to iSheet data using API's is only available through (iSheet) views. And (unfortunately) we cannot create views for "system use" and hide them from users in Collaborate (like we can with iSheets themselves).

  • Andrew Quinn

    I see that we can set permission to the iSheetView so that it is only displayed to some group of users

  • Ha Nguyen Danh, yes, that's fine for background admin tasks.

    Most of our iSheet API data access is using current logged in user, so setting permissions doesn't work to hide views, from the user, used by (JS) code in dashboards. We overcome this by prefixing the name of the view a certain way, and have a proprietary way of "hiding" these prefixed views from the Collaborate UI. However, it would be nice if we could "hide" views from the UI natively, like the "Display in iSheet list" option for iSheets.

  • Andrew Quinn can you tell me the current prefix format that HighQ is using so that I can try to hide that iSheet View even from the site admin user?

  • Hi Ha Nguyen Danh, we use an in-house developed method, however, here is a simple way you can achieve this for your environment:

    1. Decide on a prefix that makes sense to your group. As an example, we want views that start with [SYS.USE
    to be hidden from users
    • (re)name the views you want to hide to include this prefix
    • Add the following CSS into the Custom CSS entry (System Admin / Customize module)
    a#sheetViewQuickDropLinkTxt + ul.dropdown-menu > li > a[title^='[SYS.USE]'] {
        display:none;
    }

    See the attached screenshot for example of this.

    This will "hide" the view (selection) from everyone, though you can still navigate to the views if required. If this is annoying whilst you are developing things, you could modify the CSS to allow you to quickly toggle a top-level class to enable/disable certain features, e.g.

    Modified CSS:

    body:not(.ce-disable) a#sheetViewQuickDropLinkTxt + ul.dropdown-menu > li > a[title^='[SYS.USE]'] {
        display:none;
    }

    Console command:

    $j("body").toggleClass("ce-disable")

    Andrew

    ]]>
  • Hi Ha Nguyen Danh, looks like your request has been answered, re: retrieving all column data, in the API's for Collaborate (5.7.5):

    https://collaborate.highq.com/sitepoint/showSwaggerAPIReleaseNote.action#:~:text=any%20view%20and%20isIgnoreView%3A%20true%20%2D-,fetches%20item%20data%20regardless%20of%20any%20view,-.%0AExample%3A%20/isheet/5/items

     

    Query Parameters: isIgnoreView=true&allColumnRequired=false
    viewID AllColumnRequired IsIgnoreView Result
    0 0 0 Consider default view configuration.
    0 0 1 All column with all permission item(Only for system admin users). throw validation message(Access denied) for rest of the uses.
    0 1 0 Consider default view (return all column data).
    0 1 1 Invalid case(throw access denied message).
    1 0 0 Consider view configuration.
    1 0 1 Invalid case(throw access denied message).
    1 1 0 Consider view and return all column data.
    1 1 1 Invalid case return validation message.

    Andrew

  • Andrew Quinn thank you so much for the new information. The good news is we have a way to do that, the not-very-good news is in order to use " isIgnoreView=true&allColumnRequired=false" we need the System Admin permission.
     

    Not sure if I can have the System Admin access token to make the call to the API, it is kind of a security risk.

     

    How about option : isIgnoreView=false&allColumnRequired=true?

    Do you know the difference with isIgnoreView=true&allColumnRequired=false?​​​​​​

  • Ha Nguyen Danh, you don't need a sys. admin token if you are only after all columns of data in an isheet view, e.g.

    api/14/isheet/9999/items?sheetviewid=9999&offset=0&limit=1000&allColumnRequired=true

    with a non- sys admin token it returns all isheet column data, i.e. including columns not defined in the view. You'll still need a view to access isheet data for normal users, however, including allColumnRequired means you can get all the data for each row, and not limited to what that view exposes (columns).

    If you are a sys. admin token, then you can use isIgnoreView=true to essential access the isheet without a view, accessing all rows and all columns.

    I believe this is the behaviour, though I have only began looking at it today after our instance was upgraded yesterday.

    Andrew

    NOTE: These url parameters ARE case-sensitive! Passing isignoreview or allcolumnrequired will result in them being ignored.

  • Thanks Andrew Quinn,

    allColumnRequired=true is all I need,

    That solves my problem well!