{"type":"api","title":"Get a list of serial numbers","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":"GetSerialNumbers","deprecated":true,"requestBody":{"content":{"application/json":{"schema":{"description":"Serial Number Request object.","properties":{"criteria":{"description":"Response filter criteria like sort field, page number, number of records, case matching and sort order. Overrides these parameters specified in \"filterData\".","type":"string"},"filter":{"description":"Serial Number object.","properties":{"isInUse":{"description":"either \"true\" or \"false\"","type":"string"},"isOvLinked":{"description":"either \"true\" or \"false\"","type":"string"},"modifiedDate":{"format":"int64","description":"last modified date in unix time format","type":"integer"},"ovContent":{"description":"base64 enc string of ownership voucher file","type":"string"},"ovFilename":{"description":"ownership voucher file name","type":"string"},"serialNumber":{"description":"The serial number of the device","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpSerialNumber"},"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"},"limit":{"description":"Limit response records. Not used.","format":"int32","type":"integer"},"page":{"description":"Paginate response records. Not used.","format":"int32","type":"integer"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpSerialNumberRequest"},"example":{"filter":{"isInUse":"false"},"filterData":{"PageSize":30,"PageNum":0}}}},"description":"The information used to add the serialNumber.","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"description":"Serial Number response object.","properties":{"code":{"description":"Response code. Indicates success/failure.","format":"int32","type":"integer"},"data":{"description":"List of Serial Number object data.","items":{"description":"Serial Number object.","properties":{"isInUse":{"description":"either \"true\" or \"false\"","type":"string"},"isOvLinked":{"description":"either \"true\" or \"false\"","type":"string"},"modifiedDate":{"format":"int64","description":"last modified date in unix time format","type":"integer"},"ovContent":{"description":"base64 enc string of ownership voucher file","type":"string"},"ovFilename":{"description":"ownership voucher file name","type":"string"},"serialNumber":{"description":"The serial number of the device","type":"string"}},"type":"object","$$ref":"#/components/schemas/cwztpsvcZtpSerialNumber"},"type":"array"},"message":{"description":"Response message. Indicates success/failure reason.","type":"string"},"pagination":{"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/cwztpsvcZtpSerialNumberResponse"},"examples":{"Success Response":{"value":{"data":[{"serialNumber":"2","isOVLinked":"false","isInUse":"false","modifiedDate":1685733212},{"serialNumber":"1","isOVLinked":"false","isInUse":"false","modifiedDate":1685732976}],"pagination":{"TotalCount":2},"code":200,"message":"Get is success"}},"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"}}}},"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 a list of serial numbers","description":"Retrieve a list of serial numbers. Filters can be applied to retrieve specific results. Filters can be applied on following fields: isInUse, isOvLinked, serialNumber, modifiedDate, ovFileName.","tags":["Voucher & Serial Number APIs"],"__originalOperationId":"GetSerialNumbers","security":[{"bearerAuth":[]}],"method":"post","path":"/serialnumbers/query"}}