A cell defines a standard contract for the external parties to communicate with it. Hence, it is accessible only via the cell gateway. Each http API exposed via the cell gateway can optionally specify a version.
Cli List Ingress command can be used to find the API versions of HTTP ingresses, either for a cell image or a running cell instance.
Cell APIs can be selectively published to the Cellery global gateway to be accessed by external clients. This is done by
marking the relevant HTTP ingress as expose: global
and by using a global API publisher configuration.
If a set of cell APIs are to be exposed globally each with a unique context, each ingress should be marked as to be exposed as global. The version can be specified as well. Ex.:
cellery:HttpApiIngress helloAPI = {
// ...
apiVersion: "1.0.2",
expose: "global"
};
If cell APIs are to be exposed with a common root context, the global publisher configuration can be used to specify it.
Each context specified in the HTTP ingress will be used as a sub context of the root context specified in the publisher. Since the version is specified here, it will apply to all APIs.
Ex.:
cellery:CellImage hrCell = {
globalPublisher: {
apiVersion: "1.0.1",
context: "myorg"
},
// ...
};
Refer Exposing Ingresses for further details and syntax.