Below code calls the retrieve method and works fine
class SomeWorkflow(ViewSet):
serializer_class = SomeWorkflowSerializer
def retrieve(self, request, pk):
response = OtherWorkflow.as_view({'get': 'retrieve'})(request._request, 'some_id').data
Now I want to call the OtherWorkflowSerializer class's create method. The create method also takes some parameters like {'id': 1, 'file_path': '/foo/bar/file.txt'}