Facets in Magento 2 Rest API for search. Are they available ? how do i make them available?

How do i make facets available in Magento 2 ?
Currently i do not think it’s supported in the Search Rest APIs

hooks – What is the exact process of resetting a password by using node js / drupal (backend) API?

I am using Node js as front end and drupal as backend, i am trying to develop a reset password api. As per my finding there are three steps for the same.

  1. Request a Password (Send an email with secure time-bound link using
    request_new_password services resources)

  2. Reset Password (Process one time login link and return
    pass_reset_token using user_pass_reset service resources)

  3. Update Password by using pass_reset_token

I can do first and second steps easily, but how to update password by using pass_reset_token.

I saw Using Services, request new password but not very useful for me at least. how to do this ?

ruby – Rails: how to halt request cycle in API only application?

Consider this example in the official doc:


class ApplicationController < ActionController::Base
  before_action :require_login
 
  private
 
  def require_login
    unless logged_in?
      flash[:error] = "You must be logged in to access this section"
      redirect_to new_login_url # halts request cycle
    end
  end
end

redirect_to makes no sense in api-only application. How can I achieve same thing in API only applications with filters?

PlayTube.ws | 35$/10k | DMCA Ignored | API | Subtitles | Premium Player | Rapid Fast HLS | Fast Support | Anty DDoS Proxy | 360p | 720p | 1080p | | Proxies123.com

Hello Proxies123.com!

I’m Mucha, affiliate manager at PlayTube.ws. Finally playtube is arriving at wjunction with it’s services! Fully unlimited website with fast servers.

Current Website Features:

– Unlimited Storage
– Remote Upload From:

  • gounlimited
  • clipwatching
  • vidoza
  • oogly
  • upstream
  • google drive
  • youtube

our Remote Upload supports above hosts + direct download links(hotlinks)
– API
– SRT (Subtitles)
– Ultra Fast HLS Streaming – 10Mb/s Per User Guaranteed
– Premium Player
– Normal Upload (30GB per file)
– No DMCA removals*
– No stream speed restrictions
– HD Encoding (We support HD videos)
– 24/7 Support (Available via Discord, Skype) – PM me for one of those or both :)

* – We completly ignore dmca reports if they’re not sent from Ukraine.

Affiliate Info:

  • – Minimal Payout 5$
  • – Payments every Monday and Friday.
  • – 3 views per user per 24h are counted for payouts.
  • – Real rates**
  • – PayPal, Bitcoin payment methods
  • – 10 minutes long video is eligbe for affiliate program
  • – 20% of video must be watched for count
  • – Embeds are counted by 95% rate.

** – We do not boost our rates to amounts that we can’t actually pay, our rates are stable and you’re guaranteed that money will be on time.

Here you can find our rates!

Premium Player:

  • PlayTube Ads Free*
  • Unlimited Bandwitdh
  • Unlimited Storage
  • Unlimited Downloads
  • Full Speed
  • Integration Included**
  • Anti Adblock***

* – We do not serve our ads over premium player, you can have own ads in player and serve them to your free users while serving videos without ads to your premium users or simply serve no ads for everyone.

** – We will fully integrate premium player with your website, currently we help with PHP/HTML based websites only, however we deliver guide how to setup player with other coding languages.

*** -With our Anti Adblock solution you can monetize your website with own ads even better. This feature is being implemented on your demand without any additional fees.

PlayTube Anty DDoS Proxy:

  • Unmetered Layer7 Mitigation
  • Unmetered Layer3/4/5 Mitigation
  • PlayTube CDN Caching
  • Fully Customizable Popunder Info Display
  • No branding
  • Query String Sorting
  • First Month for Free
  • Dedicated 24/7 Support
  • Website Monitoring System
  • IP Whitelist / Blacklist

Regular monthly price 10$/mo

Coming Soon Features:

– Torrent Upload
– FTP Upload
– Multi Quality Encoding

If you have any questions, please feel free to ask. We’re looking to offer the people a very long term platform, your opinion matters to us because we can keep improving our services.

web api – API Design: Errors passed between APIs

I work as a developer on a few different APIs that make calls to each other.
Let’s take two and call them API-USER and API-BUSINESS.

A user application makes calls to API-USER, which in turn makes calls to API-BUSINESS

Right now, when API-BUSINESS returns an error the API-USER receives it as a generic error and passes it through to the user.

The concern is that this approach could lead to issues when breaking changes are introduced to the errors in API-BUSINESS.

Are there some API patterns or practices that can lead to a more durable approach to passing errors between APIs?

Is there a better vocabulary to use when talking about this type of error passing?

domain driven design – Serialization in REST API: Generating Representations Based on a Model

I am developing a RESTful API using .NET technology to implement the service.

The part that I am having problems with is the dynamic nature of the representation types that the service will return.

For example, let’s say I have a Person model, and the Person has a bunch of Beyblades toys they can battle other people with.

