{"type":"api","title":"Check if Resource is in Use","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/b44e8ba1-6566-34bf-b4f1-d28c15d76254","info":{"title":"Crosswork Collection Service APIs","description":"Crosswork Collector Services APIs manage application intents for collection jobs across multiple devices and different collection types, including SNMP, CLI, TRAP, MDT, GNMI, and SYSLOG.","version":"1.0.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"}},"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/COLLECTIONS/collection-service-overview.md"}},"swagger":"2.0","basePath":"/crosswork/collection/v1","schemes":["https","http"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","description":"bearer auth","name":"Authorization","in":"header"}}},"spec":{"summary":"Check if Resource is in Use","description":"Calling GetIsResourceInUse returns whether a Resource is in use. The only currently supported resource is Destination ID. Internal use only.”","operationId":"CollectionService_GetIsResourceInUse","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"is_in_use":{"type":"boolean","title":"Indicates whether a resource is in use or not"},"result":{"type":"object","properties":{"request_result":{"description":"The result values indicates whether the request was accepted or rejected, not the outcome of the work itself.","type":"string","enum":["UNKNOWN_RESULT","REJECTED","ACCEPTED"],"default":"UNKNOWN_RESULT","$$ref":"#/definitions/collection_serviceRequestResult"},"error":{"description":"A text message describing the reason for rejection. It can be safely passed on to the operator through logs or the UI.","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"title":"Error associated with an object","$$ref":"#/definitions/collection_serviceError"}},"description":"Result is used to convey whether an operation (individual or in a batch) has been accepted or rejected.\nFor sync APIs, an error or rejection indicates failure of the operation.\nA string error message accompanies rejection to support troubleshooting.\nFor notification objects, rejection represents failure to do intended operation.","$$ref":"#/definitions/collection_serviceResult"}},"example":{"is_in_use":true,"result":{"request_result":"ACCEPTED","error":{"error":""}}},"title":"Response to check whether a resource is in use","$$ref":"#/definitions/collection_serviceGetIsResourceInUseResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"is_in_use":{"type":"boolean","title":"Indicates whether a resource is in use or not"},"result":{"type":"object","properties":{"request_result":{"description":"The result values indicates whether the request was accepted or rejected, not the outcome of the work itself.","type":"string","enum":["UNKNOWN_RESULT","REJECTED","ACCEPTED"],"default":"UNKNOWN_RESULT","$$ref":"#/definitions/collection_serviceRequestResult"},"error":{"description":"A text message describing the reason for rejection. It can be safely passed on to the operator through logs or the UI.","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"title":"Error associated with an object","$$ref":"#/definitions/collection_serviceError"}},"description":"Result is used to convey whether an operation (individual or in a batch) has been accepted or rejected.\nFor sync APIs, an error or rejection indicates failure of the operation.\nA string error message accompanies rejection to support troubleshooting.\nFor notification objects, rejection represents failure to do intended operation.","$$ref":"#/definitions/collection_serviceResult"}},"example":{"is_in_use":false,"result":{"request_result":"REJECTED","error":{"error":"empty request"}}},"$$ref":"#/definitions/resourceinuseErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get Is Resources in use.","required":true,"schema":{"type":"object","properties":{"destination_id":{"type":"string","title":"The UUID of the destination in Crosswork inventory"}},"example":{"destination_id":"c2a8fba8-8363-3d22-b0c2-a9e449693fae"},"title":"Request to check whether a resource is in use","$$ref":"#/definitions/collection_serviceGetIsResourceInUseRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetIsResourceInUse","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/resource/inuse/query"}}