API deployment is a type of publishing that allows you to start the deployment process via an HTTP call.
After successful packaging of your solution, a new service can be registered.
After accepting the Terms and Conditions, you must provide the following service details:
After the service is registered in Teamsware Studio, the external system must be configured correctly to call the Teamsware Solution Management API.
The API ID for kick-off is displayed in the general settings of the service.
This ID can be used for requests to the Teamsware Solution Management API initiated by the external service.
function callTeamswarePublishAPI() {// Service definition ID from Teamsware Studio (API Deployments tab)var serviceId = "";// Target site where the solution is to be deployedvar webUrl = "https://.sharepoint.com/sites/";// Request body according to provisioning API (an entry in serviceData)var requestBody = {"serviceData": [{"serviceId": serviceId,"webUrl": webUrl}],"email": "customer@.com," // Optional, for status emails"callbackUrl": "http://your.site.url"// Optional, for callback after completion// "callbackHeaderName": "Key1,Key2," // Optional// "callbackHeaderValue": "Value1,Value2" // Optional};// Access data as stored in the service in Teamsware Studiovar serviceUser = "";var servicePassword = "";jQuery.support.cors = true;jQuery.ajax {method: "POST,"crossDomain: true,dataType: "json,"contentType: "application/json,"beforeSend: function (xhr) {xhr.setRequestHeader"Authorization,""Basic " + btoa(serviceUser + ":" + servicePassword));},data: JSON.stringify(requestBody)});}

Comments:
https://tenant.sharepoint.com/sites/%) can be released.
Post
https://solutionmanager.teamsware.app/api/provision
Authotization
Credentials ("Basic username:userpassword" in base64 string)
Headers
Content-type: application/json
Authorization: Basic aXJhOmlyYQ==
Body
{
"ServiceData": [{
"serviceId": "60366197-9088-ea11-86e9-000d3a222298,"
"webUrl": "https://m365b601773.sharepoint.com/Lunches"
},
{
"serviceId": "60366197-9088-ea11-86e9-000d3a222298,"
"webUrl": "https://m365b601775.sharepoint.com/Lunches"
}
],
"email": "Optional,"
CallbackUrl": "http://your.site.url,"
"callbackHeaderName": "Key1,Key2,"
"callbackHeaderValue": "Value1,Value2,"
StatusFieldUpdate": {
"webUrl":"https://m365x36372584.sharepoint.com/sites/LVOsourceCS,"
"listName":"," (or "ListId":"d1620f67-de02-4b75-a848-a988ef85b689")
"fieldName":"Status,"
"itemId": "Id"
}
}
Response example
[{"Commission":{"ServiceId":"60366197-9088-ea11-86e9-000d3a22222298,"WebUrl":"https://m365b601773.sharepoint.com/Lunches"},"Status":"Completed,"ErrorMessage:null},{"Provision":{"ServiceId":"60366197-9088-ea11-86e9-000d3a2298","WebUrl":"https://m365b601775.sharepoint.com/Lunches"},"Status":"Completed,"ErrorMessage:null}]
In addition, you can extend the body of your request with the status field configuration parameter "statusFieldUpdate."
The parameter "statusFieldUpdate" with listName (alternatively ListId), internal field name (single-line text or selection field type) and itemId shows the current status according to the status of the deployment process and can be configured for triggered actions on this list, for example.
Possible status:
Note: Updating cross-tenant status fields is not allowed.
When a service definition is created, the definition ID can be copied (as part of the service URL).
This service definition ID is used as "serviceId" in the request.
Batch deployments on the Teamsware Studio API Deployments tab are grouped by tenant URL.
If the deployed package needs to be updated, update it on the API Deployments tab: first the service definition, and then the deployment itself.
After the update process is complete, an email with the update status is sent.
The batch update can be carried out as follows:
The service definition on the Teamsware Studio API Deployments tab should be updated, and then the batch deployment API should be called.
In this case, the deployment is overwritten with the newer package version.