My model would look something like:

public class Person{
  public guid ID {get; set;}
  public string Name {get; set;}
  public List<Beyblades> Beyblades{get; set;}
  //...
}

The API will return a list of People by going to “urlpeople”. The representation for the people returned will contain the person’s ID, name, and a link to “urlbeybladesperson-ID” that can be followed instead of the serialized list of their Beyblades (if they have any).

Seems pretty straightforward, but the implementation of a dynamically generating links for lists-of-things (and not the list’s themselves) is what I’m trying to find the best solution for.

My initial thought was to create templates for the representations returned. The template would check the model in order to output the correct representation data. For example, the template would check if the person has any Beyblades, and if so it would generate the link (instead of the serialized list of Beyblade models); likewise, it would generate a self link for each person as well.

The problem with this solution is that if my API is to support JSON (Hal), XML, and say HTML as possible representation output types, I would have to manage at least 3 templates whenever something in the model were changed.

My next thought is to design a serialization framework by implementing a series of MediaTypeFormatter types that would naturally consider my business logic to convert lists into appropriate links; however, this too could become problematic while maintaining the API since there would have to be some sort of standard mapping between lists of things and API URLs and this may not be apparent when changes are made.

Since REST is not a new thing, I was wondering if .NET already has tools for serializing models into a RESTful representations?

Or if there was a best practices document/tutorial on this topic?

Or maybe I’m conceptually going about this wrong and someone here could point me in the right direction?

I realize that REST and OO doesn’t seem go hand-in-hand, so maybe there isn’t anything like what I am seeking. It just feels like I’m inventing a wheel that someone has probably already done.

java – Como fazer o hibernate gerar uma foreign key e ela ser exibida na minha API?

Fiz um crud no java com hibernate, e o banco postgreSQL. Meu crud tem 4 informações : Id (autoincrement), First name, Last name e Email. Queria que aparecesse na tela também uma quinta informação > código (foreign key).

Já criei uma classe “Codigo” e tentei fazer, mas não sei se estou no caminho certo.


@Id
@GeneratedValue(strategy=GenerationType.AUTO)
private int id;

@OneToOne
@JoinColumn(name="codigo_id")
private Codigo codigo; ```

E como fazer pra ela aparecer na api junto com as outras informações ?

7 – Redirect to suggestion with search api autocomplete

I’m using search api and search api autocomplete.

I want that when a user clicks on a suggestion (search api autocomplete), he will be redirected to that suggestion, not the search results.

For example, the user searches for “Node 1”. He types the word in the form, sees “Node 1” in the suggestions, and clicks on it. Instead of being redirected to the result page which presents the result “Node 1”, I would like it to be redirected directly to this “Node 1”.

Do you know how to do it ?

php – Monthly search value in adwords api is much larger then in a Keyword Planner

I am trying to use an adword api to get some keyword statistics. But what I see is that with a same parameters my monthly search volue is about 7 mln searches. While adword keyword planner shows around 400-500. I can provide php code with parameters I am setting.
Network settings:

$networkSetting = new NetworkSetting();
        $networkSetting->setTargetGoogleSearch(true);
        $networkSetting->setTargetSearchNetwork(false);
        $networkSetting->setTargetContentNetwork(false);
        $networkSetting->setTargetPartnerSearchNetwork(false);

Language is set to Russian following way:

 $languageParameter = new LanguageSearchParameter();
        $english = new Language();
        $english->setId(1031);
        $languageParameter->setLanguages(($english));
        $searchParameters() = $languageParameter;

Location is set to Ukraine:

$loc = array();
        $location = new location();
        $location->setId(2804); // Ukraine
        $loc()=$location;
        $locationTargetParameter = new LocationSearchParameter();
        $locationTargetParameter->setLocations($loc);
        $searchParameters() = $locationTargetParameter;

What Am I missing?

magento2 – Change “Manage_Stock” via REST API on Magento 2

Using Magento 2, I’m trying to change Manage Stock attribute via rest API however does not seem to work via both the stockItems endpoint or the product one. Updating quantity seems to work fine.

Tried like below initially:

    $url = "https://www.magestore.com/rest/all/V1/products/" . $sku;
    $post_data = array(
        'product' =>
        array(
            'sku' => $sku,
            'extension_attributes' => 
                array(
                    "stock_item" => array( 
                        "qty" => $qty,
                        "is_in_stock" => $is_in_stock,
                        "manage_stock" => true
                    )
                )
            )
        );

Then tried like this for the stockItems endpoint:

    $url = "https://www.magestores.com/rest/V1/products/" . $sku . "/stockItems/1";
    $post_data = array(
        "stock_item" => array( 
                "qty" => $qty,
                "is_in_stock" => $is_in_stock,
                "manage_stock" => true
            )
        );

However neither seem to change manage stock to true for me, is this possible to achieve with Rest API?