Create
Description
Creates a new metadata structure for a service.
Package Details
Interface
IMetadataStructureManager
Syntax
Task<MetadataStructure> Create(MetadataStructureDTO metadataStructure);
Returns
Task<MetadataStructure>
API Endpoint
POST
/api/v1/metadata-definitions
Parameters
Parameter | Description | Parameter Type |
---|---|---|
metadataStructure | Object used to create a new metadata structure for a service. | Request body |
Sample request body
{ "ServiceId": 0, "VersionNumber": "string", "MetadataStructureColumns": [ { "ColumnName": "string", "DataType": "string", "KeyName": "string", "KeyNameEng": "string", "KeyNameFra": "string", "IsSearchable": true } ] }
Returns
On success, 200 OK
On error, 400 Bad Request
On authorization error, 403 Forbidden
Example
var metadataStructure = new MetadataStructureDTO { MetadataStructureColumns = new List<MetadataStructureColDTO> { new MetadataStructureColDTO { ColumnName = "column_name", DataType = "string", IsSearchable = true, KeyName = "my name", KeyNameEng = "key name en", KeyNameFra = "key name fra" } }, ServiceId = 11, VersionNumber = "1.0" }; var structure = await MetadataStructureManager.Create(metadataStructure);