def create_workspace(self, did, name, version_id=None):
        '''
        Create a workspace in the specified document.

        Args:
            - did (str): the document id of where to create the new workspace
            - name (str): the new name of the copied workspace.
            - version_id (str): the ID of the version to be copied into a new workspace

        Returns:
            - requests.Response: Onshape response data
        '''

        payload = {
            'isPublic': True,
            'name': name,
        }

        if version_id:
            payload['versionId'] = version_id

        return self._api.request('post', '/api/documents/d/' + did + '/workspaces', body=payload)
def create_workspace ( self , did , name , version_id = None ) : payload = { 'isPublic' : True , 'name' : name , } if version_id : payload [ 'versionId' ] = version_id return self . _api . request ( 'post' , '/api/documents/d/' + did + '/workspaces' , body = payload )
Create a workspace in the specified document.

        Args:
            - did (str): the document id of where to create the new workspace
            - name (str): the new name of the copied workspace.
            - version_id (str): the ID of the version to be copied into a new workspace

        Returns:
            - requests.Response: Onshape response data