{"type":"api","title":"Import profiling rules in bulk","meta":{"id":"/apps/pubhub/media/dna-center-235/0e427c513038595590fc5a0593cb0e208dd78571/2192edf3-d24e-3461-ab8c-12a97b547df4","swagger":"2.0","info":{"description":"Cisco DNA Center Platform v. 2.3.5","version":"2.3.5","title":"Intent API"},"schemes":["https"],"x-parser-conf":{"expand":0,"labelConfig":{"endpoint":"summary"}}},"spec":{"operationId":"importProfilingRulesInBulk","tags":["Policy"],"summary":"Import profiling rules in bulk","description":"This API imports the given list of profiling rules. For each record,\n1) If 'ruleType' for a record is not 'Custom Rule', then it is rejected.\n2) If 'ruleId' is provided in the input record,\n 2a) Record with same 'ruleId' exists in the system, then it is replaced with new data.\n 2b) Record with same 'ruleId' does not exist, then it is inserted in the database.\n3) If 'ruleId' is not provided in the input record, then new 'ruleId' is generated by the system, and record is inserted.\n","consumes":["application/json"],"produces":["application/json"],"parameters":[{"name":"request","description":"request","required":true,"schema":{"type":"object","properties":{"profilingRules":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"ruleName":{"type":"string"},"ruleType":{"type":"string","enum":["Cisco Default - Static","Cisco Default - Dynamic","Custom Rule","ML Rule"]},"ruleVersion":{"type":"integer"},"rulePriority":{"type":"integer"},"sourcePriority":{"type":"integer"},"isDeleted":{"type":"boolean"},"lastModifiedBy":{"type":"string"},"lastModifiedOn":{"type":"integer"},"pluginId":{"type":"string"},"clusterId":{"type":"string"},"rejected":{"type":"boolean"},"result":{"type":"object","properties":{"deviceType":{"type":"array","items":{"type":"string"}},"hardwareManufacturer":{"type":"array","items":{"type":"string"}},"hardwareModel":{"type":"array","items":{"type":"string"}},"operatingSystem":{"type":"array","items":{"type":"string"}}}},"conditionGroups":{"type":"object","properties":{"type":{"type":"string","enum":["attr","classification"]},"condition":{"type":"object","properties":{"attribute":{"type":"string"},"operator":{"type":"string","enum":["equals","contains","startswith","matches"]},"value":{"type":"string"},"attributeDictionary":{"type":"string"}}},"operator":{"type":"string","enum":["and","or"]},"conditionGroup":{"type":"array","items":{"type":"string"}}}},"usedAttributes":{"type":"array","items":{"type":"string"}}}}}},"$$ref":"#/definitions/ProfilingRules"},"in":"body"},{"name":"Content-Type","description":"Request body content type","default":"application/json","required":true,"type":"string","in":"header"}],"responses":{"204":{"description":"Profiling rules imported successfully. No content in the response."},"207":{"description":"One or more rules failed to import. Remaining rules were imported successfully. The response body includes the list of indexes (zero-based) that failed processing along with the reason for failure.\n"},"400":{"description":"Invalid request. Check response body for more details."},"409":{"description":"Conflict. Another import is in progress, and new import cannot be started."},"500":{"description":"Internal server error occured. Check response body for more details."}},"__originalOperationId":"importProfilingRulesInBulk","method":"post","path":"/dna/intent/api/v1/endpoint-analytics/profiling-rules/bulk"}}