translation jobs - Is there an api/a possibility it to get its data?

First of all - Hello Everyone! - joined the community just recently Slight smile

Everything is fresh for me here right now. Apologies for any mistakes with addressing the question or if similar question was asked in the past and I did not catch it. ;)

So, yes, as the subject title says, I am wondering if I could get the translation jobs data to make my own internal calculations and statistics based on this. By 'get' I mean by for example REST api, JSON would be the perfect solution for me Smiley But of course, If not - is there any other way to get the translation jobs data in format like csv or xml?

Many thanks for feedback!

Trados Studio interface showing the 'Translation Jobs' tab selected in the navigation pane.



Generated Image Alt-Text
[edited by: Trados AI at 6:44 AM (GMT 0) on 5 Mar 2024]
emoji
Parents Reply Children
  • Hi Raf,

    Thanks! this is very helpful. Already started to get familiar with soap api.

    I have already tested really simple request with soap and it works.

    But now when I want to send the "more advanced" requests I receive bad requests responses.

    Are there any live examples for translation job requests such as find or create/delete with using the filter or other metadata "sub-queries"?

    I think I am doing it wrong most probably or strictly according to documentation with translation job2.5 docs but maybe something is no longer available?

    Here is my snippet for a body of the request:

    <?xml version="1.0" encoding="utf-8"?>
        <soap12:Body>
            <Find xmlns="urn:trisoft.be:WebServices:InfoShare:TranslationJob:2.5">
                <psAuthContext>Here-normally-is-my-auth-context-obviously-I-am-not-sharing-it</psAuthContext>
                <psXMLRequestedMetaData>
                    <ishfields>
                        <ishfield name="FISHTRANSJOBSTATUS" level="xs:string">definition</ishfield>
                    </ishfields>
                </psXMLRequestedMetaData>
            </Find>
        </soap12:Body>
    </soap12:Envelope>
    Here between psXMLRequestedMetaData tags are fields which I took from metadatafilter documentation with parts from the translationjob2.5 and something here causes the bad response. Without those tags and it contents the response is 200 but all I can get from every translation job is only GUID, reference and type, but no metadata like name, description, languages - that is why I assume that some metadata is somehow unavailable.
    Many many thanks in advance! Slight smile
  • Hi Michal,

    The psXMLRequestedMetadata property should always (in all API calls that it can be applied) contain an empty list of fields that you would like to retrieve for the object type.
    So the ishfield definition needs to point to a field existing on the object that you are querying (on the level that you are refering to).

    So given your sample above the structure should read like:

     <psXMLRequestedMetaData>
       <ishfields>
          <ishfield name="FISHTRANSJOBSTATUS" level="none"/>
       </ishfields>
    </psXMLRequestedMetaData>

    In order to know which name/level combinations are valid for which object types, you can use the ISHRemote powershell library.

    Executing the following commands from it will present all of the available fields with their respective levels for the different object types.

    1/ New-IshSession -wsBaseUrl "">yourmachineurl/ISHWS" -PSCredentials Get-Credentials

    (provide in the prompted login box username and password to connect towards SDL Tridion Docs

    2/ Query for the fields defined by the object types using

    Get-IshTypeFieldDefintion | out-gridview

    (this will build the list and make it available in a filterable and sortable grid. See screenshot below.

    Screenshot of Trados Studio's ISHRemote PowerShell library output displaying a list of fields with their respective levels for different object types in a filterable and sortable grid.


    I hope this helps,


    Raf

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 6:44 AM (GMT 0) on 5 Mar 2024]