Perforce Public Knowledge Base - Swarm URL Syntax
Reset Search
 

 

Article

Swarm URL Syntax

« Go Back

Information

 
Problem
How do I understand the Swarm URL syntax so I can build a link in Swarm?
Solution
Here are all of the Swarm URL rules/patterns:
 
/ (home)
/(@+)?(?P<id>.+) (goto)
/about[/] (about)
/activity/add[/] (add-activity)
/activity/rss[/] (activity-rss)
/activity/streams/:stream (activity-stream)
/activity/streams/:stream/rss[/] (activity-stream-rss)
/activity[/] (activity)
/api (api)
/api/(?P<path>.*)|$ (api-notfound)
/api/:version/activity[/] (api-activity)
/api/:version/projects[/] (api-projects)
/api/:version/reviews/:id/changes[/] (api-reviews/changes)
/api/:version/reviews[/:id][/] (api-reviews)
/api/[:version/]version[/] (api-version)
/archive-status/:digest[/] (archive-status)
/archives?/(?P<path>.+)\.zip (archive)
/attachments/add[/] (add-attachment)
/attachment[s]/:attachment[/][:filename] (attachments)
/changes?(/(?P<change>[0-9]+))/? (change)
/changes?(/(?P<path>.*))? (changes)
/changes?/(?P<change>[^/]+)/fixes(/(?P<mode>(add|delete)))?/? (change-fixes)
/comments?(/(?P<topic>.*))? (comments)
/comment[s]/add[/] (add-comment)
/comment[s]/edit/:comment[/] (edit-comment)
/demo/generate[/] (demo-generate)
/diff (diff)
/downloads?(/(?P<path>.*))? (download)
/files?(/(?P<path>.*))? (file)
/follow/:type/:id[/] (follow)
/imagick?(/(?P<path>.*))? (imagick)
/info/log[/] (log)
/info/phpinfo[/] (phpinfo)
/info[/] (info)
/jobs?(/(?P<job>.*))? (jobs)
/jobs?(/(?P<job>.*))? (job)
/libreoffice?(/(?P<path>.*))? (libreoffice)
/login[/] (login)
/logout[/] (logout)
/l[/:link][/] (short-link)
/projects?/(?P<project>.+)/jobs?(/(?P<job>.*))? (project-jobs)
/projects?/(?P<project>[^/]+)/(?P<mode>(files|view|download|changes))(/(?P<path>.*))?
(project-browse)
/projects?/(?P<project>[^/]+)/archives?/(?P<path>.+)\.zip (project-archive)
/projects[/] (projects)
/project[s]/:project/reviews[/] (project-reviews)
/project[s]/:project[/] (project)
/project[s]/add[/] (add-project)
/project[s]/delete/:project[/] (delete-project)
/project[s]/edit/:project[/] (edit-project)
/queue/status[/] (status)
/queue/worker[/] (worker)
/reviews?/(?P<review>[0-9]+)/v(?P<version>[0-9]+)/files?(/(?P<file>.*))?
(review-file)
/review[s]/:review/deploy/:status[/:token][/] (review-deploy)
/review[s]/:review/reviewers/:user[/] (review-reviewer)
/review[s]/:review/reviewers[/] (review-reviewers)
/review[s]/:review/tests/:status[/:token][/] (review-tests)
/review[s]/:review/transition[/] (review-transition)
/review[s]/:review/v:version/delete[/] (review-version-delete)
/review[s]/:review/vote/:vote[/] (review-vote)
/review[s]/:review[/v:version][/] (review)
/review[s]/add[/] (add-review)
/review[s][/] (reviews)
/unfollow/:type/:id[/] (unfollow)
/upgrade[/] (upgrade)
/users[/] (users)
/user[s]/:user[/] (user)
/view(/(?P<path>.*))? (view)



EXAMPLE

See the following example with an explanation of what the URL parts mean.
 
http://swarm/changes/34714#05c98e2a1064d1ecfd43ea1319b22fa1,c261

 Which represents each part as follows:
 
http://<SWARM_HOST>/changes/<CHANGE_ID>[#<FILE_HASH>[,c<COMMENT_ID>]]
 
 CHANGE_ID = id of the change
 FILE_HASH = md5 hash of the file in change CHANGE_ID the comment relates to
 COMMENT_ID = id of the comment

Thus the above example represents a URL to a comment with id 261 associated with a change 34714. This type of URL can be utilized in Swarm to open the associated file in diffs and scroll to the given comment.
 
Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255