{"type":"api","title":"Add/Overwrite credential profiles","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/Overwrite credential profiles","description":"Add/Overwrite the bulk of credential profiles. Either all profiles would be added/overwritten or none.\nRequest Body: RobotNodeCredentialsList\n - Mandatory: Profile name to identify credentials to add\nResponse Body: RobotNodeJob\nDEPRECATED URL : post: \"/v2/dlm/invmgr/credentials/post\"","operationId":"NodeDb_setCredentialProfiles","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":"Add/Overwrite the bulk of credential profiles request.","required":true,"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"profile":{"type":"string","title":"Node credentials. Idea is to create the credential\nprofiles and associate them with the nodes.\nThis Data is going be stored in a vault or shall be\nencrypted"},"v2_info":{"type":"object","properties":{"read_community":{"type":"string"},"write_community":{"type":"string"}},"$$ref":"#/definitions/robotapiRobotSnmpV2"},"v3_info":{"type":"object","properties":{"user_name":{"type":"string"},"auth_type":{"title":"\"HMAC-MD5\" or \"HMAC-SHA\"","type":"string","enum":["AT_UNKNOWN","AT_HMAC_MD5","AT_HMAC_SHA"],"default":"AT_UNKNOWN","$$ref":"#/definitions/robotapiRobotSnmpV3AuthType"},"auth_password":{"type":"string"},"priv_type":{"title":"\"CFB-AES-128\" or \"CBC-DES-56\" or \"PT_CFB_AES_192\" or PT_CFB_AES_256 or \"PT_CBC_3_DES\"","type":"string","enum":["PT_UNKNOWN","PT_CFB_AES_128","PT_CBC_DES_56","PT_CFB_AES_192","PT_CFB_AES_256","PT_CBC_3_DES"],"default":"PT_UNKNOWN","$$ref":"#/definitions/robotapiRobotSnmpV3PrivType"},"priv_password":{"type":"string"},"security_level":{"type":"string","enum":["SL_UNKNOWN","SL_NO_AUTH_NO_PRIV","SL_AUTH_NO_PRIV","SL_AUTH_PRIV"],"default":"SL_UNKNOWN","$$ref":"#/definitions/robotapiRobotSnmpV3SecurityLevel"}},"$$ref":"#/definitions/robotapiRobotSnmpV3"},"user_pass":{"type":"array","items":{"type":"object","properties":{"user_name":{"type":"string"},"password":{"type":"string"},"type":{"type":"string","enum":["ROBOT_USERPASS_UNKNOWN","ROBOT_USERPASS_TCP","ROBOT_USERPASS_UDP","ROBOT_USERPASS_HTTP","ROBOT_USERPASS_HTTPS","ROBOT_USERPASS_GRPC","ROBOT_USERPASS_SSH","ROBOT_USERPASS_NETCONF","ROBOT_USERPASS_TELNET","ROBOT_USERPASS_SNMP","ROBOT_USERPASS_TL1","ROBOT_USERPASS_TL1_SECURE","ROBOT_USERPASS_ADMIN","ROBOT_USERPASS_ENABLE","ROBOT_USERPASS_MAX","ROBOT_USERPASS_GNMI"],"default":"ROBOT_USERPASS_UNKNOWN","title":"Connectivity types for robot micro-services","$$ref":"#/definitions/robotapiRobotUserPassType"},"enable_password":{"type":"string","enum":["ROBOT_USERPASSEN_NONE","ROBOT_USERPASSEN_ENABLE","ROBOT_USERPASSEN_DISABLE"],"default":"ROBOT_USERPASSEN_NONE","title":"- ROBOT_USERPASSEN_ENABLE: enables second level authentication in devices where is feature is available. For e.g. Cisco IOS XE devices.\nWhen this option is selected, the password for second level authentication much be given","$$ref":"#/definitions/robotapiRobotUserPassEnable"},"enable_password_data":{"type":"string"}},"$$ref":"#/definitions/robotapiRobotUserPass"}}},"$$ref":"#/definitions/robotapiRobotNodeCredentials"},"description":"List of Credential profiles."},"user":{"type":"string"},"criteria":{"type":"string"}},"$$ref":"#/definitions/robotapiRobotNodeCredentialsList"}}],"tags":["NodeDb"],"__originalOperationId":"NodeDb_setCredentialProfiles","consumes":["application/json"],"produces":["application/json"],"security":[{"bearerAuth":[]}],"method":"post","path":"/credentials"}}