FishEye REST API

This is the reference section of the FishEye REST API.

For information about FishEye Plugin Development, visit the Development Hub

This documentation was automatically generated from the WADL.

The REST resources decribed on this page produce and consume serialized objects whose structure is described in XML Schema: fisheye.xsd.

Resources

/rest-service-fe/managed-repositories-v1

Methods

/rest-service-fe/managed-repositories-v1/{type}

resource-wide template parameters
parameter value description

type

string

type of repository (note: only Git is supported as of 2.7)

Methods

GET

List the repositories managed by FishEye.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <repositories>
        <repository>
            <name>new-repository</name>
            <url>/path/to/fisheye/managed-repos/new-repository</url>
        </repository>
        <repository>
            <name>forked-repository</name>
            <url>/path/to/fisheye/managed-repos/forked-repository</url>
        </repository>
    </repositories>
    

    Sample list of repositories.

/rest-service-fe/managed-repositories-v1/{type}/{name}

resource-wide template parameters
parameter value description

name

string

name of the repository to create

type

string

type of repository (note: only Git is supported as of 2.7)

Methods

DELETE

Delete a managed repository asynchronously.

As deleting an existing managed repository can be a long-running operation (if the Git repository is sufficiently large), the request will return immediately and returns a JOB ID that can be used to poll the completion of the operation.

available response representations:

  • 404 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Unknown repository new-repository</error>
    </result>
    

    Sample response if the repository does not exist or is not a managed repository.

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <jobId>42</jobId>
    </result>
    

    Sample response containing the JOB ID. Use /status/ to check if the deletion has completed.

  • 400 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Only git repositories are currently supported as of 2.7.</error>
    </result>
    

    Sample response if the type of the repository is not Git.

  • 500 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Internal server error (see log for details): Unsufficient disk space</error>
    </result>
    

    Sample response if the repository can not be created because of an internal error (such as unsufficient disk space).

PUT

Create a new empty managed repository synchronously.

This command differs from the fork or deletion REST end points in that it is synchronous. The request will return only once the repository has been created.

request query parameters
parameter value description

description

string

description of the repository (can be {@code null})

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <repository>
        <name>new-repository</name>
        <url>/path/to/fisheye/managed-repos/new-repository</url>
    </repository>
    

    Sample response when the repository has been successfully created.

  • 400 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>A repository already exists with the name 'new-repository'</error>
    </result>
    

    Sample response if the repository can not be created because of a validation error (if the name of repository corresponds to an existing repository, is empty, or does not follow the pattern detailed in RepositoryData.NAME_REGEX. Also if the specified type is not Git).

  • 500 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Internal server error (see log for details): Unsufficient disk space</error>
    </result>
    

    Sample response if the repository can not be created because of an internal error (such as unsufficient disk space).

/rest-service-fe/managed-repositories-v1/{type}/status/{jobId}

resource-wide template parameters
parameter value description

jobId

int

ID of the operation

type

string

type of repository (note: only Git is supported as of 2.7)

Methods

GET

Get the status of a fork or delete in progress.

available response representations:

  • 404 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Invalid operation ID: 42</error>
    </result>
    

    Sample response if the JOB ID is not known.

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <repository>
        <name>forked-repository</name>
        <url>/path/to/fisheye/managed-repos/forked-repository</url>
    </repository>
    

    Sample response if the operation has completed. The response includes the details of the forked and deleted repository.

/rest-service-fe/managed-repositories-v1/{type}/{source}/to/{target}?description=<value>

resource-wide template parameters
parameter value description

source

string

name of the repository to fork

target

string

name for the forked repository

type

string

type of repository (note: only Git is supported as of 2.7)

Methods

PUT

Fork a managed repository asynchronously.

As forking an existing managed repository can be a long-running operation (if the Git repository is sufficiently large), the request will return immediately and includes a JOB ID that can be used to poll the completion of the operation.

request query parameters
parameter value description

description

string

for the forked repository

