Skip to main content
Question

Can we determine the services available for a workspace using FME Server API FMEServer.getWorkspaceParameters

  • February 6, 2018
  • 2 replies
  • 4 views

Hi All,

Is it possible to retrieve the services available to a workspace via a call to FMEServer.getWorkspaceParameters or similar?

 

For example, I can get a list of repositories and then their workspaces - this works fine.

I need to know what services are then available (e.g. Job Submitter, Data Download etc).

 

Regards,

Simon

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

Forum|alt.badge.img
  • February 7, 2018

I don't kow for the FME Server API but you can use REST API version 2 to achieve this:

http://<yourfmeserver>/fmerest/v2/apidoc/#!/repositories/services_get_50

I don't know if there is a call for this in version 3.


Forum|alt.badge.img
  • February 7, 2018

Sample code to get item per service:

static void Main(string[] args)
{
    IFMEServerSession session = Safe.FMEServer.API.FMEServer.CreateServerSession();
    IFMEServerConnectionInfo info = session.CreateServerConnectionInfo("fmeserver", 7071, "user", "password");
    Dictionary<string, string> directives = new Dictionary<string, string>();
    session.Init(info, directives);

    IFMERepositoryManager repositoryMgr = session.GetRepositoryManager();

    foreach (IFMEService service in repositoryMgr.GetServices(null))
    {
        Console.WriteLine(service.Name);
        foreach (IFMEItem item in service.GetRegisteredItems(null))
        {
            Console.WriteLine(string.Format("\t{0} - {1} - {2}", item.Type, item.RepositoryName, item.Name));
        }
    }
}