Push a blockBeta
Pushing a block resource will either create the first block and block version resources or will create a new block version with an incremented version number that has a matching id. A pushed block includes the source control details for the last commit, including the branch name, commit id, committer/author information and the datetime, to help identify the change set for the block version. The location and tag for the docker image are also required for discovery and hosting.
Pushing a new block version automatically sets the Deployment status as Deployed and updates the previous version's Deployment status to Deprecated.
POST/api/management/projects/{projectId}/blocks?autoRelease={true|false}
Parameters
Name | Parameter type | Type | Description | Example | Required |
---|---|---|---|---|---|
projectId | path | string | The project identifier found in the project overview screen of the management console | movieDb | true |
autoRelease | query | boolean | Automatically release the block as soon as it has been discovered. Defaults to false. | false |
Example
Pushing a new version of the movie-listing block
Accept: application/json
POST: /api/management/projects/movieDb/blocks/
{
"id": "movie-listing",
"projectId": "movieDb",
"image": {
"uri": "moviedb/movie-listing",
"tag": "81e13d08"
},
"source": {
"branch": "master",
"provider": "github",
"repositoryUrl": "https://github.com/moviedb/movie-listing.git",
"commit": {
"id": "81e13d08",
"message": "Implemented movie listing",
"authorEmail": "m.scorsese@film.com",
"committerEmail": "m.scorsese@film.com",
"datetime": "2021-08-09T14:05:10Z"
}
}
}
Remarks
The resource used to push a block is a subset of the final block version as the remaining properties (i.e. endpoints, static paths, etc...) are automatically 'discovered' by the publishing platform by inspecting the referenced docker image and extracting the details defined in the manifest file.
Responses
HTTP status code | Reason | Model |
---|---|---|
202 | Accepted | Block version |
401 | Unauthorized | Error |
404 | Project not found | Error |
422 | Validation error | Error |
500 | Internal server error | Error |