whitelists

Download Spec

get /host-store/api/v1/whitelists

Get all whitelists

offset

int

Offset from which to start fetching objects

Default
0

limit

int

Maximum number of objects to return

Default
50

sortkey

string

Sort by specific object property

Default
"id"

sortdir

string

Sort direction, asc or desc

Default
"ASC"
Enum
  • ASC
  • DESC

Response

ExamplesSchema

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

id

string

uuid

Whitelist ID

name

string

required

Unique whitelist name displayed in UI

comment

string

Optional comment displayed in UI

type

string

required

Whitelist pattern type

Enum
  • glob
  • regex

whitelist_patterns

array[string]

created

string

date-time

When the object was created. Added by backend

Example
"2017-01-01T15:05:05Z"

updated

string

date-time

When the object was updated. Added by backend

Example
"2017-01-01T15:05:05Z"

author

string

uuid

added by backend

updated_by

string

uuid

added by backend

Response

ExamplesSchema

Whitelist successfully created

{
  "id": "5bf77342-221c-11ee-be56-0242ac120002"
}

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

Get a whitelist

id

string

uuid

required

Response

ExamplesSchema

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

id

string

uuid

Whitelist ID

name

string

required

Unique whitelist name displayed in UI

comment

string

Optional comment displayed in UI

type

string

required

Whitelist pattern type

Enum
  • glob
  • regex

whitelist_patterns

array[string]

created

string

date-time

When the object was created. Added by backend

Example
"2017-01-01T15:05:05Z"

updated

string

date-time

When the object was updated. Added by backend

Example
"2017-01-01T15:05:05Z"

author

string

uuid

added by backend

updated_by

string

uuid

added by backend

Response

ExamplesSchema

Whitelist successfully updated

Empty response

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

Delete a whitelist

id

string

uuid

required

Response

ExamplesSchema

Whitelist successfully updated

Empty response

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

Search whitelists

keywords

string

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

Response

ExamplesSchema

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

whitelist

object (whitelist)

rshell_variant

string

Shell variant

Enum
  • bash
  • posix

commands

array[string]

Response

ExamplesSchema

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?