green-http
v1.1.3
Published
An API interface exposing AWS Greengrass green applications over HTTP.
Downloads
9
Readme
green-http
An API interface exposing AWS Greengrass green applications over HTTP.
Current version: 1.1.3
Lead Maintainer: Halim Qarroum
Table of contents
Install
green add npm://green-http
Description
This application exposes an HTTP RESTful API as a green application on the port 8081
, that makes the bridge between your LAN or VLAN HTTP clients and the Greengrass Core ecosystem of green applications.
Since every green application is referenced and discoverable within each Greengrass Core by the green-discovery
application, green-http
is an attempt to allow external agents on the network to discover and interact with the API exposed by green applications over the HTTP protocol.
Multicast DNS
This application also embeds a compliant multicast DNS advertiser packaged within green-http
. It exposes Greengrass Core devices on which it is deployed on the multicast DNS network under the _greengrass._tcp.
service.
API
This application exposes an HTTP RESTful API which is accessible on the local LAN or VLAN by any thrid-party HTTP application. The available API endpoints are documented and described below.
Method | Resource | Query parameter(s) | Return code(s) | Payload required | Description
-------------- | --------------------- | ------------------ | ----------------- | ----------------- | ------------
GET | /
| None | 200
| No | By calling this route, green-http
returns its green-app.json
description. This route can be used to ping the service to assess its availability.
GET | /shadow
| None | 200
| No | This route returns the shadow document of the current Greengrass core.
PUT | /shadow
| None | 200
| Yes | This route allows a client ot update the current Greengrass core shadow document.
ANY | /service/:path
| namespace
| 200/400/500
| Optional | This route can be used to query over http an Expressify endpoint exposed by any green applications running on a Greengrass core. The path
is to be associated with the resource exposed by the remote Expressify endpoint. The namespace
mandatory query parameter is used to specify the topic on which the remote Expressify applciation is accessible.
See also
- The green-cli command-line deployment tool.
- The green-discovery application.
- The bonjour module.