Single Platform

The single Platform Resource represents a build configuration for a specific App. It has exactly one CodeSource and DataSource, and at least one Target. It may have an arbitrary number of Deployments. It has a specific PlatformType that defines the behavior when deploying.

The JSON Schema is https://entrecode.de/schema/platform.

Properties

Property Type Format Description Writable
platformID String Version 4 UUID (RFC 4122) The unique identifier for a Platform No. Gets generated on creation.
platformType String valid platformType Specifies the type of the platform. Yes.
title String Friendly name for the Platform Yes
config JSON Object valid against the JSON Schema of the selected platformType platformType-dependent configuration options. Yes.
_context JSON Object Object with appID, shortAppID, appTitle, buildCount, deploymentCount Context object used in all platform and plugin types. Contains info about the app No.

Relations

Relation Name Target Resource Description Possible Methods
self Platform The resource itself GET, DELETE
collection Platform List List of all available Platforms GET, POST
ec:app App The app this Platform is corresponding to. GET, PUT, DELETE
ec:app/codesource CodeSource The Code Source of the Platform GET, PUT
ec:app/datasource DataSource The Data Source of the Platform GET, PUT
ec:app/target Target A Target of the Platform (may occur several times) GET, PUT
ec:app/deployment/latest Deployment The latest deployment of this Platform GET
ec:app/deployments Deployment List List of deployments that were executed for this platform. POST to this link relation to create a new deployment for the platform. GET, POST
ec:app/deployments/options Deployment List List of deployments with filter options GET
ec:app/build/latest Build The latest build of this Platform GET
ec:app/builds Build List List of builds that were executed for this platform. POST to this link relation to create a new build for the platform. GET, POST
ec:app/builds/options Build List List of builds with filter options. GET

List

The Platform List Resource is a Generic List Resource with embedded Platform Resources.

Possible Actions

Editing (PUT) is currently not implemented.

Read

To read a single Platform Resource, clients may perform GET on a ec:app/platform relation.

To read the Platform List Resource, clients may perform GET on a ec:app/platforms relation or on the collection relation of a single Platform resource.

In both cases, the success status code is 200 OK.

Create

To create a new Platform Resource, clients may perform a POST on ec:app/platforms (the list resource). The JSON Schema for creating a new Platform is https://entrecode.de/schema/platform-template.

The success status code is 201 Created and the response body is the newly created single Platform resource.

Note that the used CodeSource, DataSource and Targets have to be created first.

Delete

To delete an existing Platform Resource, clients may perform a DELETE on ec:platform or self at a single Platform Resource.

This also deletes the related deployment resources, so handle with care! CodeSources, DataSources and Targets stay.

The success status code is 204 No Content with an empty response body.

Platform Types

All Platform types SHOULD contain a required property hexColor in the config_schema. hexColor SHOULD be the regex format ^#[A-Fa-f0-9]{6}$ (#d23738).

staticWebsite

Generates a static Website.

Expected configuration: a JSON object with the key hexColor with the desired color shown in the editor frontend (format: #d23738).

Expects valid CodeSource and DataSource.