Symantec Developer Group

 View Only
  • 1.  What's wrong with this request of REST API?

    Posted Apr 30, 2018 12:13 AM

    Hi

    I'm trying to execute command by using REST API.

    I will quaranine the specific computer manually, in my web service.

    So call the REST API, but always get erroCode of 400.

    But I'm not understand what's wrong with this.

    My request is 

    URL : https://[sepmServer]:8446/sepm/api/v1/command-queue/quarantine

    Headers : { "Authorization" : "Bearerde22f047-5757-43a6-9356-3cb281590e4d", "Content-Type : "application/json" }

    Body : { "group_ids" : "E71F13D33264649819A58C7DCEFB1D86", "computer_ids" : "C79F8839326464982E7B2E667A6EC8CA" }

    The errorMessage is shown as "Must input the parameters, group_ids and or computer_ids or hardware_ids".

    -> That messages is shown as a korean, So it's meaning is similary...

    Please help...



  • 2.  RE: What's wrong with this request of REST API?

    Posted Nov 02, 2018 04:43 PM
    In Authorization is there a space between the Bearer and the token? Usually if it’s ids you’d need an array ski Body : { "group_ids" : "E71F13D33264649819A58C7DCEFB1D86", "computer_ids" : "C79F8839326464982E7B2E667A6EC8CA" } Becomes Body : { "group_ids" : ["E71F13D33264649819A58C7DCEFB1D86"], "computer_ids" : ["C79F8839326464982E7B2E667A6EC8CA"] } Is there not an example in the API docs?


  • 3.  RE: What's wrong with this request of REST API?
    Best Answer

    Posted Nov 02, 2018 04:49 PM


  • 4.  RE: What's wrong with this request of REST API?

    Posted Nov 04, 2018 07:15 PM

    Thanks for your answer.

    It's been a long time to ask that question, now I had a solution already.

    Yes. it's a matter of 'query'. So I wrote computer ids into URL. Then it's OK.



  • 5.  RE: What's wrong with this request of REST API?

    Posted Nov 05, 2018 03:28 AM

    Great, glad you found the answer, thought it might be useful in case some has the same issue and sees this thread.