Wiki

Case Status Kiln
Register Log In

Wiki

 
Repository Aliases
  • RSS Feed

Last modified on 9/23/2011 12:49 PM by User.

Tags:

Repository Aliases

New in Kiln 2.4

Repositories aliases allow you to create a URL that points to a target repository, which is allowed to change while the alias' URL remains the same. Kiln provides a full read and write API to repo aliases.

Api/{version}/RepoAlias/Create (POST)

Creates a repository alias with the specified name for the given repository. You must be a project administrator to create an alias in a project.

Takes the following parameters: 

  • ixRepo (required): the repository to attach the alias to.
  • sName (required): the name of the alias. May contain word characters, hyphens, and parentheses (i.e. must match ^[\w- \(\)]+$)

Returns a repository alias record. The alias's URL will be http://your.kilnhg.com/RepoAlias/sProject/sSlug, where sProject is the slug of repository's project, and the sSlug is the slug of the alias's name.

Api/{version}/RepoAlias/{ixRepoAlias} (GET)

Returns the repository alias record. Requires read permissions to the repository's project.

Api/{version}/RepoAlias/{ixRepoAlias} (POST)

Updates the specified alias. Takes either or both of the following parameters (see descriptions for Create method, above):
  • ixRepo
  • sName

Any parameter that is not specified remains unchanged. Requires administrator permissions on the repository's project.

Api/{version}/RepoAlias/{ixRepoAlias}/Delete (POST)

Deletes the specified alias. Requires administrator permissions on the associated repository's project. Returns true on success.

Api/{version}/RepoAlias/Find (GET)

Returns the repository alias record by that matches the given project slug and alias slug. Takes the following parameters:
  • sProjectSlug (required): slugified project name
  • sAliasSlug (required): slugified alias name
This method is useful for fetching an alias record if you have the alias's Kiln URL; for instance, the alias record for the alias at http://your.kilnhg.com/RepoAlias/my-project/my-alias will be found at http://your.kilnhg.com/Api/1.0/RepoAlias/Find?sProjectSlug=my-project&sAliasSlug=my-alias.