generate sheetid REST API to create workbook

1 follower
0
Avatar

I’m trying to create a workbook using REST API. I read an existing workbook, get the JSON, modify the JSON and then POST the JSON to get a new workbook.

The workbook has multiple sheets. The REST call needs the sheetId property to be populated to succeed. I expected Datameer to generate one for me. Do I need to generate a sheetId and pass it to the REST call?

I’m curious because an Export Job will try to reference this sheet… Will the Export Job use the sheet name or the sheetId?

Saurabh Agashe

Official comment

  • Avatar
    Saurabh Agashe

    Yes, the sheetID is a required field for the REST API to work successfully. Although the name includes "Id" in the title, it is not required to be unique. So if you are using an existing workbook as a template, you may use the sheetId values that were exported.

    With respect to an export job, the sheetId is a component of the configuration. In addition to the sheetId, the Workbook uuid is part of the export job configuration as well. So the referenced sheetId is only within the scope of the uuid.

    In anticipation of a potential follow up question, the Workbook uuid is uniquely generated each time a new workbook is created. Even if an uuid is passed in via REST, an unique uuid will be created for that Workbook when it is saved.

    0

1 comment

Please sign in to leave a comment.