how to get rest URL in Magento2How to integrate Payment gateway with Magento 2 REST API?Magento2: How to update the product price programaticallySign Up With Avatar REST API Validation Error : Magento 2Magento 2: Plugin class does not existMagento Core doesnt work after transferMagento2 REST API get all customers detailsError Database Magento 2.3 migration from localhost to serverMagento2: how to develop rest API to get new products“Unable to save stock item” error when using /v1/products REST callMagento2 Sharing product link for WhatsApp Web with bitly link
Was Switzerland really impossible to invade during WW2?
Why did MS-DOS applications built using Turbo Pascal fail to start with a division by zero error on faster systems?
Can pay be witheld for hours cleaning up after closing time?
Brexit and backstop: would changes require unanimous approval by all EU countries? Does Ireland hold a veto?
Does an object count as "being moved" when placed in a Bag of Holding before its wielder moves, and then after moving they take the object out again?
How would a situation where rescue is impossible be handled by the crew?
Why don't we use Cavea-B
Check in to 2 hotels at same location
Avoiding racist tropes in fantasy
Why does The Ancient One think differently about Doctor Strange in Endgame than the film Doctor Strange?
Justifying the use of directed energy weapons
Is there a known non-euclidean geometry where two concentric circles of different radii can intersect? (as in the novel "The Universe Between")
LeetCode: Pascal's Triangle C#
Why aren't RCS openings an issue for spacecraft heat shields?
Verb form to finish someone else's sentence?
Fancy String Replace
How to persuade recruiters to send me the Job Description?
What to say to a student who has failed?
Why is Boris Johnson visiting only Paris & Berlin if every member of the EU needs to agree on a withdrawal deal?
IndexOptimize - Configuration
How should I face my manager if I make a mistake because a senior coworker explained something incorrectly to me?
How big would a Daddy Longlegs Spider need to be to kill an average Human?
Is “I am getting married with my sister” ambiguous?
Why we don't have vaccination against all diseases which are caused by microbes?
how to get rest URL in Magento2
How to integrate Payment gateway with Magento 2 REST API?Magento2: How to update the product price programaticallySign Up With Avatar REST API Validation Error : Magento 2Magento 2: Plugin class does not existMagento Core doesnt work after transferMagento2 REST API get all customers detailsError Database Magento 2.3 migration from localhost to serverMagento2: how to develop rest API to get new products“Unable to save stock item” error when using /v1/products REST callMagento2 Sharing product link for WhatsApp Web with bitly link
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I need to get a link of this kindhttp://localhost/Magento2/rest
I have a code by which I get base_url:
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl
So i get http://localhost/Magento2/
,but i need http://localhost/Magento2/rest
.Help find a solution, please
magento2 url rest
add a comment |
I need to get a link of this kindhttp://localhost/Magento2/rest
I have a code by which I get base_url:
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl
So i get http://localhost/Magento2/
,but i need http://localhost/Magento2/rest
.Help find a solution, please
magento2 url rest
add a comment |
I need to get a link of this kindhttp://localhost/Magento2/rest
I have a code by which I get base_url:
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl
So i get http://localhost/Magento2/
,but i need http://localhost/Magento2/rest
.Help find a solution, please
magento2 url rest
I need to get a link of this kindhttp://localhost/Magento2/rest
I have a code by which I get base_url:
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$storeManager = $objectManager->get('MagentoStoreModelStoreManagerInterface');
$baseUrl = $storeManager->getStore()->getBaseUrl
So i get http://localhost/Magento2/
,but i need http://localhost/Magento2/rest
.Help find a solution, please
magento2 url rest
magento2 url rest
asked Aug 9 at 14:54
Anya MorozAnya Moroz
81 bronze badge
81 bronze badge
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
I don't think this is available programmatically, but you can manually append 'index.php/rest/V1/' to the base URL as this should not ever change.
add a comment |
Try with Below solution:
/**
* @urlBuilder MagentoFrameworkUrlInterface
*/
$urlBuilder->getUrl("rest/*/V1/");
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f285014%2fhow-to-get-rest-url-in-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't think this is available programmatically, but you can manually append 'index.php/rest/V1/' to the base URL as this should not ever change.
add a comment |
I don't think this is available programmatically, but you can manually append 'index.php/rest/V1/' to the base URL as this should not ever change.
add a comment |
I don't think this is available programmatically, but you can manually append 'index.php/rest/V1/' to the base URL as this should not ever change.
I don't think this is available programmatically, but you can manually append 'index.php/rest/V1/' to the base URL as this should not ever change.
answered Aug 9 at 14:57
JamieJamie
1134 bronze badges
1134 bronze badges
add a comment |
add a comment |
Try with Below solution:
/**
* @urlBuilder MagentoFrameworkUrlInterface
*/
$urlBuilder->getUrl("rest/*/V1/");
add a comment |
Try with Below solution:
/**
* @urlBuilder MagentoFrameworkUrlInterface
*/
$urlBuilder->getUrl("rest/*/V1/");
add a comment |
Try with Below solution:
/**
* @urlBuilder MagentoFrameworkUrlInterface
*/
$urlBuilder->getUrl("rest/*/V1/");
Try with Below solution:
/**
* @urlBuilder MagentoFrameworkUrlInterface
*/
$urlBuilder->getUrl("rest/*/V1/");
answered Aug 9 at 15:05
Amit Bera♦Amit Bera
63.1k16 gold badges85 silver badges183 bronze badges
63.1k16 gold badges85 silver badges183 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f285014%2fhow-to-get-rest-url-in-magento2%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown