Skip to main content
Question

fme server rest api

  • December 21, 2019
  • 4 replies
  • 19 views

Forum|alt.badge.img

Hello, I need to use fme server rest api to make a web service application to convert cad to kml. The parameters in the workspace cannot be fixed. How can I set the parameters to the client on the web for better interaction?

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+48

You'll need to supply a json body with the published parameters for your workspace. There's an example of how to do that in the /transformations/submit endpoint.

This is the sample for the AustinDownload workspace that is installed in FME Server by default. Note that for the paramters it's an array of name/value pairs

{
  "publishedParameters": [
    {
      "name": "MAXY",
      "value": "42"
    },
    {
      "name": "THEMES",
      "value": [
        "airports",
        "cenart"
      ]
    }
  ],
  "TMDirectives": {
    "rtc": false,
    "ttc": 60,
    "description": "This is my description",
    "tag": "linux",
    "ttl": 60
  },
  "NMDirectives": {
    "directives": [
      {
        "name": "email_to",
        "value": "example@safe.com"
      }
    ],
    "successTopics": [
      "SAMPLE_TOPIC"
    ],
    "failureTopics": []
  }
}

Forum|alt.badge.img
  • Author
  • December 22, 2019
redgeographics wrote:

You'll need to supply a json body with the published parameters for your workspace. There's an example of how to do that in the /transformations/submit endpoint.

This is the sample for the AustinDownload workspace that is installed in FME Server by default. Note that for the paramters it's an array of name/value pairs

{
  "publishedParameters": [
    {
      "name": "MAXY",
      "value": "42"
    },
    {
      "name": "THEMES",
      "value": [
        "airports",
        "cenart"
      ]
    }
  ],
  "TMDirectives": {
    "rtc": false,
    "ttc": 60,
    "description": "This is my description",
    "tag": "linux",
    "ttl": 60
  },
  "NMDirectives": {
    "directives": [
      {
        "name": "email_to",
        "value": "example@safe.com"
      }
    ],
    "successTopics": [
      "SAMPLE_TOPIC"
    ],
    "failureTopics": []
  }
}

Hello, I am very happy to receive your reply, how can I expose the posted parameters to the list for client interaction. There is also an example of reading and writing parameters. How can the parameters of my Data Transformations interact?


redgeographics
Celebrity
Forum|alt.badge.img+48
jactry wrote:

Hello, I am very happy to receive your reply, how can I expose the posted parameters to the list for client interaction. There is also an example of reading and writing parameters. How can the parameters of my Data Transformations interact?

The REST API help also shows url examples, if you want to let your users set the parameters you'll need to work with a web form. Take a look at the FME Server Playground (and the demos) for inspiration.


Forum|alt.badge.img
  • Author
  • December 23, 2019
redgeographics wrote:

You'll need to supply a json body with the published parameters for your workspace. There's an example of how to do that in the /transformations/submit endpoint.

This is the sample for the AustinDownload workspace that is installed in FME Server by default. Note that for the paramters it's an array of name/value pairs

{
  "publishedParameters": [
    {
      "name": "MAXY",
      "value": "42"
    },
    {
      "name": "THEMES",
      "value": [
        "airports",
        "cenart"
      ]
    }
  ],
  "TMDirectives": {
    "rtc": false,
    "ttc": 60,
    "description": "This is my description",
    "tag": "linux",
    "ttl": 60
  },
  "NMDirectives": {
    "directives": [
      {
        "name": "email_to",
        "value": "example@safe.com"
      }
    ],
    "successTopics": [
      "SAMPLE_TOPIC"
    ],
    "failureTopics": []
  }
}

?????KML????


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings