Deploying a new Web API
When you want to deploy a new API in your iCore Cloud Services solution, perform the following steps:
- Request a new Web API
- Create your Web API in iCore
You can create your new Web API in iCore before the onboarding request has been completed, however you will not be able to start and access the API.
Currently all Web APIs are publicly available via the Internet. Internal, non-public, Web APIs are not yet available.
Request a new Web API
To request a new Web API, send an email to support@icore.se with the following information:
- The Web API name
- Your organisation name and customer code.
Once the onboarding has been completed, you will receive an email with the following information:
- The URL of the Web API
- The iCore settings connection string
- The iCore settings recommended log directory
- The local Web API port
Create your Web API in iCore
This section describes how to set up a Web API in iCore Integration Suite. To be able to follow these instructions, you need a basic understanding of iCore Web APIs.
Settings
To set up a new Web API in an iCore system, you need to add the settings for the API. Create a Setting using the template Setting, iCoreWebAPI_V3_Sample, in your iCore system.
Environment Name
The environment name will state which environment the current iCore system is running in (DEV, TEST or PROD).
Example: 'Dev'
Log Directory
The log directory where the API log is saved. This directory will be supplied by iCore once the new Web API request has been processed.
Example: '\\aze03icoresystemcomsa.file.core.windows.net\e03icorecomfs\iCPS\Systems\10003010\Temp'
Log Enabled
This flag specifies whether the log should be enabled or not (True/False). The default value is 'True' and it will only be set to 'False' in special cases.
Example: 'True'
Log Filename Prefix
The log filename prefix sets the filename prefix. We recommend using the API name here. The name needs to be unique from other Web APIs in your own system/environment.
Example: 'WebAPIName-dev'
Port
The local port the Web API will listen on.
When creating the new Web API, open the provided sample, AzureiCoreWebAPI_Sample_version2, in your iCore system and save as your new API Name. Then replace the namespace with your new Web API name.
If converting a legacy API, make sure that target host version, in the API properties section, is set to version 2.
Workflow
To be able to execute a Web API, you need to set up a Workflow. The name of the Settings configuration is passed to the Workflow as a RunParam in the Event configuration. To create the API host Workflow, open workflow sample, AzureiCoreWebAPIHost_Sample_version2, and save this with your new API name. Update the workflow with the name of your setting and Web API created earlier.
To maximize uptime and performance, make sure that you run the Web API on all of the available servers. For this to work, your Web API need to be stateless.
Consider using OAuth 2.0 security.