FishEye 1.5 : The FishEye Remote API
This page last changed on Mar 24, 2008 by edawson.
For developers who are interested in accessing the FishEye functionality remotely, this page describes the methods, data types and structures for accessing the FishEye Remote API. This documentation is available offline as part of your FishEye installation, under FISHEYE_HOME/crucible/api/ On the local HTML page, you will be able to see whether API Access is currently enabled or disabled on your FishEye instance. You will also be able to link to local code examples for REST and XML-RPC from the FishEye folders. API mechanisms are REST-ful and XML-RPC. XML-RPC APIThe XML-RPC API can be accessed from FISHEYE_HOME/crucible/api/xmlrpc REST APIThe REST API can be accessed from FISHEYE_HOME/crucible/api/rest/
REST return values are always enclosed in a <response> root element. Dates are IS0-8601, in the general form YYYY-MM-DDTHH:MM:SS(Z|[+-]HH:MM) The timezone is optional (GMT is used if omitted). The time component is also optional. The seconds component can contain a fractional part. For XMLRPC, FishEye returns all dates in GMT using YYYYMMDDTHH:MM:SS Note that no timezone is used. AuthenticationFishEye may be configured to require authentication before accessing a repository. Most methods accept an authentication token parameter. To call a method anonymously, use the empty-string for this parameter. An authentication token can be acquired (and released) using the login() and logout() methods. ExamplesThe following code example files can be found in the API folder under your FishEye instance: FISHEYE_HOME\content\api\ Browse to that folder and you will be able to access the files below:
MethodsLog inString login(String username, String password) Description api/rest/login
XML-RPC String login(String username, String password)
Log outboolean logout(String auth) Description api/rest/logout
XML-RPC boolean logout(String auth)
FishEye VersionString fisheyeVersion()
Description /api/rest/fisheyeVersion
XML-RPC String fisheyeVersion()
Example Return Values Crucible VersionString crucibleVersion()
Description /api/rest/crucibleVersion
XML-RPC String crucibleVersion()
Example Return Values List RepositoriesString[] listRepositories(String auth) Description api/rest/repositories
XML-RPC String[] getRepositories(String auth)
List PathsPathInfo[] listPaths(String auth, String rep, String path) Description api/rest/paths
XML-RPC PathInfo[] getPaths(String auth, String rep, String path)
Get RevisionRevision getRevision(String auth, String rep, String path, String rev) Description api/rest/revision
XML-RPC Revision getRevision(String auth, String rep, String path, String rev)
List Tags for RevisionString[] listTagsForRevision(String auth, String rep, String path, String rev) Description api/rest/tags
XML-RPC RevisionTags listTagsForRevision(String auth, String rep, String path, String rev)
Path HistoryPathHistory listPathHistory(String auth, String rep, String path) Description api/rest/pathHistory
XML-RPC PathHistory listPathHistory(String auth, String rep, String path)
Get ChangesetChangeset getChangeset(String auth, String rep, String csid) Description api/rest/changeset
XML-RPC Changeset getChangeset(String auth, String csid)
List ChangesetsChangesets listChangesets(String auth, String rep, String path, Date start=null, Date end=null) Description api/rest/changesets
XML-RPC Changesets listChangesets(String auth, String rep, String path) Changesets listChangesets(String auth, String rep, String path, Date start) Changesets listChangesets(String auth, String rep, String path, Date start, Date end) To get changes for the whole repository, use a path of "/" FishEye has an internal limit of how many changesets it will return from this method (a few thousand). If this limit is exceeded, the return value will be truncated so that it contains the most-recent changesets. This value of this limit is contained in the return value.
EyeQL Queryquery(String auth, String rep, String query) Description api/rest/query
XML-RPC RevisionKey[] query(String auth, String rep, String query) or Row[] query(String auth, String rep, String query)
Changeset BoundsChangesetBounds getChangesetBounds(String auth, String rep, String path=null, Date start=null, Date end=null) Description api/rest/changesetBounds
XML-RPC ChangesetBounds getChangesetBounds(String auth, String rep) ChangesetBounds getChangesetBounds(String auth, String rep, Date start) ChangesetBounds getChangesetBounds(String auth, String rep, Date start, Date end) ChangesetBounds getChangesetBounds(String auth, String rep, String path) ChangesetBounds getChangesetBounds(String auth, String rep, String path, Date start) ChangesetBounds getChangesetBounds(String auth, String rep, String path, Date start, Date end)
Data Types and StructuresData types used are the same as defined in XML-RPC. Some methods return data structures. These map into XML-RPC as expected. For REST calls, structs are encoded as XML elements of the same name (but all lowercase). Members are encoded as sub-elements, or as attributes as indicated below. RevisionKeystruct RevisionKey { String path; // (REST: attribute) String rev; // (REST: attribute) } PathInfostruct PathInfo { String name; // (REST: attribute) boolean isfile; // (REST: attribute) boolean isdir; // (REST: attribute) boolean isHeadDeleted; // (REST: attribute) } Revisionstruct Revision { String path; // (REST: attribute) String rev; // (REST: attribute) String author; // (REST: attribute) Date date; // (REST: attribute) String state; // one of "changed" "added" or "deleted" (REST: attribute) int totalLines; // (REST: attribute) int linesAdded; // (REST: attribute) int linesRemoved; // (REST: attribute) String log; String csid; // optional (REST: attribute) String ancestor; // optional (REST: attribute) } Changesetstruct Changeset { String csid; // (REST: attribute) Date date; // (REST: attribute) String author; // (REST: attribute) String branch; // (REST: attribute) boolean sealed; // (REST: attribute) String log; RevisionKey[] revisions; } Changesetsstruct Changesets { int maxReturn; // (REST: attribute) String[] csids; } Description A list of Changeset ids, most-recent changeset first. maxReturn indicates the maximum number of changesets FishEye is configured to return from this method. ChangesetBoundsstruct ChangesetBounds { Changeset first; Changeset last; } Rowstruct Row { ... } Description |
![]() |
Document generated by Confluence on Apr 14, 2008 23:36 |