Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This shows an example of using the IKANOW API url replacement syntax.  This syntax is useful because Restlet will fail on long url attributes.

How to

...

Use

Any attribute of a url can be replaced with a variable denoted by a $variable_name e.g. http://server/api/social/community/add/$name/$desc/$tags
Once you replace an attribute with a variable you can set the value in the query arguments instead e.g. http://server/api/social/community/add/$name/$desc/$tags?name=some%20name&desc=some%20desc&tags=tag1,tag2

Example

...

The social/community/add/{name}/{description}/{tags} api call allows you to create a new community giving a name, description, and some tags.  This can be problematic if you have a large description or a large number of tags you want to send as restlet will drop the request if the url becomes too long.  See example below:

...