whitelists

get/host-store/api/v1/whitelists

Get all whitelists

offsetint

Offset from which to start fetching objects

Default
0
limitint

Maximum number of objects to return

Default
50
sortkeystring

Sort by specific object property

Default
"id"
sortdirstring

Sort direction, asc or desc

Default
"ASC"
Enum
  • ASC
  • DESC

Responses

Response examples

Successful request, respond with a list of whitelists

{
  "count": 123,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "name": "string",
      "comment": "string",
      "type": "glob",
      "whitelist_patterns": [
        "string"
      ],
      "created": "2017-01-01T15:05:05Z",
      "updated": "2017-01-01T15:05:05Z",
      "author": "5bf77342-221c-11ee-be56-0242ac120002",
      "updated_by": "5bf77342-221c-11ee-be56-0242ac120002"
    }
  ]
}
post/host-store/api/v1/whitelists

Create a whitelist

idstring

Whitelist ID

Format
uuid
namestring

required

Unique whitelist name displayed in UI

commentstring

Optional comment displayed in UI

typestring

required

Whitelist pattern type

Enum
  • glob
  • regex
whitelist_patternsarray
createdstring

When the object was created. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
updatedstring

When the object was updated. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
authorstring

added by backend

Format
uuid
updated_bystring

added by backend

Format
uuid

Responses

Request examples

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "comment": "string",
  "type": "glob",
  "whitelist_patterns": [
    "string"
  ],
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "author": "5bf77342-221c-11ee-be56-0242ac120002",
  "updated_by": "5bf77342-221c-11ee-be56-0242ac120002"
}

Response examples

Whitelist successfully created

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002"
}
get/host-store/api/v1/whitelists/{id}

Get a whitelist

idstring

required

Format
uuid

Responses

Response examples

Successful request, respond with a whitelist object

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "comment": "string",
  "type": "glob",
  "whitelist_patterns": [
    "string"
  ],
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "author": "5bf77342-221c-11ee-be56-0242ac120002",
  "updated_by": "5bf77342-221c-11ee-be56-0242ac120002"
}
put/host-store/api/v1/whitelists/{id}

Update a whitelist

idstring

Whitelist ID

Format
uuid
namestring

required

Unique whitelist name displayed in UI

commentstring

Optional comment displayed in UI

typestring

required

Whitelist pattern type

Enum
  • glob
  • regex
whitelist_patternsarray
createdstring

When the object was created. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
updatedstring

When the object was updated. Added by backend

Format
date-time
Example
"2017-01-01T15:05:05Z"
authorstring

added by backend

Format
uuid
updated_bystring

added by backend

Format
uuid

Responses

Request examples

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002",
  "name": "string",
  "comment": "string",
  "type": "glob",
  "whitelist_patterns": [
    "string"
  ],
  "created": "2017-01-01T15:05:05Z",
  "updated": "2017-01-01T15:05:05Z",
  "author": "5bf77342-221c-11ee-be56-0242ac120002",
  "updated_by": "5bf77342-221c-11ee-be56-0242ac120002"
}

Response examples

Whitelist successfully updated

Empty response

delete/host-store/api/v1/whitelists/{id}

Delete a whitelist

idstring

required

Format
uuid

Responses

Response examples

Whitelist successfully updated

Empty response

post/host-store/api/v1/whitelists/search

Search whitelists

keywordsstring

Comma or space-separated strings to search in whitelists' id, name, comment or type. The leading and trailing wildcards for the keywords are implicit.

Responses

Request examples

{
  "keywords": "string"
}

Response examples

Successful request, respond with a list of whitelists

{
  "count": 123,
  "items": [
    {
      "id": "5bf77342-221c-11ee-be56-0242ac120002",
      "name": "string",
      "comment": "string",
      "type": "glob",
      "whitelist_patterns": [
        "string"
      ],
      "created": "2017-01-01T15:05:05Z",
      "updated": "2017-01-01T15:05:05Z",
      "author": "5bf77342-221c-11ee-be56-0242ac120002",
      "updated_by": "5bf77342-221c-11ee-be56-0242ac120002"
    }
  ]
}
post/host-store/api/v1/whitelists/evaluate

Evaluate commands against whitelist patterns

whitelistobject
typestring

Whitelist pattern type

Enum
  • glob
  • regex
whitelist_patternsarray
rshell_variantstring

Shell variant

Enum
  • bash
  • posix
commandsarray

Responses

Request examples

{
  "whitelist": {
    "type": "glob",
    "whitelist_patterns": [
      "string"
    ]
  },
  "rshell_variant": "bash",
  "commands": [
    "string"
  ]
}

Response examples

Successful request, respond with whitelist evaluate response

{
  "whitelist_pattern_results": [
    {
      "whitelist_pattern": "string",
      "status": [
        "OK"
      ]
    }
  ],
  "command_results": [
    {
      "command": "string",
      "allowed": true
    }
  ]
}

Was this page helpful?