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

 Release :

    - australia

ft:locale :

    - de-DE

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}

* Freigeben Version: Australia
* 
* Aktualisiert 12. März 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 Minute Lesedauer

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.

## Vorbereitungen

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

## Warum und wann dieser Vorgang ausgeführt wird

Currently, deletion of services or relationships is not supported.

## Prozedur

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.

   Hinweis:  
   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>.

## Ergebnisse

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

