Teamsware Studio API deployment

Teamsware Studio API deployment

What is API Deployment

API deployment is a type of publishing that allows you to start the deployment process via an HTTP call.

Registration of the Solution Service

After successful packaging of your solution, a new service can be registered.


When you click the Publish button on the Publish tab, the wizard opens,who guides you through the definition of the service for publication.


After accepting the Terms and Conditions, you must provide the following service details:

  1. Title of the service: The title as it will appear in Teamsware Studio
  2. Description: A description of the service
  3. Solution package: The package of the solution to be deployed. By default, the latest package version is selected.
  4. Authentication credentials: credentials for validating requests -> this can be any combination of username and password

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.


Direct access to the provisioning API from code

The API can be called directly by specifying the API ID in Teamsware Solution Studio on the configured Solution service (e.g. B. via JavaScript)
function callTeamswarePublishAPI() {
// Service definition ID from Teamsware Studio (API Deployments tab)
var serviceId = "";

// Target site where the solution is to be deployed
var 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 Studio
var 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)
});
}



Notes

Comments:

  1. Make sure that you specify a valid email address in the Email parameter. Notifications of successes and errors are sent there.
  2. The serviceUrl variable for the Ajax call should be the URL provided by Solution Studio for the service (e.g. B.
    https://solutionmanager.teamsware.app/api/8f499960-00da-ed11-8aae-14cb652751b2/provision).
  3. Put the variables onserviceUserandservicePasswordto the corresponding values stored during the creation of the service.
  4. In data, a JSON should be set with the parameters according to the deployment:
    1. The SiteUrl is the URL of the SharePoint site where the solution is to be deployed
    2. SiteLoginName and SiteLoginPassword refer to the SharePoint user with administrator rights for the site.
    3. Email is set to the customer's email address so that they receive notifications about the status of the deployment.
    4. Callback can be any URL to a website to which a POST request is made when the solution is deployed. If deployed successfully, the text of the post is "{status: "Completed," errorDetails: zero}. If the deployment fails, the body is {status: "Failed," errorDetails: ""}. Specifying the callback parameter is optional.

API endpoint for batch deployment


The provision is now madevia the Teamsware API Deployment ConnectorIt is controlled per solution.
In order for solutions to be deployed via API, the customer must first approve the desired target sites in Teamsware Studio.

This is done in dialogueTeamware API Deployment Connectorin which for each solution (solution) either specific sites or wildcard URLs (e.g. B.https://tenant.sharepoint.com/sites/%) can be released.
Info
API deployments can only be performed after this release.



The following POST API can be used to start new deployments:
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}]

Status field configuration during deployment process

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:

  1. In progress - is set when the first deployment in the batch starts
  2. Completed - when the last deployment is completed
  3. Failure - if a deployment failed (will also be set when the last deployment is complete)
  4. Waiting -when the limit of simultaneous deployments is reached

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.


Process of solution update

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.

    • Related Articles

    • Teamsware Studio Update 15.01.2026

      Bug fixes & improvements Modern Forms Version 1.3.107 Fixed opening customized Edit/Display forms for Document Set content type Publish Fixed visibility of Scheduled & Triggered Actions nodes in the Selective deployment dialog for API Service and App ...
    • Teamsware Studio Update 03.07.2025

      Bug fixes & improvements Modern Forms Version 1.3.90 Added 'Show Bcc field on form' option in the Send email action when 'Show before send' option is enabled Fixed opening '<site-url>/_layouts/15/people.aspx?MembershipGroupId=<group-id>' page using ...
    • Teamsware Studio Update 19.12.2024

      Important information Users using classic add-ins in Teamsware Studio (Rich Forms, Action Links, List View Search) need to update current solution to the latest version and update deployments with this version till 15th of January 2025 due to ...
    • Teamsware Studio Update 15.08.2024

      New features Start Power Automate Flow action Added Start Power Automate Flow action for Modern Forms, List Actions, Automation Actions, Scheduled & Triggered Actions Add site to favorite action Added Add site to favorite action for Modern Forms, ...
    • ⚖️ Comparison: SharePoint Standard vs. Teamsware Studio

      Legend: ✅ available / included ❌ not available ? partial ? Important note: Power Apps & Power Automate can complement individual SharePoint topics – however, in project environments they are very often not cleanly reusable (e.g. “build template → ...