Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hash parameter to GET/agents/groups/:group_id/files API call #166

Merged
merged 4 commits into from
Sep 25, 2018

Conversation

mgmacias95
Copy link
Contributor

Hi team,

This PR adds a hash parameter to GET/agents/groups/:group_id/files API call. This parameter allows selecting the hash algorithm which will be used to calculate every group file checksums.

Some examples:

# curl -u foo:bar "localhost:55000/agents/groups/default/files?pretty&hash=sha256&limit=1"
{
   "error": 0,
   "data": {
      "totalItems": 24,
      "items": [
         {
            "hash": "d76908d51018ec72afc1a7e17fbc3971c6a812446fd930fdba5ed66f1af47ed0",
            "filename": "agent.conf"
         }
      ]
   }
}
# curl -u foo:bar "localhost:55000/agents/groups/default/files?pretty&hash=aaaa"
{
   "error": 1723,
   "message": "Hash algorithm not available: Available algorithms are SHA1, SHA224, SHA384, ecdsa-with-SHA1, SHA256, SHA512, md5, sha1, sha224, dsaEncryption, DSA, MD5, sha384, sha256, sha512."
}

Best regards,
Marta

@mgmacias95 mgmacias95 changed the base branch from 3.6 to 3.7 September 25, 2018 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants