kuler api documentation

I'm working out the REST APIs that Adobe's new color theme app and social space, kuler (http://kuler.adobe.com) uses by watching network traffic between the Flash app and Adobe's servers. As has been discussed elsewhere, kuler uses REST apis (http requests) that return XML documents.

You can try it out here.

Discuss this experiment on the blog post.

API Docs so far

Not much yet, but here's what I've got so far.

User:Login

The main login function. When using this you will want to keep the sessionID around, as it seems some calls want it.

http://kuler.adobe.com/kuler/services/user/login.cfm

Returns an XML structure:

	<?xml version="1.0" encoding="UTF-8"?>
	<root>			
		<success>true</success>
		<user>
			<id>1234</id>
			<label>[username]</label>
			<agreedTerms>1</agreedTerms>
			<description/>
			<image>http://kuler.adobe.com/Kuler/userImages/[username].png</image>
		</user>	
		<sessionID>sessionID*dOABYUPXhnqVqWS9g31jjg*appNum*51*appHost*redsox</sessionID>		
	</root>
	

User:Logout

The main logout function.

http://kuler.adobe.com/kuler/services/user/logout.cfm

Returns an XML structure:

	<?xml version="1.0" encoding="UTF-8"?>
	<root>			
		<success>true</success>
		<response>
			<responseCode>0</responseCode>
			<responseText>User successfully logged out</responseText>
		</response>		
	</root>
	

Themes: GetList (Mykuler)

Get the list of a user's themes. All the getList calls seem to require a userId, even if you're asking for the popular, highest rated, or recent themes. Leaving it out results in an XML-formatted error code.

http://kuler.adobe.com/kuler/services/theme/getList.cfm

Returns an XML structure:

	<?xml version="1.0" encoding="UTF-8"?>
	<root>
		<themeList>
			<recordCount>2</recordCount>
			<startIndex>0</startIndex>
			<itemsPerPage>9</itemsPerPage>
			<theme>
				<id>4348</id>
				<label>Desert Evening</label>
				<author>
					<id>[userid]</id>
					<label>[username]</label>
					<image>http://kuler.adobe.com/Kuler/userImages/[username].png</image>
				</author>
				<rating>3</rating>
				<userRating/>
				<isPublic>1</isPublic>
				<createdAt>20061128T075506</createdAt>
				<editedAt>20061128T075506</editedAt>
				<swatches>
					<swatch>
						<mode>rgb</mode>
						<c1>1.0</c1>
						<c2>0.14117648</c2>
						<c3>0.18039216</c3>
						<c4>0.0</c4>
						<index>0</index>
						<id>21186</id>
					</swatch>
					<swatch>
						<mode>rgb</mode>
						<c1>0.8</c1>
						<c2>0.38039216</c2>
						<c3>0.03137255</c3>
						<c4>0.0</c4>
						<index>1</index>
						<id>21185</id>
					</swatch>
					<swatch>
						<mode>rgb</mode>
						<c1>0.6</c1>
						<c2>0.44705883</c2>
						<c3>0.3254902</c3>
						<c4>0.0</c4>
						<index>2</index>
						<id>21184</id>
					</swatch>
					<swatch>
						<mode>rgb</mode>
						<c1>0.27058825</c1>
						<c2>0.5882353</c2>
						<c3>0.49411765</c3>
						<c4>0.0</c4>
						<index>3</index>
						<id>21183</id>
					</swatch>
					<swatch>
						<mode>rgb</mode>
						<c1>0.28627452</c1>
						<c2>0.7882353</c2>
						<c3>0.5137255</c3>
						<c4>0.0</c4>
						<index>4</index>
						<id>21182</id>
					</swatch>
				</swatches>
			</theme>
		</themeList>
	</root>
	

Themes: GetList (Highest Rated)

Get a list of themes by highest rating.

http://kuler.adobe.com/kuler/services/theme/getList.cfm

Returns an XML structure identical to Themes: GetList (Mykuler)

Get a list of themes by popularity.

http://kuler.adobe.com/kuler/services/theme/getList.cfm

Returns an XML structure identical to Themes: GetList (Mykuler)

Themes: GetList (Recent)

Get a list of most recent themes.

http://kuler.adobe.com/kuler/services/theme/getList.cfm

Returns an XML structure identical to Themes: GetList (Mykuler)

Favorite: GetList

Get the list of themes a user has added to their "favorites" (the tray at the bottom of the kuler window).

http://kuler.adobe.com/kuler/services/favorite/getList.cfm

Returns an XML structure identical to Themes: GetList (Mykuler)

Search: Get

Get a list of themes that match a search term.

http://kuler.adobe.com/kuler/services/search/get.cfm

Returns an XML structure identical to Themes: GetList (Mykuler)

Themes: Get

Get a full theme for a user

http://kuler.adobe.com/kuler/services/theme/get.cfm

Returns an XML structure:

	<?xml version="1.0" encoding="UTF-8"?>
	<root>
		<theme>
			<id>4540</id>
			<label>Mustard & Sky</label>
			<author>
				<id>5202</id>
				<label>steve</label>
				<numThemes>3</numThemes>
				<image>http://kuler.adobe.com/Kuler/userImages/steve.png</image>
			</author>
			<rating>3</rating>
			<userRating></userRating>
			<votes>2</votes>
			<downloads></downloads>
			<description></description>
			<baseSwatchIndex>0</baseSwatchIndex>
			<harmonyType></harmonyType>
			<isPublic>1</isPublic>
			<createdAt>20061128T142925</createdAt>
			<editedAt>20061128T142925</editedAt>
			<swatches>
				<swatch>
					<mode>rgb</mode>
					<c1>0.5372549</c1>
					<c2>0.33333334</c2>
					<c3>0.17254902</c3>
					<c4>0.0</c4>
					<attribute>localProcess</attribute>
					<label></label>
					<index>0</index>
					<id>22133</id>
				</swatch>
				<swatch>
					<mode>rgb</mode>
					<c1>0.8392157</c1>
					<c2>0.68235296</c2>
					<c3>0.27450982</c3>
					<c4>0.0</c4>
					<attribute>localProcess</attribute>
					<label></label>
					<index>1</index>
					<id>22132</id>
				</swatch>
				<swatch>
					<mode>rgb</mode>
					<c1>0.92941177</c1>
					<c2>0.8117647</c2>
					<c3>0.53333336</c3>
					<c4>0.0</c4>
					<attribute>localProcess</attribute>
					<label></label>
					<index>2</index>
					<id>22131</id>
					</swatch>
				<swatch>
					<mode>rgb</mode>
					<c1>0.8117647</c1>
					<c2>0.81960785</c2>
					<c3>0.5529412</c3>
					<c4>0.0</c4>
					<attribute>localProcess</attribute>
					<label></label>
					<index>3</index>
					<id>22130</id>
				</swatch>
				<swatch>
					<mode>rgb</mode>
					<c1>0.4862745</c1>
					<c2>0.5294118</c2>
					<c3>0.60784316</c3>
					<c4>0.0</c4>
					<attribute>localProcess</attribute>
					<label></label>
					<index>4</index>
					<id>22129</id>
				</swatch>
			</swatches>
			<comments/>
			<tags>
				<tag>
					<label>gold blue sage brown</label>
					<weight>1</weight>
					<id>1482</id>
				</tag>
			</tags>
		</theme>
	</root> 
	

Themes: Get ASE (link)

Get a theme ASE

http://kuler.adobe.com/kuler/services/ase/get.cfm

Returns a binary ASE file.

Error Messages

Error structure

	<?xml version="1.0" encoding="UTF-8"?>
	<root>
		<success>false</success>
		<error>
			<errorCode>49631234</errorCode>
			<errorText>Valid theme record does not exist!</errorText>
		</error>
	</root>