# user(s) | 112 |
# project(s) | 50 |
# build(s) | 305 |
Avg build time | 19.8s |
Queue len | 0 (0.0) |
Status | idle |
The API described below provides an access to the Ling Build Service (LBS), the service for packaging Erlang application code with the Ling virtual machine. The output image runs directly on top of the Xen hypervisor.
A user must register with the LBS before using the API. The credentials are passed along with requests using the basic HTTP authentication. Consequently, the LBS is accessed exclusively over HTTPS.
A user can add multiple projects to the LBS. The project is submitted to the build service as a single .zip archive. All project files are embedded into the output image and are accessible during runtime under the /project_name directory. For example, a user builds a project named ‘red’. The project has a file named ‘herring.png’ in its priv directory. The file will then be accessible during runtime as /red/priv/herring.png.
Typically, most of the project files are BEAM modules. The .beam modules are automatically recognized and converted to corresponding .ling modules.
The LBS maintains a queue of build requests. A single build can be active at any given time. After a successful build, the created image becomes ready for downloading. All images contain enough standard Erlang modules to bring up an Erlang shell. These include complete stdlib and kernel applications.
The API follows REST guidelines and prefers JSON as the data format. The format of the response depends on the Accept HTTP header of the request.
Returns a descriptive string about the service including its version. No authorization required.
Returns the current service statistics. For JSON requests, the service returns a JSON object with the following fields:
Returns the current status of the service. For JSON requests, a number is returned:
Creates a new user. The body of the request is a JSON object describing the user. The following three fields must be present: user_name, email, password. The request does not require authorization.
Retrieves information about the user. The only bit of information returned by the call is the user’s email.
Updates the user information. The body is a JSON object that may contain the following fields: email, password.
Removes the user from the LBS. All project uploaded by the users are deleted along with the user information.
Creates a new project for the user or updates files of the existing project. The project name may not contain characters other than letters, digits, and underscores. The body of the request is the project archive. It must have a MIME type of ‘application/zip’.
Retrieves the project archive.
Removes the project including the cached images, if any.
Retrieves a list of projects created by the user. The list is a JSON list.
Request the image build for the project. The cached image is removed upon the request.
The body of the request may be empty or contain a JSON object with the following fields:
If the body of the request is empty, default values for build parameters are assumed.
Retrieve the newly built (or cached) image.
Retrieve ID of the generated Amazon Machine Image (AMI).
Retrieve the status of the last build. The reply is a single integer value formatted as JSON:
If the textual representation is requested a corresponding descriptive string is returned.