Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions modules/ROOT/pages/deploy-with-tml-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ You can add multiple tags, if you'd like to add tags indicating versioning along

The `/metadata/search` REST API endpoint has parameters to filter on `tag_identifiers` and `created_by_user_identifiers`. The response from `/metadata/search` can be processed further to reduce down to the desired list of object IDs to pass to the `/metadata/tml/export` endpoint.

[,json]
[source,json]
----
{
"metadata": [
Expand All @@ -142,14 +142,20 @@ The `/metadata/search` REST API endpoint has parameters to filter on `tag_identi
],
"tag_identifiers": ["release"],
"sort_options": {
"field_name": order_field,
"field_name": "NAME",
"order": "DESC"
},
"record_size" : -1,
"record_offset": 0
"record_size": 1000,
"record_offset": 0
}
----


[CAUTION]
====
Do not set `record_size` to `-1`. On ThoughtSpot instances with a large number of objects or users, this can lead to slow responses, excessive logging, and out-of-memory failures. Specify an explicit `record_size` and iterate through pages programmatically.
====

The `author` property of an object in the REST API is the value that the `created_by_user_identifiers` parameter in the `/metadata/search` endpoint filters on. `author` can be reassigned from the original creator via the link:https://developers.thoughtspot.com/docs/restV2-playground?apiResourceId=http%2Fapi-endpoints%2Fsecurity%2Fassign-change-author[/security/metadata/assign, window=_blank] endpoint.

[#linkExportSource]
Expand Down
10 changes: 6 additions & 4 deletions modules/ROOT/pages/rest-api-v2-groups-search.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The overall structure of `groups/search` request is link:https://developers.thou

Note that many parameters in the request are *optional*, and leaving the parameter name out entirely has a different effect from including the parameter and specific values.

Throughout this article, requests and responses will be shown as JSON, without any of the code to send the requests. The v2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them. Assume every request you see has the following parameters in addition to what is shown:
This article shows requests and responses as JSON. The v2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them. Assume every request you see has the following parameters in addition to what is shown:

[source,JSON]
----
Expand All @@ -24,8 +24,10 @@ Throughout this article, requests and responses will be shown as JSON, without a
}
----

For precise results, you can set `record_size` to `-1` and `record_offset` to `0`.

[CAUTION]
====
Do not set `record_size` to `-1`. On ThoughtSpot instances with a large number of objects or users, this can lead to slow responses, excessive logging, and out-of-memory failures. Specify an explicit `record_size` and iterate through pages programmatically.
====

== Response format
The response from any call to `groups/search` will resemble the following:
Expand Down Expand Up @@ -86,7 +88,7 @@ For example, to see *all groups*, you can simply send the `record_offset` and `r
----
{
"record_offset": 0,
"record_size": 100000
"record_size": 1000
}
----

Expand Down
6 changes: 4 additions & 2 deletions modules/ROOT/pages/rest-api-v2-metadata-search.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3803,8 +3803,10 @@ By default, the following pagination settings are applied to the API response re
}
----

If you are not using filtering options such as `tag_identifiers`, `type`, `created_by_user_identifiers`, `modified_by_user_identifiers`, `owned_by_user_identifiers`, `exclude_objects`, `include_auto_created_objects`, or `favorite_object_options`, set `record_size` to `-1` and `record_offset` to `0` for precise results.

[CAUTION]
====
Do not set `record_size` to `-1`. On ThoughtSpot instances with a large number of objects or users, this can lead to slow responses, excessive logging, and out-of-memory failures. Specify an explicit `record_size` and iterate through pages programmatically.
====



7 changes: 6 additions & 1 deletion modules/ROOT/pages/rest-api-v2-search.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Some capabilities that have separate endpoints in the V1 REST API are done using

Note that many parameters in the requests are *optional*, and leaving the parameter name out entirely has a different effect from including the parameter and specific values.

Throughout this article, requests and responses will be shown as JSON, without any of the code to send the requests. The V2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them.
This page shows the requests and responses as JSON, without any of the code to send the requests. The V2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them.

Assume every request you see has the following parameters in addition to what is shown:

Expand All @@ -24,6 +24,11 @@ Assume every request you see has the following parameters in addition to what is
}
----

[CAUTION]
====
Do not set `record_size` to `-1`. On ThoughtSpot instances with a large number of objects or users, this can lead to slow responses, excessive logging, and out-of-memory failures. Specify an explicit `record_size` and iterate through pages programmatically.
====

== Search metadata
The `/metadata/search` endpoint in the V2 REST API replaces a large set of distinct endpoints in REST API V1.

Expand Down
11 changes: 7 additions & 4 deletions modules/ROOT/pages/rest-api-v2-users-search.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The overall structure of `users/search` request is link:https://developers.thoug

