Skip to main content
We have successfully linked the FME Server git repository to our remote repository in Azure. This is great, since our commit history will now persist between backup/restores when upgrading.

 

However it seems the only way to trigger a push to the remote repository is to manually navigate to the 'Push to Remote' button in 'System Configuration'.

 

I can't see anything in Automations or in the FME Server API documentation which would allow us to automate this process. Has anyone found an inventive way to schedule the 'Push to Remote' process? It doesn't necessarily need to trigger with every commit, more like once per day.

 

Using FME Server 2019.1 hosted in FME Cloud.

Hi @Id, I'm not a FME Server expert, but a fellow Safer mentioned that version control is not exposed as an endpoint in the FME Server REST API.

That said, you can try constructing a POST with HTTPCaller to /fmerest/v3/versioncontrol/remote/push – they will need an fmetoken Authorization Header (e.g. fmetoken token=*************************************** ). However, he hasn't tested this himself.

Feel free to up vote and comment on this existing post in our Ideas Forum, https://knowledge.safe.com/idea/75121/expose-versioning-through-the-fme-server-rest-api.html


Here's an FME workspace that I made that pushes the latest changes to the local repo, and then pushes it to the remote repo. We have this scheduled to run every night, so even though someone may have modified a workspace and reuploaded it without clicking the button to commit, they get commited anyway and are noted as an automated commit.

MAJOR DISCLAIMER: Since SAFE doesn't officially support the api yet, it isn't technically supported and may break in future versions of FME Server.

 

https://github.com/runneals/GISProjects/blob/master/fme/FME%20Server%20Tools/FME%20Server%20Bulk%20Commit%20for%20Version%20Control.fmw

Here's an FME workspace that I made that pushes the latest changes to the local repo, and then pushes it to the remote repo. We have this scheduled to run every night, so even though someone may have modified a workspace and reuploaded it without clicking the button to commit, they get commited anyway and are noted as an automated commit.

MAJOR DISCLAIMER: Since SAFE doesn't officially support the api yet, it isn't technically supported and may break in future versions of FME Server.

 

https://github.com/runneals/GISProjects/blob/master/fme/FME%20Server%20Tools/FME%20Server%20Bulk%20Commit%20for%20Version%20Control.fmw

Thanks, this looks promising. Will this include commit comments/version descriptions in the push to the remote repository?


Hi @Id, I'm not a FME Server expert, but a fellow Safer mentioned that version control is not exposed as an endpoint in the FME Server REST API.

That said, you can try constructing a POST with HTTPCaller to /fmerest/v3/versioncontrol/remote/push – they will need an fmetoken Authorization Header (e.g. fmetoken token=*************************************** ). However, he hasn't tested this himself.

Feel free to up vote and comment on this existing post in our Ideas Forum, https://knowledge.safe.com/idea/75121/expose-versioning-through-the-fme-server-rest-api.html

Thanks, this is the call being used in runneals workspace above. I have tested and this is working as needed. Thanks both.


Thanks, this is the call being used in runneals workspace above. I have tested and this is working as needed. Thanks both.

For anyone stumbling across this in future, the headers needed are:

 

Content-Type = application/x-www-form-urlencoded

Accept = application/json

Authorization = fmetoken token=YourTokenHere


Reply