AD0-E716 · Question #46
An Adobe Commerce developer added a new API method to search and retrieve a list of Posts for a custom Blog functionality. This is the content of the module's etc/webapi.xml file: The new code has…
The correct answer is B. Since the new endpoint is not anonymous, the merchant needs to enter a valid integration token. The reason why the new endpoint is not visible in swagger is that since the new endpoint is not anonymous, the merchant needs to enter a valid integration token in swagger in order to see the new method. The webapi.xml file specifies that the resource for the new endpoint is…
Question
An Adobe Commerce developer added a new API method to search and retrieve a list of Posts for a custom Blog functionality. This is the content of the module's etc/webapi.xml file:
The new code has been deployed to production and the merchant is using https: //merchant. domain. com/swagger to review the new endpoint, but it is not visible in swagger. What would be a reason for this?
Exhibit
Options
- BSince the new endpoint is not anonymous, the merchant needs to enter a valid integration token
- CThe greturn annotation is missing in the MyVendor\Blog\Api\PostRepositoryInterf ace class.
How the community answered
(30 responses)- B83% (25)
- C17% (5)
Explanation
The reason why the new endpoint is not visible in swagger is that since the new endpoint is not anonymous, the merchant needs to enter a valid integration token in swagger in order to see the new method. The webapi.xml file specifies that the resource for the new endpoint is MyVendor_Blog::post, which means that only authorized users with this permission can access it. To generate an integration token, the merchant needs to create an integration in the admin panel and activate it. Then they can copy the token and paste it in swagger's authorization field. Verified
Topics
Community Discussion
No community discussion yet for this question.