Note that many parameters in the request are *optional*, and leaving the parameter name out entirely has a different effect from including the parameter and specific values.

Throughout this article, requests and responses will be shown as JSON, without any of the code to send the requests. The V2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them. Assume every request you see has the following parameters in addition to what is shown:
This article shows requests and responses as JSON. The V2.0 Playground generates requests that always include the default values for any parameters that have them, but this article excludes them. Assume every request you see has the following parameters in addition to what is shown:

[source,JSON]
----
Expand All @@ -24,7 +24,10 @@ Throughout this article, requests and responses will be shown as JSON, without a
}
----

For precise results, you can set `record_size` to `-1` and `record_offset` to `0`.
[CAUTION]
====
Do not set `record_size` to `-1`. On ThoughtSpot instances with a large number of objects or users, this can lead to slow responses, excessive logging, and out-of-memory failures. Specify an explicit `record_size` and iterate through pages programmatically.
====

== Response format
The response from any call to `users/search` will resemble the following:
Expand Down Expand Up @@ -96,13 +99,13 @@ The response from any call to `users/search` will resemble the following:

The `/users/search` API performs listing functions when you do not send specific object IDs as part of your request. Note you must send some request in the body of the POST, even if this is only `{ }`.

For example, to see *all users*, you can simply send the `record_offset` and `record_size` parameters:
For example, to see *all users*, set the `record_offset` and `record_size` parameters.

[source,JSON]
----
{
"record_offset": 0,
"record_size": 100000
"record_size": 1000
}
----

Expand Down
6 changes: 3 additions & 3 deletions src/assets/styles/admonition.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}

&.caution .icon {
color: $caution-color;
color: var(--var-caution-color);
}

&.important .icon {
Expand All @@ -69,11 +69,11 @@
}

&.tip .icon {
color: $tip-color;
color: var(--var-tip-color);
}

&.warning .icon {
color: $warning-color;
color: var(--var-warning-color);
}

& > table {
Expand Down
37 changes: 28 additions & 9 deletions src/assets/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -680,29 +680,48 @@ button {
padding-bottom: 10px;
}
}
.admonitionblock.caution {
border-left: 4px solid var(--var-caution-color);
td.content {
border: 1px solid var(--caution-border-color);
box-shadow: 0 1px 1px var(--caution-border-color);
border-radius: 5px !important;
background: var(--caution-block-color);
}
td.icon {
left: 20px !important;
top: 10px !important;
padding-bottom: 10px;
}
}

.admonitionblock.warning {
border-left: 5px solid $warning-color;
border-left: 4px solid var(--var-warning-color);
td.content {
border: none !important;
border-radius: 0 !important;
box-shadow: none !important;
border: 1px solid var(--warning-border-color);
box-shadow: 0 1px 1px var(--warning-border-color);
border-radius: 5px !important;
background: var(--warning-block-color);
}
td.icon {
left: 20px !important;
top: 5px !important;
top: 10px !important;
padding-bottom: 10px;
}
}

.admonitionblock.tip {
border-left: 5px solid $tip-color;
border-left: 4px solid var(--var-tip-color);
td.content {
border: 0 !important;
border-radius: 0.5 !important;
box-shadow: none !important;
border: 1px solid var(--tip-border-color);
box-shadow: 0 1px 1px var(--tip-border-color);
border-radius: 5px !important;
background: var(--tip-block-color);
}
td.icon {
left: 20px !important;
top: 10px !important;
padding-bottom: 10px;
}
}

Expand Down
18 changes: 18 additions & 0 deletions src/assets/styles/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,15 @@ $tag-color-light: $lightgrey;
--var-important-color: #e22b3d;
--important-border-color: #cccdcd;
--important-block-color: #f1f4f8;
--var-caution-color: #ff8142;
--caution-block-color: #fff1e8;
--caution-border-color: #f7b98e;
--var-tip-color: #2f8f39;
--tip-block-color: #eefbf0;
--tip-border-color: #94d69a;
--var-warning-color: #ff8142;
--warning-block-color: #fff1e8;
--warning-border-color: #f7b98e;
--var-docmap-nested-color: #6b7280;
--box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
--box-shadow-hover: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
Expand Down Expand Up @@ -323,6 +332,15 @@ $tag-color-light: $lightgrey;
--var-important-color: #e22b3d;
--important-border-color: #30363d;
--important-block-color: #1e2430;
--var-caution-color: #ff8142;
--caution-block-color: #1e2430;
--caution-border-color: #ff8142;
--var-tip-color: #3fb950;
--tip-block-color: #1e2430;
--tip-border-color: #3fb950;
--var-warning-color: #ff8142;
--warning-block-color: #1e2430;
--warning-border-color: #ff8142;
--var-docmap-nested-color: #8b949e;
--sidebar-connector-color: #30363d;
--copy-btn-bg: #21262d;
Expand Down