### Install DaaS Commands library using npm Source: https://docs.samsungknox.com/dev/knox-guard/tutorials/set-up-analytics-data-feed/ Run these commands in your terminal to initialize npm and install the @samsungknox/daas-cli package globally. Requires Node.js to be installed beforehand. ```bash $ npm init -y $ npm install -g @samsungknox/daas-cli ``` -------------------------------- ### Call Check Authorization endpoint with curl Source: https://docs.samsungknox.com/dev/knox-guard/get-started/ Use this curl command to call the Check Authorization endpoint and ensure your access token is correctly configured. The command sends a GET request with an Accept header and an x-knox-apitoken header (empty in the example). ```bash curl -X GET --header 'Accept: application/json' --header 'x-knox-apitoken: ' 'https://us-kcs-api.samsungknox.com/kcs/v1.1/kg/authorization' ``` -------------------------------- ### POST /kcs/v1.1/kg/transaction Source: https://docs.samsungknox.com/dev/knox-guard/troubleshoot/ Retrieves the result of an asynchronous Knox Guard operation. This endpoint is referenced as 'Get Async result' and returns a list of results for requested IDs. ```APIDOC ## [POST] /kcs/v1.1/kg/transaction ### Description Retrieves the result of an asynchronous Knox Guard operation. This endpoint is referenced as 'Get Async result' and returns a list of results for requested IDs. ### Method POST ### Endpoint /kcs/v1.1/kg/transaction ### Response #### Success Response (200) - **count** (integer) - Total number of requested items. - **success** (integer) - Number of successful operations. - **fail** (integer) - Number of failed operations. - **resultList** (array) - List of individual results. - **result** (string) - Result of the operation (e.g., "FAIL"). - **requestedId** (string) - The ID that was requested. - **error** (object) - Error details if the operation failed. - **code** (string) - Error code. - **message** (string) - Error message. - **reason** (string) - Reason for the error. #### Response Example ```json { "count" : 3, "success": 2, "fail": 1, "resultList": [ { "result": "FAIL", "requestedId": "123456789012347", "error" : { "code" : "4000000", "message" : "RESOURCE_INVALID_PARAM", "reason" : "RESOURCE_INVALID_PARAM" } } ] } ``` #### Error Response (401) - **result** (string) - Result of the operation (e.g., "FAIL"). - **error** (object) - Error details. - **code** (integer) - Error code. - **message** (string) - Error message. - **reason** (string) - Reason for the error. #### Error Response Example ```json { "result" : "FAIL", "error" : { "code": 4010000, "message": "AUTHORIZATION_FAIL", "reason": "Invalid Api Key" } } ``` ``` -------------------------------- ### Connect to SFTP server using sftp command Source: https://docs.samsungknox.com/dev/knox-guard/tutorials/set-up-analytics-data-feed/ Use this command to connect to the SFTP server. Replace , , and with your values. When prompted, enter the access token generated in step 3 as the password. After successful connection, the prompt changes to 'sftp>'. ```bash sftp -P @ ``` -------------------------------- ### Generate SFTP access token with daas get-token Source: https://docs.samsungknox.com/dev/knox-guard/tutorials/set-up-analytics-data-feed/ Use the 'daas get-token' command to generate an access token. Provide the path to your keys.json file, your client ID, and the access token URL. The token expires after its validity time (default 30 minutes, configurable with --validity-minutes). ```bash daas get-token --keys-file --client-id --access-token-url ``` -------------------------------- ### daas decrypt command Source: https://docs.samsungknox.com/dev/knox-guard/tutorials/set-up-analytics-data-feed/ Use this command to decrypt encrypted file exports. Provide the path to the keys.json file generated in the Knox API Portal and the encrypted .csv.gpg file. Optionally specify a custom output file or use --verbose for extra detail and full error messages. ```bash daas decrypt --keys-file --encrypted-file ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.