Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Create

Description

Creates a new

...

Description

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

Code Block
languagejson
{
  "ServiceId": 0,
  "VersionNumber": "string",
  "MetadataStructureColumns": [
    {
      "ColumnName": "string",
      "DataType": "string",
      "KeyName": "string",
      "KeyNameEng": "string",
      "KeyNameFra": "string",
      "IsSearchable": true
    }
  ]
}

Returns

On success, 200 OkOK

On error, 400 Bad Request

On authorization error, 403 Forbidden

Example

Code Block
languagec#
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);