{"type":"api","title":"Delete one or more ZTP profiles","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/6c38d1fe-54c3-3c7d-9226-ba8b795939ba","info":{"title":"Crosswork ZTP Service API","description":"Crosswork ZTP Service API for devices, profiles, serial numbers, and static routes. These APIs permit users to add, update, delete, query, and perform bulk CSV import/export of devices and device onboarding operations using ZTP services.","version":"7.1.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/EMF/ztp-service-deprecated-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"/crosswork/ztp/v1"}],"securitySchemes":{"bearerAuth":{"description":"Security definitions details.","in":"header","name":"Authorization","type":"apiKey"}}},"spec":{"operationId":"DeleteProfile","deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"description":"ZTP device profile list.","properties":{"profiles":{"description":"List of ZTP device profiles.","items":{"description":"ZTP Device Profile object.","properties":{"config":{"description":"The unique ID of the configuration file associated with this ZTP profile.","type":"string"},"configName":{"description":"Config name.","type":"string"},"deviceFamily":{"description":"The Device Family of the image and configuration files associated with this ZTP profile.","type":"string"},"image":{"description":"The unique ID of the image file associated with this ZTP profile.","type":"string"},"imageName":{"description":"Image name.","type":"string"},"isConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated configuration.","format":"boolean","type":"boolean"},"isImageInvalid":{"description":"The flag indicating whether Crosswork must check if the ZTP profile is in sync with the associated image.","format":"boolean","type":"boolean"},"isPostConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated postConfig file.","format":"boolean","type":"boolean"},"isPreConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated preConfig file.","format":"boolean","type":"boolean"},"isSecureZtp":{"description":"The flag to identify if profile is secure or classic.","type":"string"},"lastUpdated":{"format":"int64","description":"TimeInMillis when device was last updated/created","type":"string"},"osPlatform":{"description":"The OS platform of the image and configuration files associated with this ZTP profile.","type":"string"},"postConfig":{"description":"The unique ID of post-Config file associated with this ZTP profile.","type":"string"},"postConfigName":{"description":"The name of post-Config file associated with this ZTP profile.","type":"string"},"preConfig":{"description":"The unique ID of pre-Config file associated with this ZTP profile.","type":"string"},"preConfigName":{"description":"The name of pre-Config file associated with this ZTP profile.","type":"string"},"profileCategory":{"description":"Category of profile","type":"string"},"profileDescription":{"description":"Profile description.","type":"string"},"profileId":{"description":"Unique ID of Profile","type":"string"},"profileName":{"description":"Name of the profile","type":"string"},"vendor":{"description":"The vendor of the image and configuration files associated with this ZTP profile.","type":"string"},"version":{"description":"The Version of the image and configuration files associated with this ZTP profile.","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpProfile"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpProfileList"},"example":{"profiles":[{"profileName":"profile1","profileId":"9f5fc0e7-d149-484a-8f21-3e8a6ebe5dc1"}]}}},"description":"The information used to delete ZTP profiles.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"ZTP device profile response object.","properties":{"code":{"description":"Response code. Indicates success/failure.","format":"int32","type":"integer"},"message":{"description":"Response message. Indicates success/failure reason.","type":"string"},"paginationDetails":{"description":"Used to filter results, paginationin device and other APIs.","properties":{"Criteria":{"description":"Response filter criteria. Not used.","type":"string"},"Descending":{"description":"Order response in ascending/descending order. Default value: \"false\"","format":"boolean","type":"boolean"},"MatchCase":{"description":"Do case matching. Not used.","format":"boolean","type":"boolean"},"PageNum":{"description":"Page number in the list of generated records, paginated by \"PageSize\". Starts with 0.","format":"int64","type":"integer"},"PageSize":{"description":"Number of records to be returned in a response.","format":"int64","type":"integer"},"SortBy":{"description":"Field to be used for sorting responses.","type":"string"},"TotalCount":{"description":"Total number of records matching the query criteria.","format":"int64","type":"integer"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpFilterData"},"ztpProfiles":{"description":"List of ZTP Device profiles.","items":{"description":"ZTP Device Profile object.","properties":{"config":{"description":"The unique ID of the configuration file associated with this ZTP profile.","type":"string"},"configName":{"description":"Config name.","type":"string"},"deviceFamily":{"description":"The Device Family of the image and configuration files associated with this ZTP profile.","type":"string"},"image":{"description":"The unique ID of the image file associated with this ZTP profile.","type":"string"},"imageName":{"description":"Image name.","type":"string"},"isConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated configuration.","format":"boolean","type":"boolean"},"isImageInvalid":{"description":"The flag indicating whether Crosswork must check if the ZTP profile is in sync with the associated image.","format":"boolean","type":"boolean"},"isPostConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated postConfig file.","format":"boolean","type":"boolean"},"isPreConfigInvalid":{"description":"The flag to check if the ZTP profile is in sync with the associated preConfig file.","format":"boolean","type":"boolean"},"isSecureZtp":{"description":"The flag to identify if profile is secure or classic.","type":"string"},"lastUpdated":{"format":"int64","description":"TimeInMillis when device was last updated/created","type":"string"},"osPlatform":{"description":"The OS platform of the image and configuration files associated with this ZTP profile.","type":"string"},"postConfig":{"description":"The unique ID of post-Config file associated with this ZTP profile.","type":"string"},"postConfigName":{"description":"The name of post-Config file associated with this ZTP profile.","type":"string"},"preConfig":{"description":"The unique ID of pre-Config file associated with this ZTP profile.","type":"string"},"preConfigName":{"description":"The name of pre-Config file associated with this ZTP profile.","type":"string"},"profileCategory":{"description":"Category of profile","type":"string"},"profileDescription":{"description":"Profile description.","type":"string"},"profileId":{"description":"Unique ID of Profile","type":"string"},"profileName":{"description":"Name of the profile","type":"string"},"vendor":{"description":"The vendor of the image and configuration files associated with this ZTP profile.","type":"string"},"version":{"description":"The Version of the image and configuration files associated with this ZTP profile.","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpProfile"},"type":"array"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpProfileResponse"},"examples":{"Success Response":{"value":{"code":200}},"Profile Not Found":{"value":{"code":404,"message":"Profile with name profile-1 does not exist."}},"Invalid Request Body":{"summary":"Invalid Request Body","value":{"code":422,"message":"invalid character '}' looking for beginning of value"},"$$ref":"#/components/examples/Invalid_Request_Body"},"Failed Dependency":{"value":{"code":424,"message":"1) Profile profile-1 can not be deleted, as there are devices associated with the profile."}},"Data Persistence Failure":{"value":{"code":500,"message":"Failed to save data. DB error."}},"Service Unavailable":{"value":{"code":503,"message":"Sorry, ztp service is in maintenance mode. Only read operations are supported."}}}}},"description":"OK. The request was successful. The result is contained in the response body."},"401":{"description":"Unauthorized. The request has not been applied because it lacks valid authentication credentials for the target resource."},"403":{"description":"Forbidden. The server recognizes the authentication credentials, but the client is not authorized to perform this request."},"404":{"description":"Not Found. The client made a request for a resource that does not exist."}},"summary":"Delete one or more ZTP profiles","description":"Deletes one or more selected ZTP profiles. Pass any valid profile metadata to the filter or identify the profiles to delete. Profiles cannot be deleted if they are already associated with a ZTP device. Request Body: ZtpProfileRequest. Response Body: ZtpProfileResponse.","tags":["Profile APIs"],"__originalOperationId":"DeleteProfile","security":[{"bearerAuth":[]}],"method":"delete","path":"/profiles"}}