How do I get the Metadata from the Smartsheet?

Hello All,


I am able to get the Row and Column from the smartsheet JSON response but in it there are no metadata. I used things like:

params = {'include': 'objectValue,objectProperties,format,formula,columnType,options'}

and passed it with the request. But I still do not get any metadata. Specifically, I am trying to get the "_OUTLINELEVEL_" column that is present in the smartsheet.


Could someone please help me get this data?

Answers

  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭

    hi @sm_py, I believe you are trying to determine parent/child relationships between rows, correct? if you review the json when performing a get_sheet, you will see an "id" associated to the row, and a "parentID" associated to a row if the row is indented. If you pull the row id and the row parentID, you would be able to construct the outline. i haven't seen any specific method to get the outline without doing a little bit of legwork, but it shouldn't be too hard to pull apart.

@isabonita<\/a> <\/p>

See below link:<\/p>

https:\/\/smartsheet.redoc.ly\/tag\/groups#operation\/add-group<\/a><\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":227,"urlcode":"api-and-developers","name":"API and Developers"},{"tagID":442,"urlcode":"groups-and-group-management","name":"Groups and Group Management"}]},{"discussionID":106741,"type":"question","name":"Using the API to get attachment URLs","excerpt":"I have PDF row attachments in a sheet. I need to get a direct URL to the attachment but I can't see a way to do this in the API. Using the GUI to \"send\" the file provides a link - so I'm trying to get something similar through the API. I'm aware that the the URL using the GUI method expires after 30 days. I would prefer…","snippet":"I have PDF row attachments in a sheet. I need to get a direct URL to the attachment but I can't see a way to do this in the API. Using the GUI to \"send\" the file provides a link -…","categoryID":320,"dateInserted":"2023-06-21T22:40:34+00:00","dateUpdated":null,"dateLastComment":"2023-06-22T20:21:40+00:00","insertUserID":150432,"insertUser":{"userID":150432,"name":"jzadra","url":"https:\/\/community.smartsheet.com\/profile\/jzadra","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-26T19:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":150432,"lastUser":{"userID":150432,"name":"jzadra","url":"https:\/\/community.smartsheet.com\/profile\/jzadra","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-26T19:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":39,"score":null,"hot":3374853734,"url":"https:\/\/community.smartsheet.com\/discussion\/106741\/using-the-api-to-get-attachment-urls","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106741\/using-the-api-to-get-attachment-urls","format":"Rich","tagIDs":[227,268],"lastPost":{"discussionID":106741,"commentID":381846,"name":"Re: Using the API to get attachment URLs","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381846#Comment_381846","dateInserted":"2023-06-22T20:21:40+00:00","insertUserID":150432,"insertUser":{"userID":150432,"name":"jzadra","url":"https:\/\/community.smartsheet.com\/profile\/jzadra","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-06-26T19:32:15+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-22T20:20:13+00:00","dateAnswered":"2023-06-22T00:36:56+00:00","acceptedAnswers":[{"commentID":381653,"body":"

You make a call to<\/p>

https:\/\/api.smartsheet.com\/2.0\/sheets\/$Sheet_ID?include=attachments<\/a><\/p>

substituting $Sheet_ID for the sheet ID and get the attachment id for each row<\/p>

Then call<\/p>

https:\/\/api.smartsheet.com\/2.0\/sheets\/$Sheet_ID\/attachments\/$This_Attachment_ID<\/a><\/p>

which will return the direct link for the attachment.<\/p>

\/marc<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":227,"urlcode":"api-and-developers","name":"API and Developers"},{"tagID":268,"urlcode":"Attachments","name":"Attachments"}]},{"discussionID":106669,"type":"question","name":"Use Smartsheet API to sync with external system","excerpt":"Hello I have a need to sync Smartsheet with an external system, the only way I can get the data out of the system is via a regularly updated report - however I have no way for the report to not include all data. Ideally the API would give me an option to specify the value of the primary column, and if there is an existing…","snippet":"Hello I have a need to sync Smartsheet with an external system, the only way I can get the data out of the system is via a regularly updated report - however I have no way for the…","categoryID":320,"dateInserted":"2023-06-20T21:21:16+00:00","dateUpdated":"2023-06-21T11:24:56+00:00","dateLastComment":"2023-06-23T12:58:14+00:00","insertUserID":162555,"insertUser":{"userID":162555,"name":"Shadlx","url":"https:\/\/community.smartsheet.com\/profile\/Shadlx","photoUrl":"https:\/\/lh3.googleusercontent.com\/a\/AAcHTtdokt0nGDZOXEkKg-O9G7ARD3eB31xhoB3NROG0=s96-c","dateLastActive":"2023-06-30T15:53:08+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":91566,"lastUserID":45516,"lastUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-30T20:24:17+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":7,"countViews":69,"score":null,"hot":3374825370,"url":"https:\/\/community.smartsheet.com\/discussion\/106669\/use-smartsheet-api-to-sync-with-external-system","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/106669\/use-smartsheet-api-to-sync-with-external-system","format":"Rich","tagIDs":[219,227],"lastPost":{"discussionID":106669,"commentID":381929,"name":"Re: Use Smartsheet API to sync with external system","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/381929#Comment_381929","dateInserted":"2023-06-23T12:58:14+00:00","insertUserID":45516,"insertUser":{"userID":45516,"name":"Paul Newcome","title":"","url":"https:\/\/community.smartsheet.com\/profile\/Paul%20Newcome","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/userpics\/082\/nQPUTVFKKWDJ2.jpg","dateLastActive":"2023-06-30T20:24:17+00:00","banned":0,"punished":0,"private":false,"label":"✭✭✭✭✭✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-06-22T22:28:59+00:00","dateAnswered":"2023-06-22T16:20:04+00:00","acceptedAnswers":[{"commentID":381770,"body":"

@Shadlx<\/a> Data Shuttle has the ability to set up various triggers depending on the direction of the flow of data. Certain situations allow for immediate triggering and others are as frequent as every 15 minutes.<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":320,"name":"API & Developers","url":"https:\/\/community.smartsheet.com\/categories\/api-developers","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[{"tagID":219,"urlcode":"Sheets","name":"Sheets"},{"tagID":227,"urlcode":"api-and-developers","name":"API and Developers"}]}],"initialPaging":{"nextURL":"https:\/\/community.smartsheet.com\/api\/v2\/discussions?page=2&categoryID=320&includeChildCategories=1&type%5B0%5D=Question&excludeHiddenCategories=1&sort=-hot&limit=3&expand%5B0%5D=all&expand%5B1%5D=-body&expand%5B2%5D=insertUser&expand%5B3%5D=lastUser&status=accepted","prevURL":null,"currentPage":1,"total":202,"limit":3},"title":"Trending in API & Developers","subtitle":null,"description":null,"noCheckboxes":true,"containerOptions":[],"discussionOptions":[]}">

Trending in API & Developers