available response representations:

  • 404 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Unknown repository new-repository</error>
    </result>
    

    Sample response if the repository to fork does not exist or is not a managed repository.

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <jobId>42</jobId>
    </result>
    

    Sample response containing the JOB ID. Use /status/ to check if the forking operation has completed.

  • 400 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Only git repositories are currently supported as of 2.7.</error>
    </result>
    

    Sample response if the type of the repository is not Git.

  • 500 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <result>
        <error>Internal server error (see log for details): Unsufficient disk space</error>
    </result>
    

    Sample response if the repository can not be forked because of an internal error (such as unsufficient disk space).

/rest-service-fe/server-v1

Provides general information about the server's configuration.

Methods

GET

Provides general information about the server's configuration.

available response representations:

  • 200 (serverInfo) [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <serverInfo>
        <timeZone>
            <ID>Australia/Sydney</ID>
            <rawOffset>36000000</rawOffset>
        </timeZone>
        <appHomeDir>/home/fisheye</appHomeDir>
        <appInstanceDir>/var/fisheye</appInstanceDir>
        <version>
            <releaseNumber>2.9.1</releaseNumber>
            <buildDate>2012-11-19</buildDate>
        </version>
        <isFishEye>true</isFishEye>
        <isCrucible>false</isCrucible>
    </serverInfo>
    

    Information about the server's configuration.

    XML Schema

/rest-service-fe/commit-graph-v1

Rest service for Commit Graph data.

Methods

/rest-service-fe/commit-graph-v1/slice/{repository:[^/]+}?branch=<value>&id=<value>&direction=<value>&size=<value>

resource-wide template parameters
parameter value description

repository

string

the name of the repository to search

Methods

GET

finds slice data the query

request query parameters
parameter value description

branch

string

the set of branches to search. If not specified, will search all branches

id

string

the id of the changeset which we are

direction

string

Default: around

the direction to traverse. May be "before", "after" or "around"

size

int

Default: 50

the number of changesets to return in the slice

available response representations:

/rest-service-fe/commit-graph-v1/details/{repository:[^/]+}

resource-wide template parameters
parameter value description

repository

string

Methods

POST

Retrieves detailed information about a set of changesets in a repository, designed to be used with the FishEye commit graph

acceptable request representations:

available response representations:

/rest-service-fe/repositories-v1

Provides an API to list information about the repositories.

Methods

GET

List all the repositories.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <repositoryList>
        <repository repositoryState="RUNNING" name="project" finishedFullSlurp="true" enabled="true"/>
        <repository repositoryState="STOPPED" name="project-hg" finishedFullSlurp="true" enabled="false"/>
    </repositoryList>
    

    Sample list of repositories registered to a FishEye instance.

/rest-service-fe/repositories-v1/{name}

resource-wide template parameters
parameter value description

name

string

name of the repository

Methods

GET

Get the information about a repository.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <repository repositoryState="RUNNING" name="project" finishedFullSlurp="true" enabled="true">
        <path>project</path>
        <url>com.sample.project</url>
    </repository>
    

    Sample information about a repository.

/rest-service-fe/revisionData-v1

Provides an API for getting information about changesets and filerevisions indexed by fisheye.

Methods

/rest-service-fe/revisionData-v1/changesetList/{repository}?path=<value>&start=<value>&end=<value>&maxReturn=<value>

resource-wide template parameters
parameter value description

repository

string

the repository to query.

Methods

GET

Get a list of changesets on a repository.

request query parameters
parameter value description

path

string

restrict the changesets to those in this path, should be "/" to look at the whole repository.

start

string

only return changesets after this date.

end

string

only return changesets before this date.

maxReturn

string

the maximum number of changesets to return.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <changesetIdList resultsTruncated="false">
        <csid>MAIN:peter:20100101000000</csid>
        <csid>MAIN:douglas:20100101000042</csid>
        <csid>MAIN:ray:20100101000451</csid>
    </changesetIdList>
    

    A list of changesets on a repository.

/rest-service-fe/revisionData-v1/changeset/{repository}/{csid}

resource-wide template parameters
parameter value description

repository

string

the repository to query.

csid

string

the ChangesetID of the changeset to return.

Methods

GET

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <changeset repositoryName="repositoryName" position="0" displayId="changeset_display_id" date="2012-11-19T14:43:33.122+11:00" csid="changeset_id" branch="branch" author="author">
        <branches>
            <branch>branch</branch>
        </branches>
        <children>
            <child>child1</child>
            <child>child2</child>
        </children>
        <comment>comment</comment>
        <fileRevisionKey rev="revision_id" path="dir/path/path/"/>
        <fileRevisionKey rev="revision_id_2" path="dir2/path2/path2/"/>
        <p4JobIds>
            <p4JobId>job1</p4JobId>
            <p4JobId>job2</p4JobId>
            <p4JobId>job3</p4JobId>
        </p4JobIds>
        <parents>
            <parent>parent</parent>
        </parents>
        <tags>
            <tag>tag1</tag>
            <tag>tag2</tag>
        </tags>
    </changeset>
    

    The changeset specified by csid.

/rest-service-fe/revisionData-v1/pathList/{repository}?path=<value>

resource-wide template parameters
parameter value description

repository

string

the repository to query.

Methods

GET

Get a list of information about files and directories in a path.

request query parameters
parameter value description

path

string

the path to query, with respect to the fisheye repository root.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <pathList>
        <pathInfo name="branches" headDeleted="false" dir="true"/>
        <pathInfo name="tags" headDeleted="false" dir="true"/>
        <pathInfo name="trunk" headDeleted="false" dir="true"/>
    </pathList>
    

    A list of information about files and directories in the path.

/rest-service-fe/revisionData-v1/revisionInfo/{repository}?path=<value>&revision=<value>

resource-wide template parameters
parameter value description

repository

string

the repository to query.

Methods

GET

request query parameters
parameter value description

path

string

the path of the filerevision, with respect to the fisheye repository root.

revision

string

the id of the filerevision to retrieve.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <fileRevision totalLines="451" fileRevisionState="CHANGED" rev="3" path="trunk/readme.txt" linesRemoved="0" linesAdded="409" date="2012-11-19T14:43:33.122+11:00" csid="MAIN:ray:2010451" contentLink="" author="ray" ancestor="2">
        <comment>second revision</comment>
    </fileRevision>
    

    Information about the specified filerevision.

/rest-service-fe/revisionData-v1/revisionTags/{repository}?path=<value>&revision=<value>

resource-wide template parameters
parameter value description

repository

string

the repository to query.

Methods

GET

request query parameters
parameter value description

path

string

the path of the filerevision, with respect to the fisheye repository root.

revision

string

the id of the filerevision to retrieve.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <tagList>
        <tag>TAG1</tag>
        <tag>TAG2</tag>
        <tag>TAG3</tag>
    </tagList>
    

    A list of tags associated with this revision.

/rest-service-fe/revisionData-v1/pathHistory/{repository}?path=<value>

resource-wide template parameters
parameter value description

repository

string

the repository to query.

Methods

GET

Get a list of the file revisions for a specific path.

request query parameters
parameter value description

path

string

the path to query.

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <fileRevisionList>
        <fileRevision totalLines="30" fileRevisionState="ADDED" rev="1" path="trunk/readme.txt" linesRemoved="0" linesAdded="30" date="2012-11-19T14:43:33.122+11:00" csid="MAIN:peter:2010000" contentLink="" author="peter">
            <comment>added readme</comment>
        </fileRevision>
        <fileRevision totalLines="42" fileRevisionState="CHANGED" rev="2" path="trunk/readme.txt" linesRemoved="0" linesAdded="12" date="2012-11-19T14:43:33.122+11:00" csid="MAIN:douglas:2010042" contentLink="" author="douglas" ancestor="1">
            <comment>first revision</comment>
        </fileRevision>
        <fileRevision totalLines="451" fileRevisionState="CHANGED" rev="3" path="trunk/readme.txt" linesRemoved="0" linesAdded="409" date="2012-11-19T14:43:33.122+11:00" csid="MAIN:ray:2010451" contentLink="" author="ray" ancestor="2">
            <comment>second revision</comment>
        </fileRevision>
    </fileRevisionList>
    

    A list of the filerevisions of a path.

/rest-service-fe/search-v1

Provides an API to execute FishEye queries against a repository.

Methods

/rest-service-fe/search-v1/query/{repository}?query=<value>&maxReturn=<value>

resource-wide template parameters
parameter value description

repository

string

name of the repository

Methods

GET

Execute a FishEye query against a specific repository.

Note: the maximum number of results will be limited to maxReturn or 3000, whichever is the smallest number.

request query parameters
parameter value description

query

string

FishEye query to execute

maxReturn

string

maximum number of results (which can be left unspecified, but in that case, the maximum number of results will set to 3000 results)

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <fileRevisionKeyList>
        <fileRevisionKey rev="1.1" path="test/readme.txt"/>
        <fileRevisionKey rev="1.2" path="test/readme.txt"/>
        <fileRevisionKey rev="1.3" path="test/readme.txt"/>
    </fileRevisionKeyList>
    

    Sample result for a FishEye query such as select revisions from dir /test.

/rest-service-fe/search-v1/crossRepositoryQuery?query=<value>&repository=<value>&expand=<value>

Methods

GET

Execute a FishEye query against a specific repository.

Note: the maximum number of results will be limited to maxReturn or 3000, whichever is the smallest number.

request query parameters
parameter value description

query

string

FishEye query to execute

repository

string

name of the repository

expand

string

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <fileRevisionKeyList>
        <fileRevisionKey rev="1.1" path="test/readme.txt"/>
        <fileRevisionKey rev="1.2" path="test/readme.txt"/>
        <fileRevisionKey rev="1.3" path="test/readme.txt"/>
    </fileRevisionKeyList>
    

    Sample result for a FishEye query such as select revisions from dir /test.

/rest-service-fe/search-v1/queryAsRows/{repository}?query=<value>&maxReturn=<value>

resource-wide template parameters
parameter value description

repository

string

name of the repository

Methods

GET

Execute a FishEye query (that contains a "return" statement) against a specific repository.

Note: the maximum number of results will be limited to maxReturn or 3000, whichever is the smallest number.

request query parameters
parameter value description

query

string

FishEye query to execute (which must contain a "return" statement)

maxReturn

string

maximum number of results (which can be left unspecified, but in that case, the maximum number of results will set to 3000 results)

available response representations:

  • 200 [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <tabularQueryResult>
        <row>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">test/readme.txt</item>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1.1</item>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">peter</item>
        </row>
        <row>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">test/readme.txt</item>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">1.2</item>
            <item xsi:type="xs:string" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">peter</item>
        </row>
        <headings>
            <heading>path</heading>
            <heading>revision</heading>
            <heading>author</heading>
        </headings>
    </tabularQueryResult>
    

    Sample result for a FishEye query such as select revisions from dir /test return path, revision, author.

/rest-service-fe/search-v1/reviewsForChangeset/{repository}

resource-wide template parameters
parameter value description

repository

string

name of the repository

Methods

POST

Retrieve a list of reviews for a changeset in a given repository.

acceptable request representations:

request form value parameters
parameter value description

cs

string

the id of the changeset

  • application/x-www-form-urlencoded [expand]

available response representations:

  • 200 (reviewsForChangeset) [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reviewsForChangeset>
        <reviews>
            <review>
                <allowReviewersToJoin>true</allowReviewersToJoin>
                <author>
                    <avatarUrl></avatarUrl>
                    <displayName>A. D. Ministrator</displayName>
                    <userName>admin</userName>
                </author>
                <createDate>2012-11-19T14:43:33.080+1100</createDate>
                <creator>
                    <avatarUrl></avatarUrl>
                    <displayName>A. D. Ministrator</displayName>
                    <userName>admin</userName>
                </creator>
                <description>Description</description>
                <jiraIssueKey>SAMPLE-1</jiraIssueKey>
                <metricsVersion>1</metricsVersion>
                <moderator>
                    <avatarUrl></avatarUrl>
                    <displayName>A. D. Ministrator</displayName>
                    <userName>admin</userName>
                </moderator>
                <name>Sample Review</name>
                <permaId>
                    <id>CR-SAMPLE-1</id>
                </permaId>
                <projectKey>CR-SAMPLE</projectKey>
                <state>Review</state>
                <summary>Review summary</summary>
                <type>REVIEW</type>
            </review>
        </reviews>
        <changesetId>aa26d45eea2d259678b801c135cde82fe6518473</changesetId>
    </reviewsForChangeset>
    

    XML Schema

/rest-service-fe/search-v1/reviewsForChangesets/{repository}

resource-wide template parameters
parameter value description

repository

string

name of the repository

Methods

POST

Retrieve a list of reviews for each given changeset in a given repository.

acceptable request representations:

request form value parameters
parameter value description

cs

string

a list of changeset ids

  • application/x-www-form-urlencoded [expand]

available response representations:

  • 200 (reviewsForChangesets) [expand]

    Example
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <reviewsForChangesets>
        <changesets>
            <changeset>
                <reviews>
                    <review>
                        <allowReviewersToJoin>true</allowReviewersToJoin>
                        <author>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </author>
                        <createDate>2012-11-19T14:43:33.080+1100</createDate>
                        <creator>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </creator>
                        <description>Description</description>
                        <jiraIssueKey>SAMPLE-1</jiraIssueKey>
                        <metricsVersion>1</metricsVersion>
                        <moderator>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </moderator>
                        <name>Sample Review</name>
                        <permaId>
                            <id>CR-SAMPLE-1</id>
                        </permaId>
                        <projectKey>CR-SAMPLE</projectKey>
                        <state>Review</state>
                        <summary>Review summary</summary>
                        <type>REVIEW</type>
                    </review>
                </reviews>
                <changesetId>aa26d45eea2d259678b801c135cde82fe6518473</changesetId>
            </changeset>
            <changeset>
                <reviews>
                    <review>
                        <allowReviewersToJoin>true</allowReviewersToJoin>
                        <author>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </author>
                        <createDate>2012-11-19T14:43:33.080+1100</createDate>
                        <creator>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </creator>
                        <description>Description</description>
                        <jiraIssueKey>SAMPLE-2</jiraIssueKey>
                        <metricsVersion>1</metricsVersion>
                        <moderator>
                            <avatarUrl></avatarUrl>
                            <displayName>A. D. Ministrator</displayName>
                            <userName>admin</userName>
                        </moderator>
                        <name>Another Review</name>
                        <permaId>
                            <id>CR-SAMPLE-2</id>
                        </permaId>
                        <projectKey>CR-SAMPLE</projectKey>
                        <state>Review</state>
                        <summary>Review summary</summary>
                        <type>REVIEW</type>
                    </review>
                </reviews>
                <changesetId>16f1b72aed7e1ff0072a2b36aa579e4342a223e0</changesetId>
            </changeset>
        </changesets>
    </reviewsForChangesets>
    

    XML Schema

/rest-service-fe/changeset-v1

Provides an API to get a list of changesets from a repository.

Methods

/rest-service-fe/changeset-v1/listChangesets?rep=<value>&path=<value>&committer=<value>&comment=<value>&p4JobFixed=<value>&expand=<value>&beforeCsid=<value>

Methods

GET

List of changesets from a repository.

request query parameters
parameter value description

rep

string

name of the repository

path

string

repository path

committer

string

ID of the commiter

comment

string

comment to match

p4JobFixed

string

Perforce option to select the changesets marked as fixing

expand

string

expand query parameter to specify the maximum number of results

beforeCsid

string

parent of the changesets

available response representations: