Skip to main content

This guide shows how to use our own TimeXtender API endpoints for a TimeXtender REST data source.

The benefit of this is to show how you can add endpoints that get populated with dynamic values from other endpoints.

Essentially, when you have the following URL https://apim-txportal-prod.azure-api.net/public/jobs/{jobId}/logs you will be able to add the {jobId} part from another endpoint.

Content

Prerequisites

You need two things to use this.

  1. You need to set up the APIKey. To do this go to Admin and Security and permissions 

    Set up an APIKey.

  2. If you have gone through the TX API documentation you will find a Postman collection. In that, you can find the domain value. This one apim-txportal-prod.azure-api.net

Initial setup

Common Settings

I start by adding a new data source and choosing TimeXtender REST. Then I give it a name and add the following in the Base URL

https://apim-txportal-prod.azure-api.net/public

Like so.

Then I click Add in the Header and apply the APIKey like so.

Be sure to set it to Is sensitive.

All Jobs endpoint

In the endpoint path field add jobs change the name to All jobs and click Add endpoint.

This is all needed, no other settings should be applied.

All statuses endpoint

In the endpoint path field add jobs/status, change the name to All statuses, and click Add endpoint.

That is all needed for the initial setup.

Dynamic value endpoint

Before doing this step you must add the data source with a Short name and a long name. Then applied it to an ODX instance. You also need to have synchronized the data source successfully.

Like so.

And in the ODX.

Before the setup

Before starting we need to know what the table that has the All Jobs endpoint generates looks like. So I will run the transfer task on the data source. It is also so the endpoint will have some values to choose from when you synchronize.

It should look like this.

What you need to note is that the name of what will be the {jobId} part is called Id.

Setup dynamic value from the endpoint

Now we can create the All job logs endpoint.

Type job/{Id}/logs in the path field, give it the All job logs name and click Add endpoint.

The {Id} refers to the Id field of the All jobs table, so if you wanted to add the name instead it would be {Name}. Not that you would of course.

Now expand the Advanced section and click Enable in the Dynamic values area. Change the Dynamic values source option from Query to From Endpoint table.

Expand the Select endpoint field and choose the All Jobs table.

Then expand the Select table field and choose the

Now it should look like this.

Save the change to apply the endpoint, synchronize the TXAPI data source, and run the transfer task.

Now it will look like this.

Use the result in TimeXtender Data Integration

It generates two tables All job logs_TX_Root and JobExecutionLogs. It is possible to populate the JobExecutionLogs table by relating the Id field from All job logs_TX_Root to the JobExecutionId from JobExecutionLogs and relating the two TX_Autogenerated_Element_Id fields.

 

@Thomas Lind I am trying to set up the TX API as a source using your description here but I am running into an error when transferring the data:

 

This error appears when I transfer the data for the first time (so before even setting up the pagination). The jobs endpoint works fine, but the jobs/status endpoint is giving the above error. What am I doing wrong?


Hi @wouter.goslinga 

Are you using a Data Lake to store the ODX data in?

If so try to use a data type override to convert all fields to NVarChar(50) and see if you can get it to work.

It could at times put the data in the wrong field.
It should look like this to work.

Are you in the newest release 6536.1?


That seems to resolve the jobs/status problem. I now have the following error on the jobs/{id}/logs endpoint:
 

 

Yes, I am on the latest version.


Hi @wouter.goslinga 

I tried the same and got the same message. I will see if I can get it resolved.


@Thomas Lind did you manage to solve this error?


@Thomas Lind did you manage to solve this error?

It is solved in a dev release. So it will be fixed in a future release.


When you add the API key details in the Header section please make sure you use the name ‘APIKey’ instead of the name of the API key that you gave in step 1. The secret is of course the genereated key.


Reply