It's all about the answers!

Ask a question

DNG and embedded image in artifact


Jean-François CHAPELLE (6414) | asked Dec 03 '20, 2:09 a.m.
With DNG 6.0.5 or 6.0.6.1,is there a way to retrieve information (date of creation, date of modification, size ...) concerning the images included in the content of an artefact.

For example, with this REST query :


I can retrieve an artifact content looks like :

<ds:content>
    <text:text artifactRole=""
               type="Information">
        <text:richTextBody>
            <div>
                <div xmlns="http://www.w3.org/1999/xhtml">
                    <p dir="ltr"
                       id="_1606973736227">Test mise à jour image :</p>
                    <p dir="ltr"
                       id="_1606973736228">
                        <img alt="Embedded Image"
                             class="embeddedImageLink"
                             id="_1606973736230"
                             src="https://jazz/rm/wrappedResources/_XPMdYTUpEeuU-O9KHCFAKg?accept=none&private"/>
                    </p>
                    <p dir="ltr"
                       id="_1606973736229"/>
                </div>
            </div>
        </text:richTextBody>
    </text:text>
</ds:content>


What's wrong with the "Wrapped Resources" ?

Thank you for your help.

Regards.


Comments
Ian Barnard commented Dec 03 '20, 10:58 a.m. | edited Dec 03 '20, 10:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The parameter in your URL is wrong because that & should be a ? - and the parameter value should really be url-encoded too


Jean-François CHAPELLE commented Dec 03 '20, 12:11 p.m.

Thank you ...


That's work fine now ...

https://jazz/rm/wrappedResources/_XPMdYTUpEeuU-O9KHCFAKg?oslc_config.context=https://jazz/rm/cm/stream/_XpkqoDCnEeuHlq5APHMxmg works fine in the browser address bar or in Postman ... Of course, in my code, the URL is encoded ...

Regards.

2 answers



permanent link
Jean-François CHAPELLE (6414) | answered Dec 03 '20, 12:37 p.m.

But I have an other question ...


An image embedded in a artifact it's nothing other than an artifact embedded in an other artifact ...

How can I get informations about this image, such as : creator, creation date, modification date ...



Comments
Jean-François CHAPELLE commented Dec 03 '20, 12:51 p.m.

In the response header, we find interesting information ...


I will try the request with an "HEADER" in place of "GET" ... I hope Liberty can answer HEADER queries ...


permanent link
Ian Barnard (2.1k613) | answered Dec 03 '20, 1:16 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Never tried this before :-)


I'm using 7.0.1.

If the wrapped resource URL shown in the embedded location is e.g. https://jazz.ibm.com:9443/rm/wrappedResources/WR_uOB7JNd7EeqV5_5cfWW9rw?accept=none&private

This returns the bare image, i.e. none of the trimmings of a resource.

i.e. change /wrappedResources/ to /resources/.

Add the configuration context, of course.

This returns RDF including the source artifact ID.

This is undoubtedly private API so this is unsupported, you use at your own risk and it may change without warning, etc.

Regards
Ian

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.