Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Web API Type files for Swagger/OpenAPI based Web APIs

Web API Type files for Swagger/OpenAPI based Web APIs

  • Last UpdatedMar 12, 2021
  • 1 minute read

You can add a Web API resource file in the <Install Folder>\Resources\WebAPI\

For example: C:\Program Files\AVEVA\Work Tasks\Resources\WebAPI\

There can be many files or a single file with multiple Web API types. These Web API types will get loaded in Web API List source dropdown. The existing Web APIs and the APIs which are not Swagger/OpenAPI based Web APIs are considered as Generic types.

The sample schema to add the Web API types is as given below:

<?xml version="1.0" encoding="utf-8"?>

<WebAPITypes>

<WebAPIType Name="TestOpenAPINoAuth">

<SwaggerConfiguration><![CDATA[http://localhost:63452/swagger/DotNetCoreWebAPIForTestV1/swagger.json]]></SwaggerConfiguration>

<BaseAddress><![CDATA[http://localhost:63452/]]></BaseAddress>

<Authentication Mode="No Authentication"/>

</WebAPIType>

<WebAPIType Name="TestOpenAPI301Spec">

<SwaggerConfiguration><![CDATA[http://localhost:8040/swagger/DotNetCoreWebAPIForTestV1/swagger.json]]></SwaggerConfiguration>

<BaseAddress><![CDATA[http://localhost:8040/]]></BaseAddress>

<Authentication Mode="Windows" >

<ImpersonationUser><![CDATA[domain\username]]></ImpersonationUser>

</Authentication>

</WebAPIType>

<WebAPIType Name="TokenAccessAPI">

<SwaggerConfiguration><![CDATA[http://localhost:8032/swagger/V1/swagger.json]]></SwaggerConfiguration>

<BaseAddress><![CDATA[http://localhost:8032]]></BaseAddress>

<Authentication Mode="Access Token"/>

</WebAPIType>

<WebAPIType Name="TestOpenAPI20Spec">

<SwaggerConfiguration><![CDATA[http://localhost:8010/swagger/DotNetCoreWebAPIForTestV1/swagger.json]]></SwaggerConfiguration>

<BaseAddress><![CDATA[http://localhost:8010/]]></BaseAddress>

<Authentication Mode="Basic Authentication">

<UserName><![CDATA[domain\username]]></UserName>

</Authentication>

</WebAPIType>

<WebAPIType Name="Certificate Auth">

<SwaggerConfiguration><![CDATA[http://localhost:8010/swagger/DotNetCoreWebAPIForTestV1/swagger.json]]></SwaggerConfiguration>

<BaseAddress><![CDATA[http://localhost:8010]]></BaseAddress>

<Authentication Mode="Certificate" >

<Location><![CDATA[LocalMachine]]></Location>

<Thumbprint><![CDATA[]]></Thumbprint>

</Authentication>

</WebAPIType>

</WebAPITypes>

Related Links
TitleResults for “How to create a CRG?”Also Available in