Batch Queries *PREVIEW*

Version 2.0 of the API adds bulk queries and queue changes.  With this functionality, you can make multiple requests in a single wrapper.

Bulk Queue Updates

We have implemented this feature to allow a developer to update a user's queue by PUTting a new queue representation to the subscriber’s queue resource.  After uploading a new representation of the subscriber’s queue, this method rearranges the queue to match your representation. Before making any changes, the uploaded queue is checked to make sure that the queue is correctly formed and actionable (i.e., no duplicates). The tool can act on a subscriber’s Instant Queue, but cannot change the Saved Queue.

Using the Bulk Queue Update

Parameters:

Name Details
OAuth access control Consumer key + access token + signature. (Required)

Input details:

Method
PUT
Path http://api.netflix.com/users/user_ID/queues/instant
Input format
  • The tool will accept an ETag in both headers and XML.
  • Instead of accepting queue identifier which has an embedded queue position, use the title link rel instead.
  • The document order is the queue order. Any positional information is discarded.
queue_item element
  • The queue representation is required, as a link element with a rel attribute describing the queue type.
  • The title representation is required, as a standard title link element.

Example queue representation:

<queue>
  <etag>923437166411</etag>
  <queue_item>
     <link rel="http://schemas.netflix.com/queues.available" title="available queue"></link>
    <link href="http://api.netflix.com/catalog/titles/movies/60010488" rel="http://schemas.netflix.com/catalog/title" title="Indiana Jones and the Temple of Doom"></link>
     <category scheme="http://api.netflix.com/categories/title_formats" label="Instant" term="Instant"></category>
   </queue_item>
  <queue_item>
     <link … />
     <link … />
     <category … />
  </queue_item>  …</queue>

Response codes

The API only returns HTTP response codes.

Code Meaning
200 Success
304 Supplied representation matches current user queue
401 OAuth failure
400 (660) The given format is not available for the user
400 (130) Title not found or not available
409 The resulting queue would be too large
Conflicts found within the representation
412 Etag concurrency error
Duplicate title observed in input
500 Internal error. Partial update of queue may have occurred

Partial errors

While processing the incoming queue, there are a number of error situations.  When an error can be detected before starting the operations, the user's queue will remain unchanged.

What could go wrong how it would signaled back to the user state of the user's queue
Queue too large after expanding seasons and series discs 409 unchanged
Title not found or not available 400 (130) unchanged
Queue is stale (etag) 412 unchanged
Title is alread in the saved queue 400 (620) unchanged
Duplicate title found 400 (710) unchanged
Title not found or not available on specified media for user 400 (660) unchanged
Catastrophic failure 500 unknown

Bulk Queries

We have implemented this feature to allow a developer to batch queries into a single API request.

Bulk request details

Method
POST or GET (GET is restricted to 4000 bytes)
Path
http://api.netflix.com/utility/bulk
Bulk Query Contents
  • The wrapper request is not signed
  • Requests within the bulk query are signed in the usual manner as if they were an individual request (OAuth).
  • Bulk request entry identifiers are developer defined, prefixed by entry_ (ie entry_ratings or entry_12)
  • Return order is not guaranteed.
  • Individual requests (within the bulk) are concurrently sent
Usage Limits
  • Each request of the bulk query is counted against the user quota
  • Rate limits apply
  • Requests with a bulk query which exceed the rate limits will return a 403 (OVER QPS) error

Request Template

POST api.netflix.com/bulk
output=
{pox|json} default pox
entry_string=SIGNED API REST REQUEST
entry_string=SIGNED API REST REQUEST
entry_string=SIGNED API REST REQUEST

Response Template:

<response>  
   <entry>
       <id>entry_entry_id</id>
       <body>
           <status>http status code</status>
           <header name="ETag" value="" /> 
(*Optional header)
           <header name="Location" value="" /> 
(*Optional Header)
           xml response
       </body>
    </entry>
    <entry>
       <id>entry_entry_id</id>
       <body>
           <status>http status code</status>
           <header name="ETag" value="" /> 
(*Optional header)
           <header name="Location" value="" /> 
(*Optional Header)
           xml response
       </body>
    </entry>
</response>

Example

Request

