API V2.x - Beta Release

A place for developers to advertise their TheTVDB.com enabled app and get help from other developers with the API.
awlunsfo
API Developer
Posts: 27
Joined: Mon Feb 23, 2015 9:36 am

API V2.x - Beta Release

Postby awlunsfo » Sat Sep 12, 2015 6:31 pm

Hey Everyone,

We reached feature parity with the current version of the API, and as such we'd like to announce that V2.x has officially gone into beta. The last update added the /series/:id/actors route, while removing the "actors" information from series records.

The beta version can be found at https://api-beta.thetvdb.com/ with documentation at the /swagger route. https://api-dev.thetvdb.com/ has concluded its role as the alpha site and will now function as a development testbed for latest-version changes.

Thank you for all of the great feedback so far through the alpha phase! We were able to fix a lot of issues and uncover use cases that we were previously unaware of. Please continue to post any bugs you encounter or thoughts you might have to improve the API as we move into beta.

Thanks!
Last edited by MattS on Mon Apr 04, 2016 11:09 am, edited 2 times in total.
Reason: Locking since current beta is done.

maxg
Posts: 11
Joined: Mon Oct 05, 2015 4:56 pm

Re: API V2.x - Beta Release

Postby maxg » Mon Oct 05, 2015 5:02 pm

Hi-

Couple things (apologies - this is my first time using the API):

1. I am submitting my api key, username, and password into the API documentation and getting

Code: Select all

{
  "Error": "Not Authorized"
}


Username for the account is plex-api

2. Is it true that a JWT key is only necessary for calls to /user endpoints? If that's the case, how do I include the API key for calls to all other end-points?

MattS
Posts: 218
Joined: Sat Mar 27, 2010 12:17 am
Contact:

Re: API V2.x - Beta Release

Postby MattS » Mon Oct 05, 2015 5:33 pm

Make sure you're using an application api key and not your personal one. You should be able to get a valid token with just the application api key.

The JWT token is needed for all calls after the login, user/pass is only needed during initial authentication if you're going to be using the /user endpoints.

maxg
Posts: 11
Joined: Mon Oct 05, 2015 4:56 pm

Re: API V2.x - Beta Release

Postby maxg » Wed Oct 14, 2015 5:40 pm

Hey MattS-

Sorry to bug you again, but I can't seem to find series level ratings (like star ratings, not MPAA rating). Are those still available via the API?

Thanks!

knossos
Posts: 9
Joined: Thu Oct 15, 2015 4:53 am

Re: API V2.x - Beta Release

Postby knossos » Thu Oct 15, 2015 5:08 am

When hitting the API with Accept-Language returns {"Error": "ID: XXXXX not found"} if a translation isn't available in the language specified.

Per the Swagger description of the Accept-Language parameter:
Records are returned with the Episode name and Overview in the desired language, if it exists. If there is no translation for the given language, then the record is still returned but with empty values for the translated fields

Is this a bug or should we first check to see if the series/episode exists without an Accept-Language header before we check for a translated version?

Example:

Check /series/{id} for id 78804 - Successfully returns series record for Doctor Who (2005)
Check /series/{id} with language 'el' (Greek) - Successfully returns series record for Doctor Who (2005) with Greek translations
Check /series/{id} with language 'ko' (Korean) - Returns {"Error": "ID: 78804 not found"}
Check /series/{id} language 'tr' (Turkish) - Returns {"Error": "ID: 78804 not found"}

MattS
Posts: 218
Joined: Sat Mar 27, 2010 12:17 am
Contact:

Re: API V2.x - Beta Release

Postby MattS » Thu Oct 15, 2015 7:57 am

maxg wrote:Hey MattS-

Sorry to bug you again, but I can't seem to find series level ratings (like star ratings, not MPAA rating). Are those still available via the API?

Thanks!


No worries maxg, bug as much as you like. We're not exposing the site ratings for the series as of yet, but I'll get a card on our trello board to include it in the very near future. Shouldn't be too difficult to add.

awlunsfo
API Developer
Posts: 27
Joined: Mon Feb 23, 2015 9:36 am

Re: API V2.x - Beta Release

Postby awlunsfo » Thu Oct 15, 2015 8:20 am

knossos wrote:When hitting the API with Accept-Language returns {"Error": "ID: XXXXX not found"} if a translation isn't available in the language specified.


Thanks for the report!

I'm not sure if this is a bug as much as it is an error in the documentation. The behavior you're seeing corresponds with the way the code and queries are structured, and I can replicate the behavior in my development environment.

I'll investigate further what it will take to get the behavior in-line with the documentation. The specific query for this route is one of the more complicated ones because of the structure of the database, so the result may be to leave the behavior as-is and change the documentation since we can't modify the database schema right now. Either way, I will keep you updated as I get more information!

maxg
Posts: 11
Joined: Mon Oct 05, 2015 4:56 pm

Re: API V2.x - Beta Release

Postby maxg » Thu Oct 15, 2015 8:43 am

MattS wrote:
maxg wrote:Hey MattS-

Sorry to bug you again, but I can't seem to find series level ratings (like star ratings, not MPAA rating). Are those still available via the API?

Thanks!


No worries maxg, bug as much as you like. We're not exposing the site ratings for the series as of yet, but I'll get a card on our trello board to include it in the very near future. Shouldn't be too difficult to add.


Thanks MattS! Looks like we could also use Episode Level site ratings, too!

maxg
Posts: 11
Joined: Mon Oct 05, 2015 4:56 pm

Re: API V2.x - Beta Release

Postby maxg » Thu Oct 15, 2015 8:53 am

Looks like Episode level writers, directors, and IMDB IDs are missing, as well. IMDB ID is missing at the Series level, also.

By the way - I'm sure you know about all of these, mostly just bringing to your attention that we use them, haha.

MattS
Posts: 218
Joined: Sat Mar 27, 2010 12:17 am
Contact:

Re: API V2.x - Beta Release

Postby MattS » Thu Oct 15, 2015 9:01 am

maxg wrote:
MattS wrote:
maxg wrote:Hey MattS-

Sorry to bug you again, but I can't seem to find series level ratings (like star ratings, not MPAA rating). Are those still available via the API?

Thanks!


No worries maxg, bug as much as you like. We're not exposing the site ratings for the series as of yet, but I'll get a card on our trello board to include it in the very near future. Shouldn't be too difficult to add.


Thanks MattS! Looks like we could also use Episode Level site ratings, too!


Got it, card is https://trello.com/c/XDiKriLB

maxg wrote:Looks like Episode level writers, directors, and IMDB IDs are missing, as well. IMDB ID is missing at the Series level, also.

By the way - I'm sure you know about all of these, mostly just bringing to your attention that we use them, haha.


I'm showing the IMDB ID on the series level and for episodes (where that data exists of course), as well as writers/directors. For that level of episode detail, you'll want to use the /episodes/{id} endpoint as documented here. I tested using the records for Better Call Saul and was able to pull that data for the series and the pilot episode via the relevant endpoints.