Consistent 404 When Adding a Lineup via Json API

Consistent 404 When Adding a Lineup via Json API

Postby riothamus » Sun Jun 15, 2014 6:20 pm

I’m having trouble adding and seeing lineups via the json api.

Via the headends I see:
Code: Select all
curl -H 'token: XXXX’ 'https://json.schedulesdirect.org/20131021/headends?country=USA&postalcode=19146' | jsonpp

  "19146": {
    "type": "Over-the-Air",
    "location": "19146",
    "lineups": [
      {
        "name": "Antenna",
        "uri": "\/20131021\/lineups\/USA-OTA-19146"
      }
    ]
  }


When trying to add that lineup via the api:
Code: Select all
curl -H 'token: XXXX’ -d '' 'https://json.schedulesdirect.org/20131021/lineups/USA-OTA-19146'

<html><head><title>404 Page Not Found</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{display:inline-block;width:65px;}</style></head><body><h1>404 Page Not Found</h1><p>The page you are looking for could not be found. Check the address bar to ensure your URL is spelled correctly. If all else fails, you can visit our home page at the link below.</p><a href="/">Visit the Home Page</a></body></html>


I tried adding different lineups (another OTA, and one cable), but got the same result.

Any assistance adding a lineup would be a big help…
riothamus
 
Posts: 3
Joined: Sun Jun 15, 2014 10:47 am

Re: Consistent 404 When Adding a Lineup via Json API

Postby rkulagow » Mon Jun 16, 2014 6:30 am

If you send me a timestamp of when you made the attempt, I can see what's on the server.

Have you tried looking at the php grabber as a starting point?
rkulagow
SD Staff
 
Posts: 911
Joined: Tue Aug 14, 2007 3:15 pm

Re: Consistent 404 When Adding a Lineup via Json API

Postby riothamus » Fri Nov 28, 2014 12:53 pm

Hi @rkulagow. Sorry for the entirely delayed reply; I've finally had time to revisit this project.

This was my error. My curl command was making a POST request, not a PUT request.

I just did this using the 20140530 version and was successful.
riothamus
 
Posts: 3
Joined: Sun Jun 15, 2014 10:47 am

Re: Consistent 404 When Adding a Lineup via Json API

Postby rkulagow » Fri Nov 28, 2014 1:00 pm

Excellent.
rkulagow
SD Staff
 
Posts: 911
Joined: Tue Aug 14, 2007 3:15 pm


Return to Developer

Who is online

Users browsing this forum: No registered users and 5 guests

cron