POST api.netflix.com/bulk   entry_user_data=http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-?oauth_token=T1XZuqyOqvahr0Voh6hmetEvNa2GaNnW90oWlMxYpIgqhPLIeKLo8vEYIHew0OrrbBE4jefcqumyoF2QBQmdJM8Q--&oauth_consumer_key=6d362cqhthcbkkpcyxqzhg97   entry_ratings=http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/ratings/title/actual?oauth_token=T1XZuqyOqvahr0Voh6hmetEvNa2GaNnW90oWlMxYpIgqhPLIeKLo8vEYIHew0OrrbBE4jefcqumyoF2QBQmdJM8Q--&oauth_consumer_key=6d362cqhthcbkkpcyxqzhg97   entry_search_montyPython=http://api.netflix.com/catalog/titles?term=monty+python&max_results=5&oauth_consumer_key=6d362cqhthcbkkpcyxqzhg97

Response

<response>    <entry>       <id>entry_user_data</id>       <body>          <status_code>200</status_code>          <header name="Etag" value=""794408712429 " />          <user>              <user_id>T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-</user_id>              <first_name>Mike</first_name>              <last_name>Cohen</last_name>              <can_instant_watch>true</can_instant_watch>              <preferred_formats>                 <category scheme="http://api.netflix.com/categories/title_formats" label="Instant" term="Instant"></category>              </preferred_formats>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/queues" rel="http://schemas.netflix.com/queues" title="queues"></link>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/rental_history" rel="http://schemas.netflix.com/rental_history" title="rental history"></link>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/recommendations" rel="http://schemas.netflix.com/recommendations" title="recommendations"></link>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/title_states" rel="http://schemas.netflix.com/title_states" title="title states"></link>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/ratings" rel="http://schemas.netflix.com/ratings" title="ratings"></link>             <link href="http://api.netflix.com/users/T1LEIhze8PhTSCQfnwohN9s0BnHopKAvBUM_nid6H8AYk-/feeds" rel="http://schemas.netflix.com/feeds" title="feeds"></link>          </user>       </body>    </entry>

   <entry>       <id>entry_search_montyPython</id>       <body>           <status>200</status>           <header name="Etag" value=""794408712429"-gzip" />           <catalog_titles>               <link href="http://api.netflix.com/catalog/titles/index" rel="http://schemas.netflix.com/catalog/titles/index" title="index"></link>               <link href="http://api.netflix.com/catalog/titles/autocomplete" rel="http://schemas.netflix.com/catalog/titles/autocomplete" title="autocomplete"></link>               <url_template>http://api.netflix.com/catalog/titles?{-join|&|term|start_index|max_results}</url_template>               <number_of_results>1086</number_of_results>              <start_index>0</start_index>              <results_per_page>5</results_per_page>              <catalog_title>                  <id>http://api.netflix.com/catalog/titles/movies/70050423</id>                  <title short="Monty Python: In the Beginning" regular="Monty Python: In the Beginning"></title>                  <box_art small="http://cdn-3.nflximg.com/us/boxshots/tiny/70050423.jpg"                                medium="http://cdn-3.nflximg.com/us/boxshots/small/70050423.jpg"                                large="http://cdn-3.nflximg.com/us/boxshots/large/70050423.jpg"></box_art>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/synopsis" rel="http://schemas.netflix.com/catalog/titles/synopsis" title="synopsis"></link>                  <release_year>1969</release_year>                  <category scheme="http://api.netflix.com/categories/tv_ratings" label="NR" term="NR"></category>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/cast" rel="http://schemas.netflix.com/catalog/people.cast" title="cast"></link>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/format_availability" rel="http://schemas.netflix.com/catalog/titles/format_availability" title="formats"></link>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/screen_formats" rel="http://schemas.netflix.com/catalog/titles/screen_formats" title="screen formats"></link>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/languages_and_audio" rel="http://schemas.netflix.com/catalog/titles/languages_and_audio" title="languages and audio"></link>                  <average_rating>3.3</average_rating>                  <link href="http://api.netflix.com/catalog/titles/movies/70050423/similars" rel="http://schemas.netflix.com/catalog/titles.similars" title="similars"></link>                  <link href="http://www.netflix.com/Movie/Monty_Python_In_the_Beginning/70050423" rel="alternate" title="web page"></link>             </catalog_title>         </catalog_titles>      </body>   </entry>   <entry>      <id>entry_ ratings</id>      <body>         <status>              <status_code>401</status_code>              <message>user_id is invalid</message>          </status>       </body>     </entry> </response>

