Table of contents
What is API deployment
API deployment is a type of publishing, that allows starting deployment process with HTTP call
Manage Environments
Before deploying your Solution, you need to register your tenants in Manage Environments dialog. This dialog is available when you select API Deployment tab under Publish tab and click on Manage Environments button.
Once you click this button, a dialog will open where you can register and trust SharePoint tenants. This must be done by a tenant administrator
After you have approved your tenant, site has to be added to Approved sites list before publishing current solution via API deployment
Then you can register solution service.
Note: In case you previously used skybow Solutions Foundation add-in, you can uninstall it from site and delete from app catalog
Registering solution service
Clicking the Publish button on Publish tab opens the wizard that guides you through defining a service for publishing this Solution.
After accepting the terms and conditions, the following Service Details need to be specified:
- Service Title: The title as it will appear in Solution Studio.
- Description: A description of the service.
- Solution Package: Package of the solution that will be provided. The latest package version is selected by default.
- Authentication credentials: Credentials for validating requests -> this can be any username/password combination.
Click on the Next button to redirect to the Deployments tab where you can select: Standard Deployment or Selective deployment. The Standard Deployment option is selected by default and it deploys all solution elements in the package to the target site. To use the Selective Deployment option select the second option and click on the Next button.
The Selective deployment wizard appears which displays all solution elements included in the package as a hierarchical checkbox tree. Read more in the Selective Deployment article.
The Summary step includes information about the package version, deployment type with logs of what will be included in the deployment and available environments with the ability to manage them.
After the service has been registered in Solution Studio, the external system needs to be configured correctly to call the Solution Management API.
The Service Id can be copied and used in the request as "serviceId".
API endpoint for batch deployment
The following POST API can be used to start new deployments:
Post
https://solutionmanager.skybow.com/api/provision
Authorization
Credentials: Basic Authentication ("Basic serviceloginname:servicepassword")
"serviceloginname:servicepassword" as base64 encoded 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":"<internal name of List from URL>", (or "ListId":"d1620f67-de02-4b75-a848-a988ef85b689")
"fieldName":"Status",
"itemId": "Id"
}
}
Response example
[{"Provision":{"ServiceId":"60366197-9088-ea11-86e9-000d3a222298","WebUrl":"https://m365b601773.sharepoint.com/Lunches"},"Status":"Completed","ErrorMessage":null},{"Provision":{"ServiceId":"60366197-9088-ea11-86e9-000d3a222298","WebUrl":"https://m365b601775.sharepoint.com/Lunches"},"Status":"Completed","ErrorMessage":null}]
Batch deployments in Solution Studio API Deployments tab are grouped by Tenant URL.
A maximum of 3 deployments is allowed for parallel execution per tenant. We have implemented an internal waiting list for cases where 3 deployments are in progress and a new API deployment is initiated. In this scenario, subsequent API deployments will have a "Queued" status. Once the current deployments are finished, the new deployments will start automatically from the internal waiting list without your interaction.
Status field configuration during deployment process
Additionally, you can extend Body of your request with status field configuration parameter "statusFieldUpdate". The "statusFieldUpdate" parameter with listName (alternative ListId can be used), internal fieldname (single line of text or choice field type) and itemId will display the current status according to the deployment process status and can be able to be configured e.g. Triggered actions on this list.
Possible status:
In progress - set when first deployment in Batch starts
Completed - when last deployment finished
Failed - if any on deployment failed (also set when last deployment finished)
Completed with errors - when the deployment is completed, but some errors occur during publishing
Note: Cross-tenant status field update is not allowed.
Solution update process
When the deployed package needs to be updated, update it in the Solution Studio API Deployments tab. Firstly, you need to update service definition.
Click the Update button to open the wizard that guides you through updating a service. Additionally, you can configure different deployment configurations for Initial and Update deployments when updating skybow API service. This means every new deployment on this service will use configuration from Initial deployments, while every update will use the configuration from the Update deployments.
Similar to when creating a service definition, the Summary step includes information about the package version, deployment type with logs of what will be included in the deployment and available environments with the ability to manage them.
After updating service, you can update deployment itself.
An email with the update status is sent when update process is completed.
Batch update can be done in a following way: service definition from the Solution Studio API Deployments tab should be updated and afterwards the batch provisioning API should be called. In this case the deployment is overwritten to the newer package version.
Video: How to use the skybow provisioning API