integer/array service.get(אובייקט פרמטרים)
השיטה מאפשרת לאחזר שירותים לפי הנתון פרמטרים.
שיטה זו זמינה למשתמשים מכל סוג. הרשאות כדי לקרוא את השיטה ניתן לבטל בהגדרות תפקיד המשתמש. ראה משתמש תפקידים למידע נוסף.
(object) Parameters defining the desired output.
The method supports the following parameters.
| Parameter | Type | Description | 
|---|---|---|
| serviceids | string/array | Return only services with the given IDs. | 
| parentids | string/array | Return only services that are linked to the given parent services. | 
| deep_parentids | flag | Return all direct and indirect child services. Used together with parentids. | 
| childids | string/array | Return only services that are linked to the given child services. | 
| evaltype | integer | Rules for tag searching. Possible values: 0 - (default) And/Or; 2 - Or. | 
| tags | object/array of objects | Return only services with given tags. Exact match by tag and case-sensitive or case-insensitive search by tag value depending on operator value. Format: [{"tag": "<tag>", "value": "<value>", "operator": "<operator>"}, ...].An empty array returns all services. Possible operator values: 0 - (default) Contains; 1 - Equals; 2 - Does not contain; 3 - Does not equal; 4 - Exists; 5 - Does not exist. | 
| problem_tags | object/array of objects | Return only services with given problem tags. Exact match by tag and case-sensitive or case-insensitive search by tag value depending on operator value. Format: [{"tag": "<tag>", "value": "<value>", "operator": "<operator>"}, ...].An empty array returns all services. Possible operator values: 0 - (default) Contains; 1 - Equals; 2 - Does not contain; 3 - Does not equal; 4 - Exists; 5 - Does not exist. | 
| without_problem_tags | flag | Return only services without problem tags. | 
| slaids | string/array | Return only services that are linked to the specific SLA(s). | 
| selectChildren | query | Return a childrenproperty with the child services.Supports count. | 
| selectParents | query | Return a parentsproperty with the parent services.Supports count. | 
| selectTags | query | Return a tagsproperty with service tags.Supports count. | 
| selectProblemEvents | query | Return a problem_eventsproperty with an array of problem event objects.The problem event object has the following properties: eventid-(string)Event ID;severity-(string)Current event severity;name-(string)Resolved event name.Supports count. | 
| selectProblemTags | query | Return a problem_tagsproperty with problem tags.Supports count. | 
| selectStatusRules | query | Return a status_rulesproperty with status rules.Supports count. | 
| selectStatusTimeline | object/array of objects | Return a status_timelineproperty containing service state changes for given periods.Format [{"period_from": "<period_from>", "period_to": "<period_to>"}, ...]-period_frombeing a starting date (inclusive; integer timestamp) andperiod_tobeing an ending date (exclusive; integer timestamp) for the period you're interested in.Returns an array of entries containing a start_valueproperty and an alarms array for the state changes within specified periods. | 
| sortfield | string/array | Sort the result by the given properties. Possible values: serviceid,name,status,sortorder,created_at. | 
| countOutput | boolean | These parameters being common for all getmethods are described in detail in the reference commentary. | 
| editable | boolean | |
| excludeSearch | boolean | |
| filter | object | |
| limit | integer | |
| output | query | |
| preservekeys | boolean | |
| search | object | |
| searchByAny | boolean | |
| searchWildcardsEnabled | boolean | |
| sortorder | string/array | |
| startSearch | boolean | 
(מספר שלם/מערך) מחזיר אחד:
countOutput נעשה שימוש.Retrieve all data about all services and their dependencies.
{
           "jsonrpc": "2.0",
           "method": "service.get",
           "params": {
               "output": "extend",
               "selectChildren": "extend",
               "selectParents": "extend"
           },
           "id": 1
       }Response:
{
           "jsonrpc": "2.0",
           "result": [
               {
                   "serviceid": "1",
                   "name": "My Service - 0001",
                   "status": "-1",
                   "algorithm": "2",
                   "sortorder": "0",
                   "weight": "0",
                   "propagation_rule": "0",
                   "propagation_value": "0",
                   "description": "My Service Description 0001.",
                   "uuid": "dfa4daeaea754e3a95c04d6029182681",
                   "created_at": "946684800",
                   "readonly": false,
                   "parents": [],
                   "children": []
               },
               {
                   "serviceid": "2",
                   "name": "My Service - 0002",
                   "status": "-1",
                   "algorithm": "2",
                   "sortorder": "0",
                   "weight": "0",
                   "propagation_rule": "0",
                   "propagation_value": "0",
                   "description": "My Service Description 0002.",
                   "uuid": "20ea0d85212841219130abeaca28c065",
                   "created_at": "946684800",
                   "readonly": false,
                   "parents": [],
                   "children": []
               }
           ],
           "id": 1
       }CService::get() בתוך ui/include/classes/api/services/CService.php.