CA Service Management

 View Only
  • 1.  CA SDM Rest API is not working

    Posted Nov 14, 2019 11:00 AM
      |   view attached
    Hey you all, 
    How are you? Can someone help me?
    I'm developer and the team are facing problem with the CA SDM Rest API interface. We have the CA SDM here to open incident tickets right?
    SOAP and REST are seem enabled.. 

    POST -> http://{host}/caisd-rest/rest_access  WORKS and receive (201 created) a token 
    POST -> http://{host}/caisd-rest/in to post a new incident it does not work (404 not found) - It seems that this resource does not exist or isnt available.

    So we cannot POST a new request and GET informations about some request on server. 

    Has anyone faced this? Is there problems with Tomcat or something that should be enabled? 
    Thank you! 


  • 2.  RE: CA SDM Rest API is not working

    Broadcom Employee
    Posted Nov 14, 2019 04:48 PM
    please take a look at the sample java script under sdm-install\\samples\sdk\rest\java\test1_basic and see how this can be done. the file name is  SampleCRUDOperations.java.


  • 3.  RE: CA SDM Rest API is not working

    Posted Nov 15, 2019 02:12 AM
    The payload is missing a couple of mandatory fields but that shouldn't give you a 404 response but 500. I tried with Postman as with a setup as close to yours as possible with the info I get from the screen cap, with a setup I know to work, and I get the response 500 with this request:
    POST /caisd-rest/in HTTP/1.1
    Host: epsdpp-rest
    X-AccessKey: 113307041
    Content-Type: application/xml
    cache-control: no-cache
    <in>
    	<customer COMMON_NAME="ServiceDesk" />
    	<description>Test ticket</description>
    	<external_system_ticket>1</external_system_ticket>
    </in>
    ------WebKitFormBoundary7MA4YWxkTrZu0gW--​

    This means, your request seems to be OK and the issue is within the setup like you already implied.
    What you can try is to re-deploy the REST API, beyond that I think you need to contact support, what @Chi Chen said doesn't help you.



  • 4.  RE: CA SDM Rest API is not working
    Best Answer

    Broadcom Employee
    Posted Nov 15, 2019 09:11 AM
    Do you have the 'rest_webservice_resources_to_expose' option installed?  If so, what is its value?

    You can try a undeploy and redeploy of REST:

    pdm_rest_util -undeploy
    pdm_rest_util -deploy

    ------------------------------
    Paul Coccimiglio
    Principal Support Engineer
    Broadcom Inc.
    ------------------------------



  • 5.  RE: CA SDM Rest API is not working

    Posted Nov 20, 2019 09:02 AM
    Hey @Paul Coccimiglio thank you for your answer.
    We have tried this and still not working yet. Do you recommend some other ​proceed? 
    I'm adding some images of the configuration


  • 6.  RE: CA SDM Rest API is not working

    Posted Nov 20, 2019 09:12 AM
    Uh, doesn't your screenshot show exactly the reason? You're only exposing the /rest_access resource. Try uninstalling the option or adding in to the list and see if it starts working.


  • 7.  RE: CA SDM Rest API is not working

    Posted Nov 22, 2019 04:19 PM
    Your original screen capture only shows payload but not headers. If the rest_access call works then it is definitely not Tomcat.

    ------------------------------
    Lindsay Estabrooks
    Principal Consultant
    IT-EDU Consultants
    ------------------------------



  • 8.  RE: CA SDM Rest API is not working

    Posted Dec 06, 2019 08:29 AM
    Edited by Rafael Oliveira Dec 06, 2019 01:23 PM
    Hey guys.. some updates: Now it's working the service! Thank you! 

    I have another question now..
    I'm trying to create a new ticket and i'm doing this:

    POST -> http://{host}/caisd-rest/in 
    with this json:


    {
      "in": {
           "@id": "U' {ID HERE}'",
           "@REL_ATTR": "U'{ID HERE}'",
           "@COMMON_NAME": "WEB",
           "description": "Descrição TESTE REST",
           "pcat": "401634",
           "summary": "Sumário via REST",
           "status": "OP",
           "customer": "U'{ID HERE}'",
           "type": "I",
           "priority": "3",
           "string6": "Cliente web externo",
           "z_local": "TJBA COSIS",
           "email_address": "teste1@tes.com",
           "customer.phone_number": "(75) 98933-6968",
           "z_alt_phone_number": "(71) 65665-6969",
           "zs_email_preferencial": "teste2@teste.com",
           "zs_oab": "985",
           "z_comarca": "400003",
           "z_cidade": "400003",
           "z_lotacao": "402981"
       }
    }


    I'm getting '400 bad request' code. Is there something that am I missing? Obs: I'm using POSTMAN to request.
    Thank you for all!