title: Is bad practice to mix REST and RPC together?
body: <p>I'm fairly new to <strong>REST</strong> web services and very used to <strong>RPC</strong>. I know the advantages of <strong>REST</strong> by reading several posts like <a href="https://stackoverflow.com/questions/15056878/rest-vs-json-rpc">this</a> one.</p>
  
  <p>I am developing the server in django using django-rest-framework.</p>
  
  <p>Although have this question (or questions):</p>
  
  <p>I have this model:</p>
  
  <pre><code>class Poll(models.Model):
      questionString = models.CharField(max_length=500, blank=True)
      timeToAnswer = models.IntegerField(default=30)
      startDate = models.DateTimeField(null=True, db_column='startDate', blank=True)
      token = models.CharField(max_length=20, blank=True, unique=True)
  
  class PollAggregator(models.Model):
  
      name = models.CharField(max_length=135)
      description = models.CharField(max_length=500, blank=True)
      votersToken = models.CharField(max_length=20, null=True, blank=True)
  
  class PollPollAggregatorRel(models.Model):
      pollAggregator = models.ForeignKey(PollAggregator, null=True, db_column='pollAggregatorId', blank=True)
      poll = models.ForeignKey(Poll, null=True, db_column='pollId', blank=True)
  </code></pre>
  
  <p>So I can have a single poll or I can have a bunch of polls aggregated in a poll aggregator (i.e. room).</p>
  
  <p>So I created the rest calls: pollList, pollDetail, pollAggregatorList, pollAggregatorDetail. But I have problems to design for PollPollAgregatorRel. 
  Of course I can have PollPollAgregatorRelList and PollPollAgregatorRelDetail and make the normal post, get, update, delete. So if I want to make a new relation between a poll and poll aggregator in REST style, I do:</p>
  
  <ul>
  <li>Check if PollPollAgregator (list) exists with the poll id with a get and filtered by pollId</li>
  <li>If so, I update this item to have my new pollAggregator id</li>
  <li>If not I create a new PollPollAgregator with a post</li>
  </ul>
  
  <p><em>My first question is is there any easier and simpler way to do this?</em></p>
  
  <p>If I use a RPC like web service I do something like:</p>
  
  <ul>
  <li>Relate poll with pollAggregator and use a get_or_create for PollPollAggregatorRel. So I update or create a new PollPollAggregatorRel object.</li>
  </ul>
  
  <p>So using RPC like, the client uses only one call versus REST that needs to call 2 times. In this case seems to be much simpler to use RPC for both server and client side.</p>
  
  <p><em>Second question is: Is it bad practice to use both REST and RPC in the same API?</em></p>