object service.create(שירותי אובייקט/מערך)
שיטה זו מאפשרת ליצור שירותים חדשים.
שיטה זו זמינה למשתמשים מכל סוג. הרשאות כדי לקרוא את השיטה ניתן לבטל בהגדרות תפקיד המשתמש. ראה משתמש תפקידים למידע נוסף.
(object/array) services to create.
Additionally to the standard service properties, the method accepts the following parameters.
| Parameter | Type | Description | 
|---|---|---|
| children | array | Child services to be linked to the service. The children must have the serviceidproperty defined. | 
| parents | array | Parent services to be linked to the service. The parents must have the serviceidproperty defined. | 
| tags | array | Service tags to be created for the service. | 
| problem_tags | array | Problem tags to be created for the service. | 
| status_rules | array | Status rules to be created for the service. | 
(אובייקט) מחזירה אובייקט המכיל את המזהים של השירותים שנוצרו מתחת לנכס serviceids. סדר המזהים המוחזרים תואם סדר השירותים שעברו.
Create a service that will be switched to problem state, if at least one child has a problem.
{
           "jsonrpc": "2.0",
           "method": "service.create",
           "params": {
               "name": "Server 1",
               "algorithm": 1,
               "sortorder": 1
           },
           "id": 1
       }Response:
CService::create() בתוך ui/include/classes/api/services/CService.php.