Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

API Method “CreateElement” supports JSON or not

Solved1.28K views18th July 2023
4
Tomoya Horiguchi(3365) 堀口 朋也 13th May 2021 0 Comments

I have tried sending “CreateElement” by Json but the response is 500 Internal Error.

Does DataMiner support Json format of this method?

The response is as belows.

{
“Message”: “型 ‘System.String’ のオブジェクトを型 ‘System.Int32[]’ のオブジェクトに変換できません”,
“StackTrace”: ” 場所 System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n 場所 System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject)\r\n 場所 System.Web.Script.Services.WebServiceMethodData.StrongTypeParameters(IDictionary`2 rawParams)\r\n 場所 System.Web.Script.Services.WebServiceMethodData.CallMethodFromRawParams(Object target, IDictionary`2 parameters)\r\n 場所 System.Web.Script.Services.RestHandler.InvokeMethod(HttpContext context, WebServiceMethodData methodData, IDictionary`2 rawParams)\r\n 場所 System.Web.Script.Services.RestHandler.ExecuteWebServiceCall(HttpContext context, WebServiceMethodData methodData)”,
“ExceptionType”: “System.InvalidOperationException”
}

The following is the request I send to DataMiner.

{
“connection”:”10df979a-6bbd-412b-9182-66a38f0ec4eb”,
“dmaID”:”24202″,
“viewIDs”:”154″,
“configuration”:{
“Name”:”APItest”,
“Description”:””,
“ProtocolName”:”Microsoft Platform”,
“protocolVersion”:”5.0.0.2″,
“Type”:”Information Platform”,
“AlarmTemplate”:””,
“TrendTemplate”:””,
“ForceAgent”:””,
“IPAddress”:”192.168.0.1″,
“IPAddressMask”:”255.255.255.0″,
“CreateDVEs”:””,
“EnableSnmpAgent”:””,
“EnableTelnet”:””,
“IsHidden”:””,
“IsReadOnly”:””,
“IsReplication”:””,
“KeepOnline”:””,
“SnmpReadCommunityString”:””,
“SnmpWriteCommunityString”:””,
“TimeoutTime”:”1500″,
“SlowPoll”:””,
“State”:”Stopped”,
“Ports”: {
“DMAElementBasePortInfo”:{
“ElementTimeoutTime”:””,
“TimeoutTime”:””,
“Retries”:””
}
}
}
}

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
6
Miguel Obregon [SLC] [DevOps Catalyst]18.71K Posted 13th May 2021 1 Comment

Hi Tomoya,

I performed a small test using the driver (connector) Microsoft Platform and I was able to create the element using the following JSON message:

  • URL: http://localhost/API/v1/json.asmx/CreateElement
  • HTTP Method: POST

Headers:

  • Content-Type: application/json
  • host: localhost

Body:

{
    “connection”: “10df979a-6bbd-412b-9182-66a38f0ec4eb”,
    “dmaID”: 24202,
    “viewIDs”:
    [
        154
    ],
    “configuration”:
    {
        “name”: “TEST_MICROSOFT_ELEMENT”,
        “description”: “Description Text”,
        “protocolName”: “Microsoft Platform”,
        “protocolVersion”: “Production”,
        “type”: “Information Platform”,
        “ipAddress”: “127.0.0.1”,
        “ports”:
        [
            {
            “__type”: “Skyline.DataMiner.Web.Common.v1.DMAElementSerialPortInfo”,
            “ipAddress”: “127.0.0.1”,
            “type”: “tcp”,
            “retries”: 0,
            “timeoutTime”: 1500,
            “elementTimeoutTime”: 30000
            }
        ]
    }
}

I modified the following attributes according to your example:

  • connection: “10df979a-6bbd-412b-9182-66a38f0ec4eb”
  • dmaID: 24202
  • ViewID: 154

Please could you test creating an element and let us know if it works for you?

DMA version used for tests: 10.1.3.0-9963

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023
Tomoya Horiguchi(3365) 堀口 朋也 commented 13th May 2021

Thank you. It worked!

6
Pedro Almeida [SLC]296 Posted 13th May 2021 1 Comment

Hello Tomoya,

Please, also consider using the IDP solution to help you to create/manage elements on your system.

Tomoya Horiguchi(3365) 堀口 朋也 Posted new comment 13th May 2021
Tomoya Horiguchi(3365) 堀口 朋也 commented 13th May 2021

Thank you. I understand that.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs