{"type":"api","title":"Get list of 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":"GetProfileList","deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"description":"ZTP device profile request object.","properties":{"criteria":{"description":"Response filter criteria. Not used. Use \"filter\".","type":"string"},"filter":{"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"},"filterData":{"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"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpProfileRequest"},"example":{"filter":{"osPlatform":"IOS XR","vendor":""}}}},"description":"The information used to retrieve list of 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":{"ztpProfiles":[{"profileId":"1484035b-56d4-4701-892b-f7ef1f068ffc","profileName":"p1","osPlatform":"IOS XR","deviceFamily":"CISCO NCS540","version":"7.0.2","config":"b4d4504c-2a0f-4b68-84a3-a0273eabcf03","isSecureZtp":"false","profileCategory":"p","lastUpdated":"1685791216517","configName":"cfg2"},{"profileId":"6dfa95d2-e06f-4cbc-8969-fd5a8e7277d6","profileName":"test-1","osPlatform":"IOS XR","deviceFamily":"CISCO NCS540","version":"7.0.2","config":"b4d4504c-2a0f-4b68-84a3-a0273eabcf03","isSecureZtp":"false","profileCategory":"test","lastUpdated":"1685432675720","configName":"cfg2"}],"code":200,"paginationDetails":{"PageSize":150,"TotalCount":2}}},"Invalid Input":{"value":{"code":400,"message":"Filter not provided."}},"Invalid Request Body":{"summary":"Invalid Request Body","value":{"code":422,"message":"invalid character '}' looking for beginning of value"},"$$ref":"#/components/examples/Invalid_Request_Body"},"Internal Server Error":{"value":{"code":500,"message":"ID: e97fa6aa-6db8-4825-bac6-5eeeb31a45db doesn't exist."}}}}},"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":"Get list of ZTP profiles","description":"The GetProfile API retrieves a list of ZTP profiles. This API returns complete data for each profile. You can apply filters to retrieve specific sets of profiles by specifying one or more fields on which to match. You can also filter on combinations of supported fields. This API takes ZtpProfileRequest as input, which you can use to specifiy the filter input.","tags":["Profile APIs"],"__originalOperationId":"GetProfileList","security":[{"bearerAuth":[]}],"method":"post","path":"/profiles/query"}}