{"type":"api","title":"Add providers","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/4ecd3a14-d0be-3ef0-ba5d-c3cd958217a7","info":{"title":"Crosswork Device Lifecycle Management (DLM) Inventory API","description":"Crosswork DLM Inventory APIs allow the user to perform CRUD operations on Crosswork Tags, Credentials, Providers and Nodes.","version":"1.0.0","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/DLM/nodedbapi-overview.md"}},"swagger":"2.0","basePath":"/crosswork/inventory/v1","schemes":["http","https"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","description":"bearer auth","name":"Authorization","in":"header"}}},"spec":{"summary":"Add providers","description":"Adds or overwrites providers information in the Crosswork.\nRequest Body: RobotProviderDataList\nResponse Body: RobotNodeJob\nDEPRECATED URL : post: /v2/dlm/invmgr/providers/post","operationId":"NodeDb_SetProviders","responses":{"200":{"description":"A successful response.","schema":{"type":"object","properties":{"job_id":{"type":"string","title":"Job id"},"inst_id":{"type":"string","title":"Server instance identifier"},"state":{"title":"Current State of the Job","type":"string","enum":["JOB_INVALID","JOB_REJECTED","JOB_ACCEPTED","JOB_DB_UPDATED","JOB_NOTIFICATION_PUBLISHED","JOB_COMPLETED","JOB_FAILED","JOB_RUNNING","JOB_PARTIAL","JOB_COMPLETED_WITH_WARNING"],"default":"JOB_INVALID","$$ref":"#/definitions/robotapiRobotJobState"},"type":{"type":"string","title":"Job type. Debug purpose"},"error":{"type":"string","title":"If any error"},"completion_time":{"type":"string","format":"int64","title":"Remaining time to complete"},"creation_time":{"type":"string","format":"int64","title":"Job creation time in epoch seconds"},"created_by":{"type":"string","title":"User"},"impacted_count":{"type":"integer","format":"int64","title":"Impacted nodes/tags, provider or profiles"},"impacted":{"type":"array","items":{"type":"string"},"title":"Impacted elements list"},"errors":{"type":"array","items":{"type":"string"}}},"title":"Every Action related to Inventory will have a Job","example":{"job_id":"6315b69e-0646-4714-a855-7a4e01227bc2","state":"JOB_COMPLETED","type":"1 credential(s)/ tag(s)/ provider(s)/ device(s) added successfully","completion_time":"1733908308","creation_time":"1733908308","created_by":"admin","impacted":["test"]},"$$ref":"#/definitions/robotapiRobotNodeJob"}},"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"},"value":{"type":"string","format":"byte"}},"$$ref":"#/definitions/protobufAny"}}},"example":{"error":"string","code":0,"message":"string","details":[{"type_url":"string","value":"string"}]},"$$ref":"#/definitions/runtimeError"}}},"parameters":[{"name":"body","in":"body","description":"Adds or overwrites providers information request","required":true,"schema":{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","title":"Internal key, mandatory field. Allocated internally on provider\ncreation. UUID is a generated value based on the name"},"name":{"type":"string","description":"User-defined key, mandatory field."},"type":{"type":"string","enum":["ROBOT_PROVIDER_NONE","ROBOT_PROVIDER_CFG_LOCAL","ROBOT_PROVIDER_CFG_GLOBAL","ROBOT_PROVIDER_INSTALL","ROBOT_PROVIDER_COMPUTE","ROBOT_PROVIDER_CFG_DIRECT","ROBOT_PROVIDER_INSTALL_DIRECT"],"default":"ROBOT_PROVIDER_NONE","title":"Provider types\nIf there is no provider for CFG_LOCAL, it drops down to configuring\ndirectly to the device","$$ref":"#/definitions/robotapiRobotProviderType"},"lock_state":{"type":"string","enum":["INVALID_STATE","UNLOCKED","LOCKED","ERRORED"],"default":"INVALID_STATE","description":"- ERRORED: Node is in error state. This would happen when LOCK\nowner does not renew or release the state within timeout","title":"Lock state for any entity","$$ref":"#/definitions/robotapiRobotEntityLockState"},"reachability_state":{"type":"string","enum":["CONN_STATE_INVALID","CONN_STATE_UNKNOWN","CONN_STATE_REACHABLE","CONN_STATE_UNREACHABLE","CONN_STATE_MAX","CONN_STATE_DEGRADED"],"default":"CONN_STATE_INVALID","title":"Derived reachability state for a device. Cannot be set by user","$$ref":"#/definitions/robotapiRobotEntityConnectivityState"},"connectivity_info":{"type":"array","items":{"type":"object","properties":{"type":{"description":"Device connectivity type.","type":"string","enum":["ROBOT_MSVC_TRANS_NONE","ROBOT_MSVC_TRANS_TCP","ROBOT_MSVC_TRANS_UDP","ROBOT_MSVC_TRANS_HTTP","ROBOT_MSVC_TRANS_HTTPS","ROBOT_MSVC_TRANS_GRPC","ROBOT_MSVC_TRANS_SSH","ROBOT_MSVC_TRANS_NETCONF","ROBOT_MSVC_TRANS_TELNET","ROBOT_MSVC_TRANS_SNMP","ROBOT_MSVC_TRANS_TL1","ROBOT_MSVC_TRANS_TL1_SECURE","ROBOT_MSVC_TRANS_ICMP","ROBOT_MSVC_TRANS_KAFKA","ROBOT_MSVC_TRANS_NATS","ROBOT_MSVC_TRANS_GNMI","ROBOT_MSVC_TRANS_GNMI_SECURE"],"default":"ROBOT_MSVC_TRANS_NONE","title":"Transport types for robot micro-services","$$ref":"#/definitions/robotapiRobotTransportType"},"ipaddrs":{"type":"array","items":{"type":"object","properties":{"inet_af":{"type":"string","enum":["ROBOT_INET_ADDR_TYPE_NONE","ROBOT_INET_ADDR_TYPE_v4","ROBOT_INET_ADDR_TYPE_v6"],"default":"ROBOT_INET_ADDR_TYPE_NONE","title":"Robot Inet Address Family","$$ref":"#/definitions/robotapiRobotInetAddressFamily"},"inet_addr":{"type":"string"},"mask":{"type":"string"},"gateway":{"type":"string"}},"title":"Inet address","$$ref":"#/definitions/robotapiRobotInetAddr"},"title":"V4/V6 ip address for this connectivity type"},"port":{"type":"integer","format":"int64","title":"Port for this connectivity type"},"timeout":{"type":"string","format":"uint64","title":"Timeout for this connectivity type"},"reachability_state":{"title":"Reachability Status for Transport Connection","type":"string","enum":["CONN_STATE_INVALID","CONN_STATE_UNKNOWN","CONN_STATE_REACHABLE","CONN_STATE_UNREACHABLE","CONN_STATE_MAX","CONN_STATE_DEGRADED"],"default":"CONN_STATE_INVALID","$$ref":"#/definitions/robotapiRobotEntityConnectivityState"},"reachability_state_upd_time":{"type":"string","format":"int64","description":"Reachability timestamp. Time when the reach state was updated.\nUnix epoch time in seconds."},"error":{"type":"string"},"encoding_type":{"type":"string","enum":["UNKNOWN_ENCODING_TYPE","ASCII","BYTES","PROTO","JSON","JSON_IETF","XML","YANG"],"default":"UNKNOWN_ENCODING_TYPE","$$ref":"#/definitions/robotapiEncodingType"},"single_session":{"type":"boolean"},"primary_proxy":{"type":"string"},"secondary_proxy":{"type":"string"},"retries":{"type":"integer","format":"int64","title":"Deleted as it was a mistak\nstring snmpv3_engine_id = 12;"},"fqdn":{"title":"Fully qualified domain of the entity","type":"object","properties":{"host_name":{"type":"string","title":"host name"},"domain_name":{"type":"string","title":"Domain name"}},"$$ref":"#/definitions/robotapiFQDN"},"disable_trap_community_check":{"type":"boolean","title":"Flag for disabling community string validation for SNMPv2"},"ReachabilityErrorRetryCount":{"type":"integer","format":"int64","title":"Retry count for the connection type"}},"$$ref":"#/definitions/robotapiRobotTransport"},"description":"All supported transports allowed to connect to this provider."},"profile":{"type":"string","description":"Credential Profile applicable to this provider. Mandatory field."},"provider_device_key":{"type":"string","enum":["ROBOT_PROVDEVKEY_NONE","ROBOT_PROVDEVKEY_HOST_NAME","ROBOT_PROVDEVKEY_NODE_IP","ROBOT_PROVDEVKEY_INVENTORY_ID"],"default":"ROBOT_PROVDEVKEY_NONE","title":"Key types used for generating UUID for Provider","$$ref":"#/definitions/robotapiRobotProviderDeviceKey"},"last_upd_time":{"type":"string","format":"int64","description":"Last time this Provider Entry was Updated in DB.\nUnix time in seconds."},"last_reach_time":{"type":"string","format":"int64","description":"Last time this provider was determined to be reachable.\nUnix time in seconds."},"supported_models":{"type":"array","items":{"type":"object","properties":{"model_prefix":{"type":"string","title":"Yang model prefix e.g. Cisco-IOS-XR, Cisco-NX-OS, Cisco-IOS-XE"},"model_version":{"type":"string","title":"Yang model version"}},"$$ref":"#/definitions/robotapiSupportedModels"},"title":"provider models"},"family":{"description":"Provider Family. Not supoorted YET.","type":"string","enum":["ROBOT_PROVIDER_UNKNOWN","ROBOT_PROVIDER_EPNM","ROBOT_PROVIDER_NSO","ROBOT_PROVIDER_WAE","ROBOT_PROVIDER_CSM","ROBOT_PROVIDER_XTC","ROBOT_PROVIDER_SYSLOG_STORAGE","ROBOT_PROVIDER_SR_PCE","ROBOT_PROVIDER_ALERT","ROBOT_PROVIDER_DESTINATION","ROBOT_PROVIDER_OPTIMA","ROBOT_PROVIDER_PROXY","ROBOT_PROVIDER_ONC","ROBOT_PROVIDER_ACCEDIAN_PROXY"],"default":"ROBOT_PROVIDER_UNKNOWN","title":"Provider Family types","$$ref":"#/definitions/robotapiRobotProviderFamily"},"properties":{"type":"object","additionalProperties":{"type":"string"},"title":"map to configure provider specific properties as key, value pairs"},"cfs":{"type":"boolean","title":"Is CFS node"},"certificate_name":{"type":"string","title":"provider ceretificate name"},"sitelocation":{"type":"string","title":"active NSO site location, discovered/read-only parameter applicable only in geo deployments"}},"$$ref":"#/definitions/robotapiRobotProviderData"},"title":"List of providers"},"user":{"type":"string"},"criteria":{"type":"string"}},"$$ref":"#/definitions/robotapiRobotProviderDataList"}}],"tags":["NodeDb"],"__originalOperationId":"NodeDb_SetProviders","consumes":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"method":"post","path":"/providers"}}