{"type":"api","title":"Retrieve devicepackage","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/aed0e3bc-4662-32cf-a5e5-4b3f4e270f50","info":{"title":"Crosswork Device Lifecycle Management (DLM) Inventory Device Package API","description":"Crosswork DLM Inventory Device Package APIs allow the user to perform CRUD operations on DevicePackage.","version":"1.0.0","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/DLM/dlm_helios.md"}},"swagger":"2.0","basePath":"/crosswork/inventory/v1","schemes":["http","https"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","description":"bearer auth","name":"Authorization","in":"header"}}},"spec":{"summary":"Retrieve devicepackage","description":"Get DevicePackage of a Virtual Network Element identified by name. This api takes DevicePackage as input\n Request Body: DevicePackage - for Details, look at the DevicePackage Message\n --Mandatory: Name to fetch the device package\n Response Body: DevicePackage","operationId":"VirtualNetworkElement_GetDevicePackage","responses":{"200":{"description":"A successful response.","schema":{"type":"object","properties":{"name":{"type":"string","title":"The name of the package"},"supported_oids":{"type":"array","items":{"type":"string"},"title":"Not used"},"commands":{"type":"array","items":{"type":"object","properties":{"application_id":{"type":"string","title":"Which application is requesting this poll"},"context_id":{"type":"string","title":"Helios group context"},"sensor_path":{"type":"string","title":"Helios defined sensor path, e.g. what is being polled"},"sensor_type":{"type":"string","title":"Helios sensor type, e.g. what protocol should be used"},"cadence":{"type":"string","format":"uint64","title":"The cadence for polling this request"},"device_group":{"type":"string","description":"The device group this polling belongs to, e.g. the device tag in persisted collection jobs."},"command_id":{"type":"string","description":"The command Id, used also to identify the callback method inside DLM."},"attributes":{"type":"array","items":{"type":"object","properties":{"property_id":{"type":"string","description":"The property attribute id in the node model. This defines which attribute in the node will be populated\nwith the outcome of this property."},"rules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","title":"What is the rule"},"arguments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","format":"int32","title":"The argument index"},"name":{"type":"string","title":"The argument name"},"value":{"type":"string","title":"The argument value"}},"title":"A parsing rule argument","$$ref":"#/definitions/dlm_heliosArgument"},"title":"The arguments in the rule"}},"title":"Parsing Rule data","$$ref":"#/definitions/dlm_heliosRuleMetaData"},"title":"The parsing rules to extract this property value"},"always":{"type":"boolean","description":"Should the callback be called even if the data is not changed."},"debug":{"type":"boolean","title":"Enable/Disable this property explicit debug logs"},"bundle":{"type":"boolean","title":"Is this property part of a bundle that contains results from several properties"},"on_change_notification":{"type":"boolean","description":"When the value changes, should DLM send a change notification."},"enabled":{"type":"boolean","title":"If this property is enabled"},"operational_overwrite":{"type":"boolean","description":"Should the outcome override the existing data provided by the user."},"single_line":{"type":"boolean","description":"If this property outcome should be more than 1 lines."},"persist_to_db":{"type":"boolean","description":"Should the operational data be persisted to DB."}},"description":"Represents a single attribute extracted from a polling outcome of command.","$$ref":"#/definitions/dlm_heliosProperty"},"description":"The node attributes that can be extracted using parsing from this poll raw data outcome."},"debug":{"type":"boolean","title":"turn on/off debug logs explicit for this command"},"enabled":{"type":"boolean","title":"Enable/disable this command"},"generic":{"type":"boolean","description":"Is this a generic command that it's outcome gors with other commands into a bundle output."},"destination":{"type":"string","title":"The kafka destination"},"destination_context":{"type":"string","title":"The kafka topic destination"},"collector_type":{"title":"The Helios collection type","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR","ASTACK_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"software_type":{"type":"array","items":{"type":"string"},"description":"The software types this command applies to."},"boot_order":{"type":"integer","format":"int32","description":"The boot order of this command in the boot sequence. If not part of the boot sequence, then 0."}},"title":"Represents a polling request to the device","$$ref":"#/definitions/dlm_heliosCommand"},"title":"Polling commands in this package"}},"description":"Represents a collection of polling commands with the same, none mandatory, subject.","example":{"name":"string","supported_oids":["string"],"commands":[{"application_id":"string","context_id":"string","sensor_path":"string","sensor_type":"string","cadence":"string","device_group":"string","command_id":"string","attributes":[{"property_id":"string","rules":[{"kind":"string","arguments":[{"index":0,"name":"string","value":"string"}]}],"always":true,"debug":true,"bundle":true,"on_change_notification":true,"enabled":true,"operational_overwrite":true,"single_line":true,"persist_to_db":true}],"debug":true,"enabled":true,"generic":true,"destination":"string","destination_context":"string","collector_type":"UNKNOWN_COLLECTOR","software_type":["string"],"boot_order":0}]},"$$ref":"#/definitions/dlm_heliosDevicePackage"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"type_url":{"type":"string","description":"A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics."},"value":{"type":"string","format":"byte","description":"Must be a valid serialized protocol buffer of the above specified type."}},"description":"`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(&foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := &pb.Foo{...}\n any, err := ptypes.MarshalAny(foo)\n ...\n foo := &pb.Foo{}\n if err := ptypes.UnmarshalAny(any, foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }","$$ref":"#/definitions/protobufAny"}}},"example":{"error":"string","code":0,"message":"string","details":[{"type_url":"string","value":"string"}]},"$$ref":"#/definitions/gatewayruntimeError"}}},"parameters":[{"name":"body","in":"body","description":"Retrieve devicepackage Request","required":true,"schema":{"type":"object","properties":{"name":{"type":"string","title":"The name of the package"},"supported_oids":{"type":"array","items":{"type":"string"},"title":"Not used"},"commands":{"type":"array","items":{"type":"object","properties":{"application_id":{"type":"string","title":"Which application is requesting this poll"},"context_id":{"type":"string","title":"Helios group context"},"sensor_path":{"type":"string","title":"Helios defined sensor path, e.g. what is being polled"},"sensor_type":{"type":"string","title":"Helios sensor type, e.g. what protocol should be used"},"cadence":{"type":"string","format":"uint64","title":"The cadence for polling this request"},"device_group":{"type":"string","description":"The device group this polling belongs to, e.g. the device tag in persisted collection jobs."},"command_id":{"type":"string","description":"The command Id, used also to identify the callback method inside DLM."},"attributes":{"type":"array","items":{"type":"object","properties":{"property_id":{"type":"string","description":"The property attribute id in the node model. This defines which attribute in the node will be populated\nwith the outcome of this property."},"rules":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","title":"What is the rule"},"arguments":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","format":"int32","title":"The argument index"},"name":{"type":"string","title":"The argument name"},"value":{"type":"string","title":"The argument value"}},"title":"A parsing rule argument","$$ref":"#/definitions/dlm_heliosArgument"},"title":"The arguments in the rule"}},"title":"Parsing Rule data","$$ref":"#/definitions/dlm_heliosRuleMetaData"},"title":"The parsing rules to extract this property value"},"always":{"type":"boolean","description":"Should the callback be called even if the data is not changed."},"debug":{"type":"boolean","title":"Enable/Disable this property explicit debug logs"},"bundle":{"type":"boolean","title":"Is this property part of a bundle that contains results from several properties"},"on_change_notification":{"type":"boolean","description":"When the value changes, should DLM send a change notification."},"enabled":{"type":"boolean","title":"If this property is enabled"},"operational_overwrite":{"type":"boolean","description":"Should the outcome override the existing data provided by the user."},"single_line":{"type":"boolean","description":"If this property outcome should be more than 1 lines."},"persist_to_db":{"type":"boolean","description":"Should the operational data be persisted to DB."}},"description":"Represents a single attribute extracted from a polling outcome of command.","$$ref":"#/definitions/dlm_heliosProperty"},"description":"The node attributes that can be extracted using parsing from this poll raw data outcome."},"debug":{"type":"boolean","title":"turn on/off debug logs explicit for this command"},"enabled":{"type":"boolean","title":"Enable/disable this command"},"generic":{"type":"boolean","description":"Is this a generic command that it's outcome gors with other commands into a bundle output."},"destination":{"type":"string","title":"The kafka destination"},"destination_context":{"type":"string","title":"The kafka topic destination"},"collector_type":{"title":"The Helios collection type","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR","ASTACK_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"software_type":{"type":"array","items":{"type":"string"},"description":"The software types this command applies to."},"boot_order":{"type":"integer","format":"int32","description":"The boot order of this command in the boot sequence. If not part of the boot sequence, then 0."}},"title":"Represents a polling request to the device","$$ref":"#/definitions/dlm_heliosCommand"},"title":"Polling commands in this package"}},"description":"Represents a collection of polling commands with the same, none mandatory, subject.","example":{"name":"string","supported_oids":["string"],"commands":[{"application_id":"string","context_id":"string","sensor_path":"string","sensor_type":"string","cadence":"string","device_group":"string","command_id":"string","attributes":[{"property_id":"string","rules":[{"kind":"string","arguments":[{"index":0,"name":"string","value":"string"}]}],"always":true,"debug":true,"bundle":true,"on_change_notification":true,"enabled":true,"operational_overwrite":true,"single_line":true,"persist_to_db":true}],"debug":true,"enabled":true,"generic":true,"destination":"string","destination_context":"string","collector_type":"UNKNOWN_COLLECTOR","software_type":["string"],"boot_order":0}]},"$$ref":"#/definitions/dlm_heliosDevicePackage"}}],"tags":["VirtualNetworkElement"],"__originalOperationId":"VirtualNetworkElement_GetDevicePackage","consumes":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"method":"post","path":"/devicepackage/query"}}