CA Service Management

  • 1.  Get attachment using WS

    Posted Mar 11, 2016 09:58 AM

    Hi community,

     

    I just wondering if any of you know how to get an image from SDM using Web Services or CA PAM, I am working with that images for profile picture in CA SDM, but the administrator need to upload the pics in the repository so it changes the extension to .GZ and my script can't read it...

    I want to know if is possible download a image from SDM repository in a specific folder through Web Services/PAM, or Upload the images with the original extension, without ".GZ":

     

    Thanks in advance, I appreciate your help.

    .



  • 2.  Re: Get attachment using WS

    Posted Mar 11, 2016 10:01 AM

    Hi,

    partially answering your question, as I know .gz is an archive file type, so you can disable archiving in Repository settings in SDM. (Admin tab -> Attachments -> Repositories -> [Edit] -> Archive Type : None).

    Regards,

    Timur



  • 3.  Re: Get attachment using WS

    Posted Mar 11, 2016 10:55 AM

    Hi cdtj

     

    This options didn't work, the SDM Repository is already configured like that. anyway this continues attaching with the .GZ extension.

     

    Regards



  • 4.  Re: Get attachment using WS
    Best Answer

    Posted Mar 11, 2016 11:22 AM

    Hi,

    The attachments are simple files on the system.

    So you can retrieve the path to that specific attachment and repository using web service method:

    ◦getAttmntList

    ◦getAttmntInfo

    ◦getRepositoryInfo

     

    and then grab/construct the physical path to the file on the system itself.

    Of course if the file is compressed your script will need to decompress it before reading/displaying the content.

    Many compressing tools like Gzip.exe can be used command line to do that.

    /J



  • 5.  Re: Get attachment using WS

    Posted Mar 14, 2016 03:23 AM

    Hi you can use upload servlet to get attachments from SDM. Check the following thread Downloading attachment using CA Upload servlet using following link

    You can aslo use REST API to get attachments



  • 6.  Re: Get attachment using WS

    Posted Mar 14, 2016 04:19 AM

    Thanks Gutis . I didn't think to use the upload servlet directly and we tried with REST but this was buggy at this time. I think CA have now corrected it with patch. Didn't have give it a try since then.

    /J



  • 7.  Re: Get attachment using WS

    Posted Mar 14, 2016 10:43 AM

    Thanks so much for all your help Gutis and Jmayer, I did use command line for decompressing, and it works



  • 8.  Re: Get attachment using WS

    Posted Mar 14, 2016 12:02 PM

    Virtual Team Work



  • 9.  RE: Re: Get attachment using WS

    Posted Apr 23, 2020 02:43 PM
    "You can aslo use REST API to get attachments" <-How :)
    Please share some links if you know about.


  • 10.  RE: Re: Get attachment using WS

    Posted Apr 24, 2020 01:12 AM
    You can get the attachments out of the system without a hacky solution by using the REST API (the SOAP API does not have a method for downloading the attachments). The general instructions are given in the tech ref: https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/business-management/ca-service-management/17-3/reference/ca-service-desk-manager-reference-commands/technical-reference/rest-http-methods.html
    Search for "attmnt" on the page and the first hit is spot on.