Skip to main content
POST/api/management/projects/{projectId}/blocks?autoRelease={true|false}

Parameters

NameParameter typeTypeDescription
projectId(required)pathstringThe project identifier found in the project overview screen of the management console.
releasequerybooleanAutomatically release the block as soon as it has been discovered. Defaults to false.

Responses

HTTP status codeReasonModel
202AcceptedBlock version
401UnauthorizedError
404Project not foundError
422Validation errorError
500Internal server errorError

Examples

Pushing a new version of the movie-listing block

JSON
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.

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request