18 Comments

  1. nitramssirc1 year ago

    Does this actually work or is it still in a preview state?

  2. Mrbass211 year ago

    I also want to know if this feature is live yet. This would be a very desired feature for a student project I'm doing.

  3. lwertz10 months ago

    Would it be possible to get any kind of a status update on this? I see that the page is updated fairly frequently (3 weeks ago); how stable does the API dev team think this feature is, David? Any idea on timelines for a stable release?

    It's okay to let us know that it isn't stable or that it won't be stable for a long time -- we just need to know something so we can plan & build accordingly.

    Thanks for your hard work on the API!

  4. Edward Petersen7 months ago

    Is there an update to whether or not this is live? Or have things changed given the split in the business?

  5. lisaS1 month ago

    Les gens de tous ages à tout le monde dans la marque de maroquinerie, http://www.louisvuittonsacparis.org sac louis vuitton fran?ais fondé en 1854, le plus célèbre est le logo de monogramme intemporelle. LV dans les années 1990 a commencé à développer empire de la mode, mais encore des sacs les plus populaires récente chef l'artiste japonais Takashi Murakami.

  6. woshi554 weeks ago

    As a world leader in the skateboarding footwear industry, <strong><a href="http://www.orderdcshoes.com">DC Shoes</a></strong> are always really high in demand.Young and old, men and women are taking a huge risk trying to master skateboarding tricks. In order to do that, the skateboarders will need top of the line <strong><a href="http://www.orderdcshoes.com/mens-dc-shoes-c-25.html">DC footwear</a></strong> that will allow them to twist, turn, and flip their board with ease. The <strong><a href="http://www.orderdcshoes.com/womens-dc-shoes-c-26.html">DC shoe</a></strong> does have a wide arrange of skateboarding shoes collection. Each <strong><a href="http://www.orderdcshoes.com/kids-dc-shoes-c-27.html">DC skate shoes</a></strong> has its own feature to boast of and each feature is designed to make that particular pair stand out from the rest. You can get an awesome pair of Cheap DC shoes or <strong><a href=" http://www.orderdcshoes.com/dc-caps-c-28.html">DC cap</a></strong> at orderdcshoes.com. Our Cheap DC shoes and it's priced as low as $58! I don't know about you, but I hardly ever come across a pair of DC shoes this nice for a price like that. You would really hard to find deals like this at orderdcshoes.com.Trust us,we won't let you down!

  7. samsa3 weeks ago

    Erectile dysfunction (ED) is sexual dysfunction characterized by the inability to develop or maintain an erection of the penis during sexual performance. Psychological impotence is where erection or penetration fails due to thoughts or feelings (psychological reasons) rather than physical impossibility; this is somewhat less frequent but often can be helped. Erectile dysfunction, tied closely as it is about ideas of physical well being, can have severe psychological consequences. Drugs for treating ED: http://cavertabuy.com Caverta can help men who have erectile dysfunction get and sustain an erection when they are sexually excited. http://revatiobuy.com Revatio contains the same medicine as VIAGRA (sildenafil), which is used to treat erectile dysfunction. http://revatio.webstarts.com Revatio is used to treat pulmonary hypertension (high blood pressure in the blood vessels between the heart and lungs) when people have not responded to conventional treatment. http://onlinedapoxetine.com Dapoxetine Hydrochloride is a new drug that has gained most of the people’s interest and it is used as a treatment for premature ejaculation. http://tadacipbuy.com Tadacip (Tadalafil) is an oral drug, used for treating male impotence. http://silagrabuy.com Silagra pills are an effectual treatment for the patients suffering ED (erectile dysfunction) regardless of their age and the duration of the problem. Erectile dysfunction is characterized by the regular or repeated inability to obtain or maintain an erection. There are several ways that erectile dysfunction is analyzed: Obtaining full erections at some times, such as when asleep (when the mind and psychological issues, if any, are less present), tends to suggest the physical structures are functionally working. Other factors leading to erectile dysfunction are diabetes mellitus (causing neuropathy). http://cheapkamagrabuyonline.com http://cheapkamagrabuyonline.com/kamagrachewable.html http://cheapkamagrabuyonline.com/kamagragold.html http://cheapkamagrabuyonline.com/kamagrajelly.html http://cheapkamagrabuyonline.com/kamagrasoft.html Health care (or healthcare) is the diagnosis, treatment, and prevention of disease, illness, injury, and other physical and mental impairments in humans. Health care is delivered by practitioners in medicine, chiropractic, dentistry, nursing, pharmacy, allied health, and other care providers. It refers to the work done in providing primary care, secondary care and tertiary care, as well as in public health.

    http://medsale.org/abilify-buyonline.html Abilify (Aripiprazole) is used for treating schizophrenia and certain symptoms of bipolar disorder. http://medsale.org/amitriptyline-buyonline.html Amitriptyline is a tricyclic antidepressant that increases the activity of certain chemicals in the brain (norepinephrine, serotonin), which help improve mood. http://medsale.org/crestor-buyonline.html Crestor (Rosuvastatin) is an HMG-CoA reductase inhibitor, used with a proper diet to help lower cholesterol and fat. http://medsale.org/cymbalta-buyonline.html Cymbalta (Duloxetine) is used for treating depression and generalized anxiety disorder. http://medsale.org/finpecia-buyonline.html Finpecia (Finasteride) is used to treat male pattern hair loss. http://medsale.org/lipitor-buyonline.html Lipitor (Atorvastatin) is an oral drug that lowers the level of cholesterol in the blood. http://medsale.org/nexium-buyonline.html Nexium is used to treat symptoms of gastroesophageal reflux disease (GERD) and other conditions involving excessive stomach acid such as Zollinger-Ellison syndrome. http://medsale.org/plavix-buyonline.html Plavix (Clopidogrel) is used to prevent strokes and heart attacks. http://medsale.org/seroquel-buyonline.html Seroquel (Quetiapine) is used for treating schizophrenia. http://medsale.org/zyprexa-buyonline.html Zyprexa (Olanzapine) is used to treat schizophrenia and bipolar disorder (manic depression).

  8. fdf2 weeks ago

    http://www.coachoutletso.com coach factory outlet

    http://www.coachoutletso.com coach factory http://www.coachoutletso.com coach outlet http://www.coachoutletso.com coach handbags http://www.coachoutletso.com coach handbags outlet http://www.coachoutletso.com/Coach-Jewelry-c28.html coach Jewelry http://www.coachoutletso.com/2011-New-Arrival-c2.html 2011 New Arrival http://www.coachoutletso.com/HoBo-Coach-c6.html HoBo Coach http://www.coachoutletso.com/Luggage-Coach-c24.html Luggage Coach http://www.coachoutletso.com/small-bags-coach-c25.html small bags coach http://www.coachoutletso.com/Business-Bags-Coach-c26.html Business Bags Coach http://www.coachoutletso.com/2010-coach-c3.html 2010 coach http://www.coachoutletso.com/Leather-Coach-c7.html Leather Coach http://www.coachoutletso.com/Satchel--Coach-c10.html Satchel Coach http://www.coachoutletso.com/Shoulder-Coach-c11.html Shoulder Coach http://www.coachoutletso.com/Backpacks-Coach-c13.html Backpacks Coach http://www.coachoutletso.com/Totes-Coach-c15.html Totes Coach http://www.coachoutletso.com/Wallets-Coach-c16.html Wallets Coach http://www.coachoutletso.com/sunglass-coach-c18.html sunglass coach http://www.coachoutletso.com/boots-coach-c19.html boots coach http://www.coachoutletso.com/casual-shoes-coach-c20.html casual shoes coach http://www.coachoutletso.com/sandals-coach-c21.html sandals coach http://www.coachoutletso.com/scarves-coach-c22.html scarves coach http://www.coachoutletso.com/bikini-coach-c23.html bikini coach http://www.coachoutletso.com/Claire-Coach-c4.html Claire Coach http://www.coachoutletso.com/Classic-Coach-c5.html Classic Coach http://www.coachoutletso.com/fabric-coach-c12.html fabric coach

  9. ohyeah1 week ago

    Good blog, I like it very much, Thank you for sharing. http://www.discountsoakleysunglassesuk.com/

  10. MAC Cosmetics1 week ago

    <p>Or the lost <strong><a href="http://www.wholesalemac-cosmetics.net/">MAC Cosmetics Wholesale</a></strong>, but inside there is much fineness in MAC Lip Stick. Innovative elements, as for ultimate comfort; bright luster, creating a natural and bright colors, <strong><a href="http://www.wholesalemac-cosmetics.net/">MAC Cosmetics</a></strong> is the secret smile. During the spring and summer, began to finish various headache, every day to face with toner, maintain emulsion, sunscreen, foundation. A careless things into a" thick" face, could also rub mud, <strong><a href="http://www.wholesalemac-cosmetics.net/">Wholesale MAC Cosmetics</a></strong> let a person do not worry?</p>

Please sign in to post a comment.