Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8887423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:48:16+00:00 2026-06-14T21:48:16+00:00

I am doing an assignment where I need to interact with a Tastypie API.

  • 0

I am doing an assignment where I need to interact with a Tastypie API. I have no control over the API, I have just been given the details of it and told it is set up to allow GET’s, POST’s and DELETE’s only.

Example POST – works

curl --dump-header - -H "Accept: application/json" -H "Content-Type: application/json" -X     POST -d '{"email":"test@someemail.com","tr_referral":"SomeFeed","mailing_lists":1,"ip_address":"192.168.1.23"}' http://api.somesite.info/v1/account/?username=test\&api_key=a0495db44f4gch749c4gf56906350f336571d94

Example GET – works

curl http://api.somesite.info/v1/account/202126/?username=test\&api_key=a0495db44f4gch749c4gf56906350f336571d94

GET Response:

{"birth_date": null, "city": "", "country": "nl", "email": "test@someemail.com", "first_name": "", "gender": "", "last_name": "", "lead": true, "mailing_lists": [{"name": "Classic NL", "resource_uri": "/v1/mailing_list/1/"}], "phone": "", "resource_uri": "/v1/account/202126/", "street_number": "", "tr_input_method": "", "tr_ip_address": "192.168.1.23", "tr_language": "", "tr_referral": {"name": "SomeFeed", "resource_uri": ""}, "utm_campaign": "", "utm_medium": "", "utm_source": "SomeFeed", "zipcode": ""}

Now here is one of many POST’s I have tried in order to trigger an update of the record:

curl --dump-header - -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d '{"email":"test@someemail.com","tr_referral":"SomeFeed","mailing_lists":2,"ip_address":"192.168.1.46"}' http://api.somesite.info/v1/account/?username=test\&api_key=a0495db44f4gch749c4gf56906350f336571d94

It results in:

HTTP/1.1 409 CONFLICT
Server: nginx/1.2.1
Date: Wed, 14 Nov 2012 20:42:35 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

Email address test@someemail.com already exists.

I also tried POSTing to the following URL:

http://api.somesite.info/v1/account/202126/?username=test\&api_key=a0495db44f4gch749c4gf56906350f336571d94

That returned:

HTTP/1.1 501 NOT IMPLEMENTED
Server: nginx/1.2.1
Date: Wed, 14 Nov 2012 20:45:01 GMT
Content-Type: text/html; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive

I need to update the record using a POST. What am I doing wrong?

Please note, I have changed some of the data e.g. URL’s, api key, etc

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:48:18+00:00Added an answer on June 14, 2026 at 9:48 pm

    I thought I should come supply an “answer” to this.

    It turns out that what was written in the assignment document was misleading and I was not to update the accounts via a POST as this functionality was not allowed.

    What they actually wanted was for me to DELETE the account and then re-POST it which doesn’t seem like the best way to go about it as it requires two API calls for every “update” rather than just one. Couldn’t even use the PATCH command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing a homework assignment for my summer OO class and we need
I am doing a homework assignment for my summer OO class and we need
so we're doing this assignment at Uni and i have a serious craving to
I have an assignment where we need to write a (very simplified) multithreaded compression
I'm in a group assignment at university doing a swing GUI course and need
I need to implement a chess game for a school assignment, and you have
I have an assignment on 8086 assembly (this is homework), I need to display
We have just started our new assignment - web-based project. Before I get directly
I am doing an assignment for my course where I need to rotate a
I am doing my assignment in Network architecture 1, where I have to implement

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.