---
sourceDocument: Australia IT Service Management
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/pt-BR/it-service-management

 Release :

    - australia

ft:locale :

    - pt-BR

ft:publication_title :

    - Australia IT Service Management

ft:clusterId :

    - itsm

bundleId :

    - itsm

workflow :

    - Technology


---

# Use the command line interface to create and update services or relationships

# Use the command line interface to create and update services or relationships {#ariaid-title1}

* Versão de lançamento: Australia
* 
* Atualizado 12 de mar. de 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 min. de leitura

Use the command line interface (CLI) to perform operations on services and
relationships using a single command instead of navigating to the SR Ops workspace.

## Antes de Iniciar

Ensure that the CLI client is connected to the instance where both the Site
Reliability Operations and ServiceNow CLI store apps are
installed.

Role required: sro_manager or sro_admin

## Por Que e Quando Desempenhar Esta Tarefa

Currently, deletion of services or relationships is not supported.

## Procedimento

1. Open the Terminal, type <kbd class="ph userinput">snc sro</kbd> and press Enter.  
   The command group <kbd class="ph userinput">sro</kbd> lets you perform the create,
   update, and delete operations on services and relationships for SR Ops. Under the list of
   available commands, the `build` command is displayed.

   Nota:  
   The `build` command accepts .json file name as its input.
2. Ensure that the json payload is in the correct format.  
   For example, services-payload.json has the following payload:

       {
         "services": [
           {
             "name": "Email Enterprise",
             "description": "Email Enterprise service",
             "$class": "cmdb_ci_service"
           },
           {
             "name": "Email Premium",
             "description": "Email Service for Office 365 accounts",
             "$class": "cmdb_ci_service_discovered"
           }
         ],
         "relationships": [
           {
             "parent": "Email Enterprise",
             "child": "Email Premium"
           }
         ]
       }

3. Type <kbd class="ph userinput">snc sro build --data &lt;filename&gt;.json</kbd> and press Enter.  
   For example, <kbd class="ph userinput">snc sro build --data services-payload.json</kbd>.

## Resultado

Based on the json payload, services and relationships are created or updated on the instance.

