Web API
Modifying this entity requires certain user authorization. For more information, see User Groups.
A Web API lets you define a custom Web API with a set of API endpoints. The Web API can then be hosted using a Workflow and the WF activity Execute Web API definition.
A new Web API will by default support the OpenAPI specification.
For an overview on how to create, execute and run Web API definitions, see Web API overview and its subtopics.
Properties
Name | Type | Description |
---|---|---|
CLR-name | String | Specifies the name that will be used to refer to the instance of the entity from Code. The CLR-name is automatically generated from the Name property. It is read-only and cannot be modified. For details and restrictions, see CLR-name property. |
Created | DateTime | Date and time when the Web API was created. Automatically generated by the system. |
Description | String | A brief description of the Web API, for example its field of application. |
Entity type | EntityType | Specifies the entity type. The property is Read-only and is only displayed in filter listings to identify the entity type. It can be used for example when filtering on entities with a filter containing an 'All' part. For more information, see Entity filters. |
ID | Guid | The entity ID of the Web API. Automatically generated by the system. |
Last build active | Boolean | Specifies whether service runtime is running the latest compiled version of the Web API. When a system is started, the property is set to True for all compiled Component definitions, Web service clients or Web APIs. However, if any such definition is recompiled the property will be set to False until a system restart occurs. |
Last compiled | DateTime | Specifies when the Web API was last compiled. If the Web API has not been compiled, this value is empty. |
Modified | DateTime | Date and time of the latest modification of the Web API. |
Name | String | The name of the Web API. |
Needs compiling | Boolean | Specifies whether the Web API needs to be compiled. One possible reason for this is that the Web API was imported and has not yet been compiled. |
Upgrade date | DateTime | Specifies the date when the Web API was upgraded with a system upgrade. |
Is Locked | Boolean | Specifies if the Web API is locked. |
Lock time | DateTime | The time the Web API was locked. |
Lock user id | String | The Id of the User that locked the Web API. |
Lock user name | String | The Name of the User that locked the Web API. |
Lock User AzureAD identifier | String | The identifier of the locking User, configured for the external provider where the User was authorized. |
Lock User AzureAD tenant | String | The Id of the tenant at the external provider where the locking User was authorized. |
Remarks
Compile-time XML schema generation from a Web API definition
When creating a Web API, you may want to serialize some of the authored types to XML (for example for passing them along for processing in a Script). The .NET framework includes support for XML serialization of classes using XmlSerializer or DataContractSerializer. Custom attributes can be applied to classes to control the serialization process, for example XmlTypeAttribute to control the XmlSerializer and DataContract to control the DataContractSerializer.
If a serialized object is to be processed in a Script, an XML Schema is required to define the XML structure to parse in the Script. The Web API entity supports generation of such schemas that will be automatically created and associated with the entity during compilation. To enable the generation of schemas for any type within the Web API definition, the type(s) must be decorated with GenerateXmlSchemasAttribute. When a type has this attribute defined, a schema conforming to the serialization of one of the serializers will be generated. Which serializer the schema will conform to is determined by which additional attributes the type is decorated with: The generated schema will conform to the DataContractSerializer – if and only if – the type is decorated with either DataContract or CollectionDataContract. Otherwise the schema will conform to the XmlSerializer.
More information can be found here:
- https://docs.microsoft.com/en-us/dotnet/standard/serialization/controlling-xml-serialization-using-attributes
- https://docs.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-create-a-basic-data-contract-for-a-class-or-structure
If a schema is to be generated for the XmlSerializer, the type must be public and must have a public parameterless constructor, otherwise an error will occur during compilation.
If the schema is to be imported in a Script, the schema generated must have a target namespace associated with it. This means that you must specify a namespace in the attribute used to decorate the type, either the XmlRootAttribute or the DataContractAttribute depending on which serializer is targeted.