# Example of RefsCommandParameters for ScmService

**URL:** <https://community.developer.atlassian.com/t/example-of-refscommandparameters-for-scmservice/60026>\
**Category:** Bitbucket Server\
**Tags:** bitbucket-server, java-api\
**Created:** [July 20, 2022, 8:41am UTC](https://community.developer.atlassian.com/t/example-of-refscommandparameters-for-scmservice/60026 "2022-07-20T08:41:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JohnLawlor](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@JohnLawlor](https://community.developer.atlassian.com/u/JohnLawlor)\
**Post date:** [July 20, 2022, 8:41am UTC](https://community.developer.atlassian.com/t/example-of-refscommandparameters-for-scmservice/60026/1 "2022-07-20T08:41:10Z")

</div>

Hi,

I am trying to modify a plugin which worked on 7.x to the new APIs for 8.x

I am trying to update a line in the plugin, specifically:  
`scmService.getCommandFactory(repository).heads(refs::add).call();`

`heads` has been [deprecated](https://docs.atlassian.com/bitbucket-server/javadoc/7.14.0/spi/com/atlassian/bitbucket/scm/PluginCommandFactory.html#heads-com.atlassian.bitbucket.repository.Repository-com.atlassian.bitbucket.repository.RefCallback-):

I can’t figure out the replacement which says to use `RefsCommandParameters`

I am just looking for an example of `RefsCommandParameters` to complete the change as follows:  
`scmService.getCommandFactory(repository).refs(refsCommandParameters, refCallback).call();`

It looks to be a Builder but I have no idea what parameters to use.
