Skip to content

Commit

Permalink
Merge pull request #154 from gravwell/dev
Browse files Browse the repository at this point in the history
dev->master for 4.1.0 release
  • Loading branch information
floren authored Jan 6, 2021
2 parents 5cfc40b + 663202e commit a1b6978
Show file tree
Hide file tree
Showing 15 changed files with 834 additions and 40 deletions.
3 changes: 2 additions & 1 deletion api/ingest.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ To ingest user-provided data, the line-delimited file API is the simplest option

* A file part named `file` containing the user-provided file
* A field named `tag` containing the desired ingest tag
* An optional field `source`; setting this will override the source value on entries. This field must be a properly formed IPv4 or IPv6 address.
* An optional field `noparsetimestamp`; setting this to "true" will force entries to be ingested with the current timestamp rather than attempting to parse one from each entry.
* An optional field `assumelocaltimezone`; setting this to "true" means timestamps extracted from entries will assume to be in the local timezone (instead of UTC) if the timezone is not explicitly specified.

The uploaded file will be split by newlines. Each line will be ingested as an individual entry.


45 changes: 35 additions & 10 deletions api/kits.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,24 @@ type KitBuildRequest struct {
Name string
Description string
Version uint
Dashboards []uint64
MinVersion CanonicalVersion
MaxVersion CanonicalVersion
Dashboards []uint64
Templates []uuid.UUID
Pivots []uuid.UUID
Resources []string
ScheduledSearches []int32
Macros []uint64
Extractors []uuid.UUID
Files []uuid.UUID
Resources []string
ScheduledSearches []int32
Macros []uint64
SearchLibraries []uuid.UUID
Extractors []uuid.UUID
Icon string
Dependencies []KitDependency
ConfigMacros []KitConfigMacro
SearchLibraries []uuid.UUID
Playbooks []uuid.UUID
EmbeddedItems []KitEmbeddedItem
Icon string
Banner string
Cover string
Dependencies []KitDependency
ConfigMacros []KitConfigMacro
ScriptDeployRules map[int32]ScriptDeployConfig
}
```
Expand All @@ -63,6 +69,7 @@ Note that while the ID, Name, Description, and Version fields are required, the
"Description": "Test Gravwell kit",
"ID": "io.gravwell.test",
"Name": "test-gravwell",
"Description":"testing\n\n## TESTING",
"Pivots": [
"ae9f2598-598f-4859-a3d4-832a512b6104"
],
Expand All @@ -72,6 +79,23 @@ Note that while the ID, Name, Description, and Version fields are required, the
"ScheduledSearches": [
1439174790
],
"EmbeddedItems":[
{
"Name":"TEST",
"Type":"license",
"Content":"VGVzdCBsaWNlbnNlIHRoYXQgYWxsb3dzIEdyYXZ3ZWxsIHRvIGdpdmUgeW91ciBmaXJzdCBib3JuIHNvbiBhIHN0ZXJuIHRhbGtpbmcgdG8h"
}
],
"Files":[
"810a014d-1373-4d57-95b6-0638a7a01442",
"09a26a2e-e449-4857-88d1-56cede1b8d95",
"92bcfe5e-2c9a-4f39-9083-dd3f7a6f9738"
],
"MinVersion":{"Major":4,"Minor":0,"Point":0},
"MaxVersion":{"Major":4,"Minor":2,"Point":0},
"Icon":"810a014d-1373-4d57-95b6-0638a7a01442",
"Banner":"09a26a2e-e449-4857-88d1-56cede1b8d95",
"Cover":"92bcfe5e-2c9a-4f39-9083-dd3f7a6f9738",
"ScriptDeployRules": {
"1439174790": {
"Disabled": true,
Expand All @@ -80,11 +104,12 @@ Note that while the ID, Name, Description, and Version fields are required, the
},
"Version": 1
}
```

Attention: The UUIDs specified for templates, pivots, and userfiles should be the *GUIDs* associated with those structures, not the *ThingUUID* field which is also reported in a listing of items.

Attention: The UUIDs specified for Banner, Cover, and Icon must be included in the list of Files for the build request. If the build request contains references to file UUIDs that are NOT included in the main file request the API server will reject the request.

The system will respond with a structure describing the newly-built kit:

```
Expand Down
17 changes: 12 additions & 5 deletions api/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,19 +129,26 @@ This API provides some basic information for the user interface. A GET on `/api/

```
{
"DisableMapTileProxy": false,
"DistributedWebservers": false,
"MapTileUrl": "http://localhost:8080/api/maps",
"MaxFileSize": 8388608,
"MaxResourceSize": 134217728
"DisableMapTileProxy": false,
"DistributedWebservers": false,
"MapTileUrl": "http://localhost:8080/api/maps",
"MaxFileSize": 8388608,
"MaxResourceSize": 134217728,
"ServerTime": "2020-11-30T11:50:29.478092519-08:00",
"ServerTimezone": "PST",
"ServerTimezoneOffset": -28800
}
```

* `DisableMapTileProxy`, if true, tells the UI that it should send map requests directly to OpenStreetMap servers, rather than using the Gravwell proxy.
* `MapTileUrl` is the URL which the UI should use to fetch map tiles.
* `DistributedWebservers` will be set to true if there are multiple webservers coordinating via a datastore.
* `MaxFileSize` is the maximum allowable file size (in bytes) which may be uploaded to the `/api/files` APIs.
* `MaxResourceSize` is the maximum allowable resource size, in bytes.
* `ServerTime` is the current time on the webserver.
* `ServerTimezone` is the webserver's timezone.
* `ServerTimezoneOffset` is the webservers timezone offset, in seconds from UTC.

## Scripting Libraries

Expand Down
Loading

0 comments on commit a1b6978

Please sign in to comment.