This method allows to create dependencies between services此方法允许创建服务之间的依赖关系.

    Parameters参数

    (object/array) Service dependencies to create创建服务依赖关系.

    Returns an object containing the IDs of the affected parent services under the serviceids property.返回一个包含serviceids属性下的受影响的父服务的ID的对象。

    Examples范例

    Creating a hard dependency创造强依赖

    Make service “2” a hard-dependent child of service “3”使服务“2”成为服务“3”的强依赖的子服务.

    Response响应:

    1. {
    2. "jsonrpc": "2.0",
    3. "result": {
    4. "serviceids": [
    5. ]
    6. },
    7. "id": 1
    8. }

    Source源码

    CService::addDependencies() in frontends/php/include/classes/api/services/CService.php.