4

What is the purpose of the Host: parameter in Apiary. For example:

FORMAT: 1A
HOST: http://polls.apiblueprint.org/
Almad
  • 5,753
  • 7
  • 35
  • 53
Behrang
  • 46,888
  • 25
  • 118
  • 160

1 Answers1

4

HOST header states what is the final intended deployment of your API.

It's used on Apiary as an upstream location for debugging proxy, and appears in code snippets as a location for requests.

You can also add suffixes that are then propagated to all resources if you are not running on root or want to version through URI.

Mock and proxy server also emulate the schema you've specified (http vs. https).

Resources:

Community
  • 1
  • 1
Almad
  • 5,753
  • 7
  • 35
  • 53
  • Thanks. I had to dig a bit deeper to find the information I was looking for. The link to the specification does not explain the purpose of the `Host` parameter, but that it is only a metadata. However thanks to the _Traffic Inspector_ section [here](https://apiary.io/how-it-works) as well as [this](http://blog.apiary.io/2012/05/21/to-our-wonderful-beta-testers/) blog post and the Settings section of the app, now it is all clear. – Behrang May 25 '15 at 11:08
  • No problem—Apiary is now doing a lot of groundwork to make documentation and its experience a lot better :) Updated the answer with links. – Almad May 25 '15 at 11:15
  • Spent half an hour mucking with your product. Extremely poor documentation and nothing simple. There are other services out there where you can do mocks in under 5 minutes without even reading any documentation or even worse resorting to Stackoverflow to get even the most basic mock up and running. Can't recommend this service at all. – Johann Sep 05 '15 at 16:21
  • @AndroidDev Purpose of Apiary goes well beyond creating mock services, which is why it's setup is a bit more complicated. We are working on improving the docs (see [new dev portal](https://docs.apiary.io)) and it will spill into FTUE as well. – Almad Sep 05 '15 at 18:30