Can I use Really Simple Discovery (RSD) with the MetaWeblog API?
Yes, you can use Really Simple Discovery for your weblogs that use the MetaWeblog API, to make it easier for services and software to find your endpoint URLs. Here are some simple step by step instructions with examples:
First, create your MetaWeblog API configuration, and take note of the id of the weblog you have setup this configuration for. In this example, we’ll assume the weblog id is 4. Copy the endpoint URL provided in the MetaWeblog API control panel to the clipboard.
http://example.com/index.php?ACT=47&id=1
Next, create your RSD XML file. You can use an ExpressionEngine template to do this (choose “XML” for the template type), and use the following format as a guide. In this example, we’re naming the template ‘rsd.xml’ and placing it in the ‘site’ template group. The link you copied in the first step goes in the apiLink attribute, and the weblog id goes in the blogID attribute.
<?xml version="1.0" ?>
<rsd version="1.0" xmlns="http://archipelago.phrasewise.com/rsd" >
<service>
<engineName>ExpressionEngine</engineName>
<engineLink>http://expressionengine.com/</engineLink>
<homePageLink>http://example.com/</homePageLink>
<apis>
<api name="MetaWeblog" preferred="true" apiLink="http://example.com/index.php?ACT=47&id=1" blogID="4" />
</apis>
</service>
</rsd>
Note that this will also work with the Blogger API. The same <api> tag would be used, but the name attribute would use Blogger. You can add additional <api> tags for other MetaWeblog endpoint URLs and weblogs, but only one should have preferred set to true. The others should set this value to false.
The last step is to put an auto-discovery link in the <head> section of your HTML. Normally this would be in every page, much like your stylesheets and feed links.
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="{path='site/rsd.xml'}" />
And that’s it! Now when using applications and services that utilize the MetaWeblog API, instead of typing in the full endpoint URL, you can simply give it your domain name, and the application or service will do the legwork for you.
Category: Modules, Blogger API, Metaweblog/MoveableType API
