1 Reply Latest reply on Feb 11, 2020 1:43 AM by Sven Christian Krüger

    REST API calls using curl command

    Vishesh R Simha Seasoned Veteran

      Hi All,

       

      I am trying below REST API call using both postman and CURL command on linux box.

       

      Using Postman :

       

      http://<HOST>:1512/rest/V1.0/list/StructureGroup/byStructure?structure=ALL ITEMS&fields=StructureGroup.Identifier,StructureGroupLang.Name(9),StructureGroup.ParentIdentifier&metaData=true

       

      Using Curl :

       

      curl -u <user>:<pwd> -X GET -H "Content-Type: application/json" "http://<hostname>:1512/rest/V1.0/list/StructureGroup/byStructure?structure=ALL ITEMS&fields=StructureGroup.Identifier,StructureGroupLang.Name(9),StructureGroup.ParentIdentifier&metaData=true

       

      I get results using postman. However I dint get results when I try CURL command on linux box. There are no errors. But no results as well

       

      Its not that all REST API calls fail using CURL.

       

      Below is one example where REST API call is successful using CURL

       

      curl -u  <user>:<pwd> -X GET -H "Content-Type: application/json" "http://<hostname>:1512/rest/V1.0/list/UserGroup/byIdentifiers?identifiers=Test101MDM_ReadOnly&fields=UserGroup.Name,UserGroup.Permissions,UserGroup.Permissions2&metaData=true"

       

      Please let me know what I am missing here.

       

      Thank you