Commands

This section documents the RESTesque commands that the servers support. The .net client, and XmlSerializerReplacementHandler in turn, uses these exclusively to communicate with the servers. If you want to create a separate client to talk to the config servers, you can use the command reference below to do so.

Get

/get/SectionName/{SectionHash}{?env=[EnvironmentName]}

This returns a configuration section.

Examples:
*http://config-dev.ms.fimdev.com/get/SitesUsers
*http://config-dev.ms.fimdev.com/get/SitesUsers/04ce20007e6aa961cfa91bc2034b36c5
*http://config-dev.ms.fimdev.com/get/SitesUsers?env=Development
*http://config-dev.ms.fimdev.com/get/SitesUsers/04ce20007e6aa961cfa91bc2034b36c5?env=Development

SectionName

Required. The name of the configuration section you are retrieving.

SectionHash

Optional. The MD5 hash of the configuration section you already have. If the current configuration section for your environment matches this hash, then the server will return 304 Not Modified instead of returning the section. The hash is computed using the bytes of the section's string, encoded using UTF-8 with no byte order mark. The default .NET MD5 algorithm is used, which is named "System.Security.Cryptography.MD5"

EnvironmentName

Optional. By default, the configuration server looks up the requester's IP address in its environment definition to determine which environment to use to determine which configuration to return. This overrides the lookup, and forces this request to use the supplied environment name. If the environment supplied does not exist, an error will be returned.

Responses

Response Code Response
200 OK Text of the Section
304 Not Modified Nothing. Current section matches supplied hash
404 Not Found Error message
500 Error Error Detail

Status

/status/{SectionName}/{?env=[EnvironmentName]}

This returns an xml document that describes every client that has polled the server.

Examples:
*http://config-dev.ms.fimdev.com/status
*http://config-dev.ms.fimdev.com/status/SitesUsers
*http://config-dev.ms.fimdev.com/status/SitesUsers?env=Development

SectionName

Optional. Return only statistics for this section. If the section name does not exist, no client data will be returned, but an error will not be.

EnvironmentName

Optional. Return only statistics for this environment. Due to the way the data is structured, if this is supplied SectionName must be supplied as well. If the environemtn does not exist, no client data will be returned, but an error will not be.

Responses

Response Code Response
200 OK XML formatted client statistics
500 Error Error Detail

Purge

/purge

Example
*http://config-dev.ms.fimdev.com/purge

This removes every currently cached section and forces a reload. There are no parameters to this command.

Responses

Response Code Response
200 OK "Purge complete"
500 Error Error Detail

Update

/update

This forces an update of every config section that is currently cached. Use this if there is a configuration change that needs to be loaded immediately, instead of the next time the section mapping is checked. There are no parameters to this command.

Example
*http://config-dev.ms.fimdev.com/update

Responses

Response Code Response
200 OK "All cached sections updated"
500 Error Error Detail


Mapping

/mapping

This simply returns the section mapping that is currently in use by the server.

Example
*http://config-dev.ms.fimdev.com/mapping

Responses

Response Code Response
200 OK The XML Section Mapping and Environment definition
500 Error Error Detail

FavIcon

Just to make viewing with a browser a little nicer, this returns the MySpace logo as used on the site itself.

Example:
*http://config-dev.ms.fimdev.com/favicon

Responses

Response Code Response
200 OK 16x16 ICON image
500 Error Error Detail

Last edited May 23, 2011 at 9:10 PM by eriknelson, version 2

Comments

No comments yet.