Deployments
Deployments let the user schedule a job to deploy the contents of their workspace repository to their workspace in the Matatika cloud.
This can be done manually or via a GitHub Webhook which you can see how to set up in our Quick Start Guide: Workspace Deploy Hook
Requests
Deploy your workspace repository
POST
/api/workspaces/{workspaces-id}/deployments
Deploys the workspace {workspace-id}
.
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/workspaces/3df291d4-3464-4774-9415-f593ea987baa/deployments' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'Content-Type: application/json'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/workspaces/3df291d4-3464-4774-9415-f593ea987baa/deployments"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers)
print(response.text.encode('utf8'))
Response
202 Accepted
Job with HAL links.
{
"id" : "ad3539bb-2c33-4e34-9cc6-a7064f4e6ea0",
"created" : "2025-06-19T10:18:17.779546",
"type" : "WORKSPACE_DEPLOY",
"maxAttempts" : 0,
"attempt" : 0,
"status" : "QUEUED",
"_embedded" : {
"profile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod",
"email" : "[email protected]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/jobs/ad3539bb-2c33-4e34-9cc6-a7064f4e6ea0"
},
"delete job" : {
"href" : "https://app.matatika.com/api/jobs/ad3539bb-2c33-4e34-9cc6-a7064f4e6ea0",
"type" : "DELETE"
},
"logs" : {
"href" : "https://app.matatika.com/api/jobs/ad3539bb-2c33-4e34-9cc6-a7064f4e6ea0/logs?sequence=0",
"type" : "GET"
},
"withdraw job" : {
"href" : "https://app.matatika.com/api/jobs/ad3539bb-2c33-4e34-9cc6-a7064f4e6ea0/stopped",
"type" : "PUT"
}
}
}
GitHub webhook workspace deployment
POST
/api/workspaces/{workspaces-id}/deployments/github-webhook
Receives POST
requests from GitHub and starts a workspace deploy job.
Request
Example Snippets
cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.matatika.com:443/api/workspaces/3df291d4-3464-4774-9415-f593ea987baa/deployments/github-webhook' -i -X POST \
-H 'Accept: application/json, application/javascript, text/javascript, text/json' \
-H 'X-Hub-Signature: sha1=af31a4f6bb7f42eaabeb9d9ad81481dce5edab7b' \
-H 'Content-Type: application/json' \
-d '{ }'
Python (requests
)
import requests
url = "https://app.matatika.com:443/api/workspaces/3df291d4-3464-4774-9415-f593ea987baa/deployments/github-webhook"
data = { }
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
202 Accepted
Job with HAL links.
{
"id" : "372501c5-c42a-42af-802c-ed5e926bb875",
"created" : "2025-06-19T10:18:25.840566",
"type" : "WORKSPACE_DEPLOY",
"maxAttempts" : 0,
"attempt" : 0,
"status" : "QUEUED",
"_embedded" : {
"profile" : {
"id" : "auth0|5eb0327cbfd7490bff55feeb",
"name" : "[email protected]",
"handle" : "@sit+prod",
"email" : "[email protected]"
}
},
"_links" : {
"self" : {
"href" : "https://app.matatika.com/api/jobs/372501c5-c42a-42af-802c-ed5e926bb875"
},
"delete job" : {
"href" : "https://app.matatika.com/api/jobs/372501c5-c42a-42af-802c-ed5e926bb875",
"type" : "DELETE"
},
"logs" : {
"href" : "https://app.matatika.com/api/jobs/372501c5-c42a-42af-802c-ed5e926bb875/logs?sequence=0",
"type" : "GET"
},
"withdraw job" : {
"href" : "https://app.matatika.com/api/jobs/372501c5-c42a-42af-802c-ed5e926bb875/stopped",
"type" : "PUT"
}
}
}