<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Access and Security APIs Archives - SearchStax Docs</title>
	<atom:link href="https://www.searchstax.com/docs/category/managed-solr/mloud-manager/searchstax-api/access-and-security-apis/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>Documentation</description>
	<lastBuildDate>Fri, 10 Jul 2026 15:39:03 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://www.searchstax.com/docs/wp-content/uploads/2023/10/cropped-favicon-32x32.png</url>
	<title>Access and Security APIs Archives - SearchStax Docs</title>
	<link></link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Provisioning API &#8211; Authentication</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-authentication-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-authentication-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 10:27:07 +0000</pubDate>
				<category><![CDATA[Access and Security APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7676</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Authentication Overview The SearchStax Managed Search service provides an API supporting the creation, deletion, and management of Solr deployments. Core and Enterprise Clients Only! The SearchStax&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-authentication-api/">Continue reading <span class="screen-reader-text">Provisioning API &#8211; Authentication</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-authentication-api/">Provisioning API &#8211; Authentication</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="searchstax-managed-solr-provisioning-api-authentication">Provisioning API &#8211; Authentication</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" id="overview">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion, and management of Solr deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">The Provisioning API uses two methods of authentication appropriate to two levels of security:</p>



<ul class="wp-block-list">
<li><strong>Token Authentication:</strong>&nbsp;Use the username and password of an authorized user to obtain an&nbsp;<em>authentication token</em>. The token authorizes API calls within the normal scope of the user&#8217;s permissions. A token expires after 24 hours.</li>



<li><strong>API Key Authentication:</strong>&nbsp;The API Key authenticates a narrow set of API functions for managing Solr Basic Auth users and Zookeeper configurations in a deployment. The API Key does not expire, but it can be revoked.</li>
</ul>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatches them to a server. Among these would be the Python&nbsp;<a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a>&nbsp;package, the&nbsp;<a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a>&nbsp;tool, and&nbsp;<a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use&nbsp;<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#token">Token Authentication</a>
<ul class="wp-block-list">
<li><a href="#create-auth-token">obtain-auth-token &gt; create</a></li>



<li><a href="#verify-auth-token">verify-auth-token</a></li>
</ul>
</li>



<li><a href="#apikey">API Key Authentication</a>
<ul class="wp-block-list">
<li><a href="#createapikey">account &gt; apikey &gt; create</a></li>



<li><a href="#addkeytodeployment">account &gt; apikey &gt; associate_apikey_to_deployment</a></li>



<li><a href="#keydeployments">account &gt; apikey &gt; apikey_deployments</a></li>



<li><a href="#keydeployments">account &gt; apikey &gt; deployment_apikeys</a></li>



<li><a href="#dissociate" type="internal" id="#dissociate">account > apikey > disassociate_apikey_from_deployment</a></li>



<li><a href="#revokeapikey">account &gt; apikey &gt; revoke</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="token">Token Authentication</h2>



<p class="wp-block-paragraph">The first step in using the SearchStax API is to obtain an authentication token by logging in to the SearchStax server. The token authorizes subsequent API requests.</p>



<h3 class="wp-block-heading" id="create-auth-token">obtain-auth-token &gt; create</h3>



<p class="wp-block-paragraph">Generates an authentication token for the user of a tenant account. This token expires after 24 hours. If obtain-auth-token API is called within its 24-hour validity window, the token expiration gets extended by another 24 hours.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/obtain-auth-token/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/obtain-auth-token/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The request body should be an &#8220;application/x-www-form-urlencoded&#8221; object to accommodate the non-alphanumeric characters that sometimes appear in usernames and passwords.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>"username=&lt;username>&amp;password=&lt;password>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">&quot;username=&lt;username&gt;&amp;password=&lt;password&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">&nbsp;</p>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>username</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the email address used when you log into the SearchStax server.</td><td>&#8220;user@company.com&#8221;</td></tr><tr><td><strong>password</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the password associated with that username.</td><td>&#8220;4r36%74m&#8221;</td></tr><tr><td><strong>tfa_token</strong><br><span style="color:#32cd32" class="has-inline-color">optional</span><br>string</td><td>This is a six-digit code supplied by the Google Authenticator to enable <a href="/docs/searchstax-cloud-user-roles/#2FA">two-factor authentication.</a> Each code is good for one minute, so move fast.<br><br>The eight-character backup codes work with no time limit, but only once each.<br><br>If TFA is not enabled for this user account, this token is ignored.  </td><td>&#8220;123456&#8221;<br>or<br>&#8220;noho2x5n&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>TOKEN=$(curl -s -H "Content-Type: application/json" -X POST \
       -d "{\"username\":\"$USER\",\"password\":\"$PASSWORD\",\"tfa_token\":\"$TWOFACTOR\"}" \
       https://app.searchstax.com/api/rest/v2/obtain-auth-token/)</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">TOKEN</span><span style="color: #D73A49">=</span><span style="color: #032F62">$(</span><span style="color: #6F42C1">curl</span><span style="color: #032F62"> </span><span style="color: #005CC5">-s</span><span style="color: #032F62"> </span><span style="color: #005CC5">-H</span><span style="color: #032F62"> &quot;Content-Type: application/json&quot; </span><span style="color: #005CC5">-X</span><span style="color: #032F62"> POST </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">       </span><span style="color: #005CC5">-d</span><span style="color: #032F62"> &quot;{</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">username</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #24292E">$USER</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">password</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #24292E">$PASSWORD</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">tfa_token</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #24292E">$TWOFACTOR</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">}&quot; </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">       https://app.searchstax.com/api/rest/v2/obtain-auth-token/)</span></span></code></pre></div>



<p class="wp-block-paragraph"><em>If SearchStax will not accept your credentials from Bash, check your password for a $, !, or # character. Bash will try to interpret these characters, changing the text of the password.</em> If special characters in the password are a frequent problem, try the cURL command this way:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>TOKEN=$(curl -s -H "Content-Type: application/x-www-form-urlencoded" -X POST \
  --data-urlencode "username=$USER" \
  --data-urlencode "password=$PASSWORD" \
  --data-urlencode "tfa_token=$TWOFACTOR" \
  https://app.searchstax.com/api/rest/v1/obtain-auth-token/)</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">TOKEN</span><span style="color: #D73A49">=</span><span style="color: #032F62">$(</span><span style="color: #6F42C1">curl</span><span style="color: #032F62"> </span><span style="color: #005CC5">-s</span><span style="color: #032F62"> </span><span style="color: #005CC5">-H</span><span style="color: #032F62"> &quot;Content-Type: application/x-www-form-urlencoded&quot; </span><span style="color: #005CC5">-X</span><span style="color: #032F62"> POST </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">  </span><span style="color: #005CC5">--data-urlencode</span><span style="color: #032F62"> &quot;username=</span><span style="color: #24292E">$USER</span><span style="color: #032F62">&quot; </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">  </span><span style="color: #005CC5">--data-urlencode</span><span style="color: #032F62"> &quot;password=</span><span style="color: #24292E">$PASSWORD</span><span style="color: #032F62">&quot; </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">  </span><span style="color: #005CC5">--data-urlencode</span><span style="color: #032F62"> &quot;tfa_token=</span><span style="color: #24292E">$TWOFACTOR</span><span style="color: #032F62">&quot; </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #032F62">  https://app.searchstax.com/api/rest/v1/obtain-auth-token/)</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/obtainauthtokencreate.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$USER = "username"
$PASSWORD = "password"
$TFA = "123456"

$body = @{
    username=$USER
    password=$PASSWORD
    tfa_token=$TFA
}

$body = $body | ConvertTo-Json

$TOKEN = Invoke-RestMethod -Method Post -Body $body -ContentType 'application/json' `
        -uri "https://app.searchstax.com/api/rest/v2/obtain-auth-token/" 
$TOKEN = $TOKEN.token</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$USER </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;username&quot;</span></span>
<span class="line"><span style="color: #24292E">$PASSWORD </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;password&quot;</span></span>
<span class="line"><span style="color: #24292E">$TFA </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    username</span><span style="color: #D73A49">=</span><span style="color: #24292E">$USER</span></span>
<span class="line"><span style="color: #24292E">    password</span><span style="color: #D73A49">=</span><span style="color: #24292E">$PASSWORD</span></span>
<span class="line"><span style="color: #24292E">    tfa_token</span><span style="color: #D73A49">=</span><span style="color: #24292E">$TFA</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$TOKEN </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/obtain-auth-token/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$TOKEN </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $TOKEN.token</span></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing an authorization token.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "token": "aa70cb0a180a0532ae8855f7a1712eeceb81e080"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;token&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;aa70cb0a180a0532ae8855f7a1712eeceb81e080&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<div class="alert alert-info">
<h3>Using the token in Bash</h3>
<p>In the Bash scripts, the authorization token is incorporated directly in the header of the cURL call:</p>
<pre><code>    curl -s -H "Authorization: Token $TOKEN" etc.</code></pre>
</div>



<div class="alert alert-info">
<h3>Using the token in PowerShell</h3>
<p>In the PowerShell scripts, we use the token by assembling a header for the Invoke-RestMethod call. Note that <strong>$TOKEN.token</strong> extracts the actual token number from the Json response.</p>
<pre><code>
$TOKEN = $TOKEN.token

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "Token $TOKEN")

$RESULTS = Invoke-RestMethod -Headers $headers etc. </code></pre>
</div>



<p class="wp-block-paragraph"></p>



<h3 class="wp-block-heading" id="verify-auth-token">verify-auth-token</h3>



<p class="wp-block-paragraph">Verifies if the auth token is valid, or needs to be regenerated.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/verify-auth-token/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/verify-auth-token/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The Authorization header should be passed with the token to verify.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>Authorization "Token &lt;token>"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292e">Authorization &quot;Token &lt;token&gt;&quot;</span></span>
<span class="line"><span style="color: #24292e"></span></span></code></pre></div>



<p class="wp-block-paragraph">&nbsp;</p>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>token</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>The token to verify</td><td>&#8220;XyZ190189898njjhjhjhjhjhj&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph"></p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl -s -H "Content-Type: application/json" -X GET  \
   -H 'authorization: Token a34085b3f9138e35c38c5acc57cdbcf94f9ec6f2' \
   https://app.searchstax.com/api/rest/v2/verify-auth-token/</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-s</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E">  </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">   </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;authorization: Token a34085b3f9138e35c38c5acc57cdbcf94f9ec6f2&#39;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">   </span><span style="color: #032F62">https://app.searchstax.com/api/rest/v2/verify-auth-token/</span></span></code></pre></div>



<p class="wp-block-paragraph">When run from Windows (PowerShell):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$TOKEN = "a34085b3f9138e35c95338cc57cdbcf94f9ec6f2"

$headers = New-Object "System.Collections.Generic.Dictionary[&#91;String&#93;,&#91;String&#93;]"
$headers.Add("Authorization", "Token $TOKEN")

Write-Host "Verifying an authentication token..."
Write-Host

$RESULT = Invoke-RestMethod -uri "https://app.searchstax.com/api/rest/v2/verify-auth-token/" `
        -Method Get -Headers $headers #-ContentType 'application/json' 

$RESULT = $RESULT | ConvertTo-Json</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$TOKEN </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;a34085b3f9138e35c95338cc57cdbcf94f9ec6f2&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$headers </span><span style="color: #D73A49">=</span><span style="color: #24292E"> New</span><span style="color: #D73A49">-</span><span style="color: #24292E">Object </span><span style="color: #032F62">&quot;System.Collections.Generic.Dictionary[&#91;String&#93;,&#91;String&#93;]&quot;</span></span>
<span class="line"><span style="color: #24292E">$headers.</span><span style="color: #6F42C1">Add</span><span style="color: #24292E">(</span><span style="color: #032F62">&quot;Authorization&quot;</span><span style="color: #24292E">, </span><span style="color: #032F62">&quot;Token $TOKEN&quot;</span><span style="color: #24292E">)</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">Write</span><span style="color: #D73A49">-</span><span style="color: #24292E">Host </span><span style="color: #032F62">&quot;Verifying an authentication token...&quot;</span></span>
<span class="line"><span style="color: #24292E">Write</span><span style="color: #D73A49">-</span><span style="color: #24292E">Host</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> Invoke</span><span style="color: #D73A49">-</span><span style="color: #24292E">RestMethod </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/verify-auth-token/&quot;</span><span style="color: #24292E"> </span><span style="color: #032F62">`</span></span>
<span class="line"><span style="color: #032F62">        -Method Get -Headers $headers #-ContentType &#39;application/json&#39; </span></span>
<span class="line"></span>
<span class="line"><span style="color: #032F62">$RESULT = $RESULT | ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON with the expiry information of the token</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "token": {
        "key": "YXBwNDAtYXBpOmdUSG8xNyNrdXU4",
        "created": "2024-03-31T23:46:28Z",
        "duration_days":1,
        "expires": "2024-04-01T23:46:28Z"
    }
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;token&quot;</span><span style="color: #24292E">: {</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;key&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;YXBwNDAtYXBpOmdUSG8xNyNrdXU4&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2024-03-31T23:46:28Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;duration_days&quot;</span><span style="color: #24292E">:</span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">        </span><span style="color: #005CC5">&quot;expires&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2024-04-01T23:46:28Z&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph"></p>



<h2 class="wp-block-heading" id="apikey">API Key Authentication</h2>



<p class="wp-block-paragraph">An API Key is a non-expiring authorization allowing certain non-SearchStax users to perform a <em>specific set</em> of API operations on <em>specific deployments</em> of a <em>specific account</em>. If you step outside of that scope, you will see an <a href="https://www.searchstax.com/docs/hc/api-key-is-not-valid-for-required-scope/">Out of Scope</a> error. </p>



<p class="wp-block-paragraph">In a little more detail:</p>



<ul class="wp-block-list">
<li>You must be the Owner or an Admin of a Core or Enterprise account to generate an API Key. </li>



<li>You will need <a href="#token">Token Authentication</a> to create the API Key. </li>



<li>The API Key by itself is not good for anything. The account Owner or an Admin must <a href="#addkeytodeployment">associate the API Key</a> with a specific deployment before the key becomes active. </li>



<li>At this point, anyone who possesses the API Key (anyone at all) can use SearchStax Provisioning API methods to:
<ul class="wp-block-list">
<li>Manage <a href="https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/">Solr Basic Auth</a> users on that specific deployment. </li>



<li>Manage <a href="https://www.searchstax.com/docs/searchstax-cloud-zookeeper-api/">Solr configurations</a> on Zookeeper in that specific deployment.</li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Note that the API Key is good for absolutely nothing else. </p>



<p class="wp-block-paragraph">Procedure for creating an APIkey:</p>



<ol class="wp-block-list">
<li><a href="#token">Obtain an authentication Token</a>.</li>



<li><a href="#createapikey">Generate an APIkey</a>.</li>



<li><a href="#addkeytodeployment">Associate the APIkey with a specific deployment</a>.</li>
</ol>



<p class="wp-block-paragraph">Once the APIkey has been associated with a deployment, you can view the APIkey under the&nbsp;<strong>Security</strong>&nbsp;menu for that deployment in the Managed Search dashboard.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="541" src="https://www.searchstax.com/docs/wp-content/uploads/2024/06/APIkey-1-1024x541.png" alt="" class="wp-image-18968" srcset="https://www.searchstax.com/docs/wp-content/uploads/2024/06/APIkey-1-1024x541.png 1024w, https://www.searchstax.com/docs/wp-content/uploads/2024/06/APIkey-1-300x159.png 300w, https://www.searchstax.com/docs/wp-content/uploads/2024/06/APIkey-1-768x406.png 768w, https://www.searchstax.com/docs/wp-content/uploads/2024/06/APIkey-1.png 1200w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading" id="createapikey">account &gt; apikey &gt; create</h3>



<p class="wp-block-paragraph">This method creates an API Key based on a valid authentication token.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;scope&#8221;:[&#8220;deployment.dedicateddeployment&#8221;]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;scope&quot;</span><span style="color: #24292E">:[</span><span style="color: #032F62">&quot;deployment.dedicateddeployment&quot;</span><span style="color: #24292E">]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th>Parameter</th><th>Description</th></tr></thead><tbody><tr><td><strong>scope</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>list of strings</td><td>The scope in which this API key will be effective. Default value is&nbsp;<strong>deployment.dedicateddeployment</strong>.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/" \
  --header "Authorization: Token &lt;token>" \
  --header "Content-Type: application/json" \
  --data "{
    \"scope\":&#91;\"deployment.dedicateddeployment\"&#93;
}"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">scope</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:&#91;</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">deployment.dedicateddeployment</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">&#93;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountcreateapikey.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$body = @{
    scope=@(&#8216;deployment.dedicateddeployment&#8217;)   # Force single-value to be a list
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    scope</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;deployment.dedicateddeployment&#39;</span><span style="color: #24292E">)   </span><span style="color: #6A737D"># Force single-value to be a list</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{ &#8220;apikey&#8221;: &#8220;eyJhbGciOiJIUzVCJ9.eyJpYXQiOjE1NDMyNDc0ODMsImp0aSI6IjhmYTlkZThjNTIyNjRjZTc2Njg0NTkyMWQ4MTQ0MDY5ZThkMjc5NmMiLCJzY29wZSI6WyJkZXBsb3ltZW50LmRlZGljYXRlZGRlcGxveW1lbnQiXSwiQ1MrdThSZmlNTzMwNnZJM082QSJ9.r6X7bJi_ZWGR99XC0Ac&#8221; }</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{ </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;eyJhbGciOiJIUzVCJ9.eyJpYXQiOjE1NDMyNDc0ODMsImp0aSI6IjhmYTlkZThjNTIyNjRjZTc2Njg0NTkyMWQ4MTQ0MDY5ZThkMjc5NmMiLCJzY29wZSI6WyJkZXBsb3ltZW50LmRlZGljYXRlZGRlcGxveW1lbnQiXSwiQ1MrdThSZmlNTzMwNnZJM082QSJ9.r6X7bJi_ZWGR99XC0Ac&quot;</span><span style="color: #24292E"> }</span></span></code></pre></div>



<div class="alert alert-info">
<h3>Using the API key in Bash</h3>
<p>In the Bash scripts, we use the API key directly in the header of the cURL call:</p>
<pre><code> curl -s -H "Authorization: APIkey $APIKEY" etc.</code></pre>
</div>



<div class="alert alert-info">
<h3>Using the API key in PowerShell</h3>
<p>In the PowerShell scripts, we use the API key by assembling a header and using it in the Invoke-RestMethod call:</p>
<pre><code> $headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "APIkey $APIKEY")

$RESULTS = Invoke-RestMethod -Headers $headers etc. </code></pre>
</div>



<h3 class="wp-block-heading" id="addkeytodeployment">account &gt; apikey &gt; associate_apikey_to_deployment</h3>



<p class="wp-block-paragraph">This method associates an API key to a specific deployment. Note that an API key can be associated with multiple deployments, but each deployment can be associated with only one API key at a time.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/associate/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/associate/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method requires&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "apikey": "eyJhbGciOiJI6IkpXVCJ9...",
    "deployment": "ss123456"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>apikey</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the API key that needs to be associated with the deployment.</td><td>&#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;</td></tr><tr><td><strong>deployment</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the UID of the deployment.</td><td>&#8220;ss123456&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl -s -H "Content-Type: application/json" \
     -H "Authorization: Token $TOKEN" -X POST \
     -d "{\"apikey\":\"$APIKEY\", \"deployment\":\"$uid\"}" \
     https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/associate/</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-s</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">     </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token </span><span style="color: #24292E">$TOKEN</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">     </span><span style="color: #005CC5">-d</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">apikey</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #24292E">$APIKEY</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">, </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">deployment</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">:</span><span style="color: #005CC5">\&quot;</span><span style="color: #24292E">$uid</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">}&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">     </span><span style="color: #032F62">https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/associate/</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountapikeyassociateapikeytodeployment.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$body = @{
    apikey=$APIKEY
    deployment=$uid
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod  -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/associate/"

$RESULT = $RESULT | ConvertTo-Json 
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    apikey</span><span style="color: #D73A49">=</span><span style="color: #24292E">$APIKEY</span></span>
<span class="line"><span style="color: #24292E">    deployment</span><span style="color: #D73A49">=</span><span style="color: #24292E">$uid</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E">  </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/associate/&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of deployments associated with this key.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "deployments": &#91; "ssXXXXX1", "ssXXXXX2"&#93;
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployments&quot;</span><span style="color: #24292E">: &#91; </span><span style="color: #032F62">&quot;ssXXXXX1&quot;</span><span style="color: #24292E">, </span><span style="color: #032F62">&quot;ssXXXXX2&quot;</span><span style="color: #24292E">&#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">Note that a deployment may be associated with only one API key at a time. Attempting to associate a second API key results in an error message:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "detail": "Deployment is already associated to another API key."
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">&quot;detail&quot;</span><span style="color: #005CC5">:</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Deployment is already associated to another API key.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="keydeployments">account &gt; apikey &gt; apikey_deployments</h3>



<p class="wp-block-paragraph">This method lists the deployments associated with the given API key.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/deployments/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/deployments/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "apikey" : "eyJhbGciOiJI6IkpXVCJ9..."
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th>Parameter</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td><strong>apikey</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the API key that is associated with the deployments.</td><td>&#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/deployments/" \
  --header "Authorization: Token &lt;token>" \
  --header "Content-Type: application/json" \
  --data "{ \"apikey\" : \"eyJhbGciOiJI6IkpXVCJ9...\" }"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/deployments/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{ </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">apikey</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">eyJhbGciOiJI6IkpXVCJ9...</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> }&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountapikeyapikeydeployments.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$APIKEY = "eyJhbGciOiJI6IkpXVCJ9..."

$body = @{
    apikey=$APIKEY
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/deployments/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$APIKEY </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    apikey</span><span style="color: #D73A49">=</span><span style="color: #24292E">$APIKEY</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/deployments/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of deployment UIDs.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "deployments": &#91; "ss123456" &#93;
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployments&quot;</span><span style="color: #24292E">: &#91; </span><span style="color: #032F62">&quot;ss123456&quot;</span><span style="color: #24292E"> &#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">If the <strong>username</strong> or <strong>account name</strong> is in error, the API returns this message:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "detail": "You do not have permission to perform this action."
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">&quot;detail&quot;</span><span style="color: #005CC5">:</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;You do not have permission to perform this action.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<p class="wp-block-paragraph">If the lengthy API key string is in error (usually a line break), the API returns this error:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{"apikey":&#91;"Error decoding signature. Unknown API Key"&#93;}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span><span style="color: #6F42C1">&quot;apikey&quot;</span><span style="color: #005CC5">:</span><span style="color: #24292E">&#91;</span><span style="color: #6F42C1">&quot;Error decoding signature. Unknown API Key&quot;</span><span style="color: #6F42C1">&#93;}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="removefromdeployment">account &gt; apikey &gt; deployment_apikeys</h3>



<p class="wp-block-paragraph">This method lists the API key that is associated with a deployment. Each deployment may be associated with only one API key at a time.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/list/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/list/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "deployment" : "ss123456"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>deployment</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the UID of the deployment.</td><td>&#8220;ss123456&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/list/" \
  --header "Authorization: Token &lt;token>" \
  --header "Content-Type: application/json" \
  --data "{ \"deployment\" : \"ss123456\" }"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/list/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{ </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">deployment</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">ss123456</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> }&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountapikeydeploymentapikeys.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"

$body = @{
    deployment=$uid
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/list/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    deployment</span><span style="color: #D73A49">=</span><span style="color: #24292E">$uid</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/list/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing the API key associated with the deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "apikey": &#91; "eyJhbGciOiJI6IkpXVCJ9..." &#93;
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E">: &#91; </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span><span style="color: #24292E"> &#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="dissociate">account &gt; apikey &gt; disassociate_apikey_from_deployment</h3>



<p class="wp-block-paragraph">This method disassociates an API key from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/disassociate/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/disassociate/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "apikey" : "eyJhbGciOiJI6IkpXVCJ9...",
    "deployment": "ss123456"
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;deployment&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>apikey</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the API key that needs to be disassociated from the deployment.</td><td>&#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;</td></tr><tr><td><strong>deployment</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the UID of the deployment.</td><td>&#8220;ss123456&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl --request POST "https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/disassociate/" \
  --header "Authorization: Token &lt;token>" \
  --header "Content-Type: application/json" \
  --data "{
    \"apikey\" : \"eyJhbGciOiJI6IkpXVCJ9...\",
    \"deployment\": \"ss123456\"
}"
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/disassociate/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">apikey</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">eyJhbGciOiJI6IkpXVCJ9...</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">deployment</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">: </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">ss123456</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountapikeydisassociateapikeyfromdeployment.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$ACCOUNT = "AccountName"
$uid = "ss123456"
$APIKEY = "eyJhbGciOiJI6IkpXVCJ9..."

$body = @{
    apikey=$APIKEY
    deployment=$uid
}

$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType 'application/json' -Headers $headers `
         -uri "https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/disassociate/" 
$RESULT = $RESULT | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"><span style="color: #24292E">$APIKEY </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    apikey</span><span style="color: #D73A49">=</span><span style="color: #24292E">$APIKEY</span></span>
<span class="line"><span style="color: #24292E">    deployment</span><span style="color: #D73A49">=</span><span style="color: #24292E">$uid</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/disassociate/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of deployments with which the API key is still associated.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "deployments": &#91;
    "ssXXXXX1",
    "ssXXXXX2",
    "ssXXXXX3"
  &#93;
}
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;deployments&quot;</span><span style="color: #24292E">: &#91;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;ssXXXXX1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;ssXXXXX2&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #032F62">&quot;ssXXXXX3&quot;</span></span>
<span class="line"><span style="color: #24292E">  &#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="revokeapikey">account &gt; apikey &gt; revoke</h3>



<p class="wp-block-paragraph">This method revokes an API key.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/revoke/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/revoke/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="#token">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;apikey&#8221; : &#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;apikey&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>apikey</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the API key to revoke.</td><td>&#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/apikey/revoke/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;apikey\&#8221; : \&#8221;eyJhbGciOiJI6IkpXVCJ9&#8230;\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/apikey/revoke/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">apikey</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">eyJhbGciOiJI6IkpXVCJ9...</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountapikeyrevoke.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$APIKEY = &#8220;eyJhbGciOiJI6IkpXVCJ9&#8230;&#8221;
$body = @{
    apikey=$APIKEY
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/apikey/revoke/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$APIKEY </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;eyJhbGciOiJI6IkpXVCJ9...&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    apikey</span><span style="color: #D73A49">=</span><span style="color: #24292E">$APIKEY</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/apikey/revoke/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a success/failure message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;success&#8221;: &#8220;API Key revoked successfully.&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;API Key revoked successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the&nbsp;<a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20Provisioning%20API%20–%20Authentication" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-authentication-api/">Provisioning API &#8211; Authentication</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-authentication-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SearchStax Users API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-users-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-users-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 10:23:05 +0000</pubDate>
				<category><![CDATA[Access and Security APIs]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7669</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Users Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of SearchStax Managed Search service deployments. Core and Enterprise Clients&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-users-api/">Continue reading <span class="screen-reader-text">SearchStax Users API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-users-api/">SearchStax Users API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="searchstax-managed-solr-api-users">Provisioning API &#8211; Users</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" id="overview">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of SearchStax Managed Search service deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to manage the users of a SearchStax account through the API.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python&nbsp;<a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a>&nbsp;package, the&nbsp;<a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a>&nbsp;tool, and&nbsp;<a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use&nbsp;<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#users">Users</a>
<ul class="wp-block-list">
<li><a href="#listusers">users &gt; list</a></li>



<li><a href="#h-users-gt-add-user-gt-create" type="internal" id="#h-users-gt-add-user-gt-create">users &gt; add-user &gt; create</a></li>



<li><a href="#changepasswordcreate">users &gt; change-password &gt; create</a></li>



<li><a href="#setrolecreate">users &gt; set-role &gt; create</a></li>



<li><a href="#deleteusers">users &gt; delete</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="users">Users</h2>



<p class="wp-block-paragraph">The SearchStax Provisioning API provides methods for managing the users of a SearchStax Account from a remote application.</p>



<h3 class="wp-block-heading" id="listusers">users &gt; list</h3>



<p class="wp-block-paragraph">This method lists the SearchStax users for an account.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/users/?account=&lt;account_name></textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/users/?account=&lt;account_name&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>?account=&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET https://app.searchstax.com/api/rest/users/?account=$ACCOUNT 
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; </textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">https://app.searchstax.com/api/rest/users/?account=</span><span style="color: #24292E">$ACCOUNT </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/userslist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$RESULT = Invoke-RestMethod -Method Get -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/users/?account=$ACCOUNT&#8221; 
$RESULT = $RESULT | ConvertTo-Json</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing the SearchStax users of the account and their details:</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow">
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
  "success": true,
  "users": &#91;
    {
      "firstname": "FirstName",
      "lastname": "LastName",
      "email": "user@company.com",
      "role": "Team Member",
      "sitesearch_role": "Team Member",
      "tfa_enabled": false,
      "phone": "123-456-7890",
      "company": "Company",
      "id": 3201,
      "last_login": "2025-09-19T16:09:15Z",
      "created": "2021-01-06T19:51:28Z",
      "invitation_status": "Completed",
      "role_in_organization": "Engineer"
    }
  &#93;
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;users&quot;</span><span style="color: #24292E">: &#91;</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;firstname&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;FirstName&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;lastname&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;LastName&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;user@company.com&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;role&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Team Member&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;sitesearch_role&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Team Member&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;tfa_enabled&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">false</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;phone&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;123-456-7890&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;company&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Company&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">3201</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;last_login&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2025-09-19T16:09:15Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;created&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2021-01-06T19:51:28Z&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;invitation_status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Completed&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;role_in_organization&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Engineer&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  &#93;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>
</div>
</div>
</div></div>
</div>
</div>



<h3 class="wp-block-heading" id="h-users-gt-add-user-gt-create">users &gt; add-user &gt; create</h3>



<p class="wp-block-paragraph">This method invites a new user to join an existing tenant account. </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/users/add-user?account=&lt;account_name></textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/users/add-user?account=&lt;account_name&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>?account=&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;email&#8221;: &#8220;user@company.com&#8221;,
    &#8220;role&#8221;: &#8220;Admin&#8221;,
    &#8220;first_name&#8221;: &#8220;First&#8221;,
    &#8220;last_name&#8221;: &#8220;Last&#8221;,    
    &#8220;phone_number&#8221;: &#8220;8005551212&#8221;
}</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;email&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;user@company.com&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;role&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Admin&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;first_name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;First&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;last_name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Last&quot;</span><span style="color: #24292E">,    </span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;phone_number&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;8005551212&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th></tr></thead><tbody><tr><td><strong>email</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>The user&#8217;s email.</td></tr><tr><td><strong>role</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>One of &#8216;Admin&#8217;, &#8216;Technical Contact&#8217;, &#8216;Billing Member&#8217;, &#8216;Team Member&#8217;.</td></tr><tr><td><strong>first_name</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>User&#8217;s first name.</td></tr><tr><td><strong>last_name</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>User&#8217;s last name.</td></tr><tr><td><strong>phone_number</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#32cd32" class="has-inline-color">optional</mark><br>string</td><td>User&#8217;s phone number.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl -s -H &#8220;Authorization: Token $TOKEN&#8221; -H &#8220;Content-Type: application/json&#8221; -d &#8220;${BODY}&#8221; 
-X POST https://app.searchstax.com/api/rest/users/add-user?account=$ACCOUNT</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-s</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token </span><span style="color: #24292E">$TOKEN</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-d</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;${</span><span style="color: #24292E">BODY</span><span style="color: #032F62">}&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #6F42C1">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">https://app.searchstax.com/api/rest/users/add-user?account=</span><span style="color: #24292E">$ACCOUNT</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/usersadd-usercreate.ps1">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$body = @{
    email=&#8217;user@company.com&#8217;
    role=&#8217;Admin&#8217;
    first_name=&#8217;First&#8217;
    last_name=&#8217;Last&#8217;    
    phone_number=&#8217;8005551212&#8242;
}
$body = $body | ConvertTo-Json
$RESULTS = Invoke-RestMethod -Method Post -Body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/users/add-user?account=$ACCOUNT&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    email</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;user@company.com&#39;</span></span>
<span class="line"><span style="color: #24292E">    role</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Admin&#39;</span></span>
<span class="line"><span style="color: #24292E">    first_name</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;First&#39;</span></span>
<span class="line"><span style="color: #24292E">    last_name</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Last&#39;</span><span style="color: #24292E">    </span></span>
<span class="line"><span style="color: #24292E">    phone_number</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;8005551212&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/add-user?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;success&#8221;: true,
  &#8220;message&#8221;: &#8220;User &#8216;user@company.com&#8217; invited successfully.&#8221;
}</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;User &#39;user@company.com&#39; invited successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<h3 class="wp-block-heading" id="changepasswordcreate">users &gt; change-password &gt; create</h3>



<p class="wp-block-paragraph">This method allows an authenticated user to change his own password. It is not possible to change someone else&#8217;s password.  </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/users/change-password?account=&lt;account_name>&amp;id=&lt;id></textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/users/change-password?account=&lt;account_name&gt;&amp;id=&lt;id&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>?account=&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and <strong>id=&lt;id&gt;</strong> is the user identification number obtained from <a href="#listusers">users &gt; list</a>. </p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following item:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "password": "NewPasswordString"
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;password&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;NewPasswordString&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th></tr></thead><tbody><tr><td><strong>password</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>The desired new password. The password should contain at least one upper-case letter, one lower-case letter, one number, one special character and be from 15 and 64 characters long.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>curl -s -H "Authorization: Token $TOKEN" -H "Content-Type: application/json" -d '{"password": "NewPasswordString"}' /
-X POST "https://app.searchstax.com/api/rest/users/change-password?account=$ACCOUNT&amp;$ID"</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-s</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token </span><span style="color: #24292E">$TOKEN</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-d</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;password&quot;: &quot;NewPasswordString&quot;}&#39;</span><span style="color: #24292E"> </span><span style="color: #032F62">/</span></span>
<span class="line"><span style="color: #6F42C1">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/change-password?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&amp;</span><span style="color: #24292E">$ID</span><span style="color: #032F62">&quot;</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/userschange-passwordcreate.ps1">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>$body = @{
    password='NewPasswordString'
}

$body = $body | ConvertTo-Json

$RESULTS = Invoke-RestMethod -Method Post -Body $body -ContentType 'application/json' -Headers $headers `
          -uri "https://app.searchstax.com/api/rest/users/change-password?account=$ACCOUNT&amp;id=$ID" 
 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    password</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;NewPasswordString&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/change-password?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&amp;id=</span><span style="color: #24292E">$ID</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>{
    "success":  true,
    "message":  "Password changed successfully."
}</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">:  </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:  </span><span style="color: #032F62">&quot;Password changed successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<p class="wp-block-paragraph">If you received an error saying, &#8220;<code>You can not change password for another user</code>,&#8221; check to be sure the URL is within double-quotes. If not, everything to the right of the ampersand (&amp;) will be truncated, usually resulting in the loss of the user ID. </p>



<h3 class="wp-block-heading" id="setrolecreate">users &gt; set-role &gt; create</h3>



<div class="alert alert-info">
<h3>Managed Search User Roles</h3>
<p>For background on user roles in Managed Search, see <a href="https://www.searchstax.com/blog/role-based-user-roles-for-your-searchstax-team/">Role-based User Roles for Your SearchStax Team</a> and <a href="https://www.searchstax.com/docs/searchstax-cloud-user-roles/#userroles">User Management</a>.</p>
</div>



<p class="wp-block-paragraph">This method allows an Author or Admin to change the role of one or more account users.  </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/users/set-role/?account=&lt;account_name></textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/users/set-role/?account=&lt;account_name&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>?account=&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account.. </p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following item:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;id&#8221;: &#8220;2178,2067,3385&#8221;,
    &#8220;role&#8221;: &#8220;Team Member&#8221;
}</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;2178,2067,3385&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;role&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Team Member&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th></tr></thead><tbody><tr><td><strong>id</strong><br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>A comma-separated list of user ID numbers obtained from <a href="#listusers">users &gt; list</a>.  </td></tr><tr><td>role<br><mark style="background-color:rgba(0, 0, 0, 0);color:#ff0000" class="has-inline-color">required</mark><br>string</td><td>One of Admin, Technical Contact, Billing Member, Team Member, Marketer. All users in the <strong>id</strong> list will be assigned to this role.</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl -s -H &#8220;Authorization: Token $TOKEN&#8221; -H &#8220;Content-Type: application/json&#8221; -d &#8220;${BODY}&#8221; 
-X POST &#8220;https://app.searchstax.com/api/rest/users/set-role?account=$ACCOUNT&#8221;</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-s</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token </span><span style="color: #24292E">$TOKEN</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-d</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;${</span><span style="color: #24292E">BODY</span><span style="color: #032F62">}&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #6F42C1">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/set-role?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&quot;</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/usersset-rolecreate.ps1">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$body = @{
    id=&#8217;2178,2067,3385&#8242;
    role=&#8217;Team Member&#8217;
}
$body = $body | ConvertTo-Json
$RESULTS = Invoke-RestMethod -Method Post -Body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/users/set-role?account=$ACCOUNT&#8221; 
 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    id</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;2178,2067,3385&#39;</span></span>
<span class="line"><span style="color: #24292E">    role</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Team Member&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">Body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/set-role?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success/failure message for each user.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>&#91;
  {
    "id": 2178,
    "success": true,
    "message": "Role updated successfully."
  },
  {
    "id": 2067,
    "success": false,
    "message": "User id 2067 does not exist."
  },
  {
    "id": 3385,
    "success": true,
    "message": "Role updated successfully."
  }
&#93;
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">&#91;</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2178</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Role updated successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">  },</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2067</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">false</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;User id 2067 does not exist.&quot;</span></span>
<span class="line"><span style="color: #24292E">  },</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">3385</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Role updated successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">  }</span></span>
<span class="line"><span style="color: #24292E">&#93;</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deleteusers">users &gt; delete</h3>



<p class="wp-block-paragraph">This method deletes a SearchStax user from an Account.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>DELETE https://app.searchstax.com/api/rest/users/?account=&lt;account_name>&amp;id=&lt;user_id></textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">DELETE</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/users/?account=&lt;account_name&gt;&amp;id=&lt;user_id&gt;</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>?account=&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&amp;id=&lt;user_id&gt;</strong>&nbsp;is the ID of the user.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl -H &#8220;Content-Type: application/json&#8221; -H &#8220;Authorization: Token $TOKEN&#8221; 
     -X DELETE &#8220;https://app.searchstax.com/api/rest/users/?account=$ACCOUNT&amp;id=$DELUSER&#8221;</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">-H</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token </span><span style="color: #24292E">$TOKEN</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">     </span><span style="color: #6F42C1">-X</span><span style="color: #24292E"> </span><span style="color: #032F62">DELETE</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&amp;id=</span><span style="color: #24292E">$DELUSER</span><span style="color: #032F62">&quot;</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/usersdelete.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$DELUSER = &#8220;1234&#8221;
$RESULT = Invoke-RestMethod -Method Delete -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/users/?account=$ACCOUNT&amp;id=$DELUSER&#8221; 
$RESULT = $RESULT | ConvertTo-Json</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$DELUSER </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;1234&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Delete </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/users/?account=</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">&amp;id=</span><span style="color: #24292E">$DELUSER</span><span style="color: #032F62">&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow" style="flex-basis:100%">
<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
   &#8220;id&#8221;:3204,
   &#8220;success&#8221;:true,
   &#8220;message&#8221;:&#8221;User deleted successfully.&#8221;
}</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">   </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">:</span><span style="color: #005CC5">3204</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">   </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">:</span><span style="color: #005CC5">true</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">   </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">:</span><span style="color: #032F62">&quot;User deleted successfully.&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span></code></pre></div>
</div>
</div>
</div>
</div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the&nbsp;<a href="mailto:support@searchstax.com?subject=ASearchStax%20Cloud%20API%20–%20Users" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-users-api/">SearchStax Users API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-users-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr Basic Auth API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 10:10:05 +0000</pubDate>
				<category><![CDATA[Access and Security APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7660</guid>

					<description><![CDATA[<p>Provisioning API &#8211; Basic Auth Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/">Continue reading <span class="screen-reader-text">Solr Basic Auth API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/">Solr Basic Auth API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-provisioning-api-basic-auth">Provisioning API &#8211; Basic Auth</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to manage <a href="https://www.searchstax.com/docs/searchstax-cloud-deployment-security/">Solr Basic Auth</a> features through the API.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python&nbsp;<a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a>&nbsp;package, the&nbsp;<a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a>&nbsp;tool, and&nbsp;<a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use&nbsp;<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="https://www.searchstax.com/docs/userroles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#solr-basic-auth">Solr Basic Auth</a>
<ul class="wp-block-list">
<li><a href="#enablesolrauth">account &gt; deployment &gt; solr &gt; auth &gt; enable_basic_auth</a></li>



<li><a href="#disablesolrauth">account &gt; deployment &gt; solr &gt; auth &gt; disable_basic_auth</a></li>



<li><a href="#addsolruser">account &gt; deployment &gt; solr &gt; auth &gt; add_solr_user</a></li>



<li><a href="#deletesolruser">account &gt; deployment &gt; solr &gt; auth &gt; delete_solr_user</a></li>



<li><a href="#getsolrusers">account &gt; deployment &gt; solr &gt; auth &gt; get_solr_users</a></li>



<li><a href="#setsolrpassword">account &gt; deployment &gt; solr &gt; auth &gt; set_solr_user_password</a></li>



<li><a href="#setsolrrole">account &gt; deployment &gt; solr &gt; auth &gt; set_solr_user_role</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts A</a><a href="/docs/staxapi2alerts/">P</a><a href="https://www.searchstax.com/docs/staxapi2alerts/">I</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="solr-basic-auth">Solr Basic Auth</h2>



<p class="wp-block-paragraph">The SearchStax Provisioning API provides a selection of methods for managing Solr basic authentication from a remote application.</p>



<h3 class="wp-block-heading" id="enablesolrauth">account &gt; deployment &gt; solr &gt; auth &gt; enable_basic_auth</h3>



<p class="wp-block-paragraph">This method enables basic auth for a Solr deployment. Note that this process takes Solr offline for about 30 seconds to restart it. </p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/enable/
</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/enable/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/enable/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; </textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/enable/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthenablebasicauth.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$RESULT = Invoke-RestMethod -Method Get -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/enable/&#8221; 
$RESULT = $RESULT | ConvertTo-Json</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/enable/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Basic authentication successfully Enabled for Solr&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Basic authentication successfully Enabled for Solr&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="disablesolrauth">account &gt; deployment &gt; solr &gt; auth &gt; disable_basic_auth</h3>



<p class="wp-block-paragraph">This method disables basic auth for a Solr deployment. Note that this process takes Solr offline for about 30 seconds to restart it.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/disable/</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/disable/</span></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/disable/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; \</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/disable/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthdisablebasicauth.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$RESULT = Invoke-RestMethod -Method Get -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/disable/&#8221; 
$RESULT = $RESULT | ConvertTo-Json</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/disable/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Basic authentication successfully Disabled for Solr&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Basic authentication successfully Disabled for Solr&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="addsolruser">account &gt; deployment &gt; solr &gt; auth &gt; add_solr_user</h3>



<p class="wp-block-paragraph">This method adds a Solr user to the deployment. Basic auth must be enabled.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/add-user/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/add-user/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;username&#8221; : &#8220;demoSolrUser&#8221;,
    &#8220;password&#8221; : &#8220;test123&#8221;,
    &#8220;role&#8221; : &#8220;Admin&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;username&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;demoSolrUser&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;password&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;test123&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;role&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;Admin&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>username</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user name.</td><td>&#8220;demoSolrUser&#8221;</td></tr><tr><td><strong>password</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user&#8217;s password.</td><td>&#8220;test123&#8221;</td></tr><tr><td><strong>role</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr role: Admin, Read, Write, or ReadWrite.</td><td>&#8220;Admin&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">See&nbsp;<a href="/docs/searchstax-cloud-deployment-security/#solrauth/">Solr Basic Authentication</a>&nbsp;for an explanation of the Solr roles.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/add-user/&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;username\&#8221; : \&#8221;demoSolrUser\&#8221;,
    \&#8221;password\&#8221; : \&#8221;test123\&#8221;,
    \&#8221;role\&#8221; : \&#8221;Admin\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/add-user/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">username</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demoSolrUser</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">password</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">test123</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">role</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">Admin</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthaddsolruser.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    username=&#8217;demoSolrUser&#8217;
    password=&#8217;test123&#8242;
    role=&#8217;Admin&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/add-user/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    username</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demoSolrUser&#39;</span></span>
<span class="line"><span style="color: #24292E">    password</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;test123&#39;</span></span>
<span class="line"><span style="color: #24292E">    role</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Admin&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/add-user/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;User successfully added&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;User successfully added&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="deletesolruser">account &gt; deployment &gt; solr &gt; auth &gt; delete_solr_user</h3>



<p class="wp-block-paragraph">This method deletes a Solr user from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/delete-user/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/delete-user/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; auto-links: false; title: ; notranslate">
{
    &quot;username&quot; : &quot;demoSolrUser&quot;
}

</pre></div>


<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr><th><strong>Parameter</strong></th><th><strong>Description</strong></th><th><strong>Example</strong></th></tr></thead><tbody><tr><td><strong>username</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user name.</td><td>&#8220;demoSolrUser&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/delete-user/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;username\&#8221; : \&#8221;demoSolrUser\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/delete-user/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">username</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demoSolrUser</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthdeletesolruser.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    username=&#8217;demoSolrUser&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/delete-user/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    username</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demoSolrUser&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/delete-user/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;User successfully deleted!&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;User successfully deleted!&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="getsolrusers">account &gt; deployment &gt; solr &gt; auth &gt; get_solr_users</h3>



<p class="wp-block-paragraph">This method gets the Solr users for a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/get-users/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/get-users/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/get-users/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/get-users/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthgetsolrusers.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$RESULT = Invoke-RestMethod -Method Get -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/get-users/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/get-users/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing the Solr users and the roles associated with them.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;success&#8221;: &#8220;true&#8221;,
  &#8220;users&#8221;: {
    &#8220;demoSolrUser&#8221;: {
      &#8220;roles&#8221;: [ &#8220;Read&#8221;, &#8220;Write&#8221;, &#8220;Admin&#8221; ]
    }
  }
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;users&quot;</span><span style="color: #24292E">: {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;demoSolrUser&quot;</span><span style="color: #24292E">: {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;roles&quot;</span><span style="color: #24292E">: [ </span><span style="color: #032F62">&quot;Read&quot;</span><span style="color: #24292E">, </span><span style="color: #032F62">&quot;Write&quot;</span><span style="color: #24292E">, </span><span style="color: #032F62">&quot;Admin&quot;</span><span style="color: #24292E"> ]</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  }</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="setsolrpassword">account &gt; deployment &gt; solr &gt; auth &gt; set_solr_user_password</h3>



<p class="wp-block-paragraph">This method sets a password for a Solr user.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/set-password/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/set-password/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;username&#8221; : &#8220;demoSolrUser&#8221;,
    &#8220;password&#8221;: &#8220;test456&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;username&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;demoSolrUser&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;password&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;test456&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr>
            <th><strong>Parameter</strong></th>
            <th><strong>Description</strong></th>
            <th><strong>Example</strong></th>
         </tr></thead><tbody><tr><td><strong>username</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user name.</td><td>&#8220;demoSolrUser&#8221;</td></tr><tr><td><strong>password</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user&#8217;s password.</td><td>&#8220;test456&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/set-password/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;username\&#8221; : \&#8221;demoSolrUser\&#8221;,
    \&#8221;password\&#8221;: \&#8221;test456\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/set-password/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">username</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demoSolrUser</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">password</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">: </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">test456</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthsetsolruserpassword.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    username=&#8217;demoSolrUser&#8217;
    password=&#8217;test456&#8242;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/set-password/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    username</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demoSolrUser&#39;</span></span>
<span class="line"><span style="color: #24292E">    password</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;test456&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/set-password/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Password successfully updated!&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Password successfully updated!&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="setsolrrole">account &gt; deployment &gt; solr &gt; auth &gt; set_solr_user_role</h3>



<p class="wp-block-paragraph">This method sets the Solr user&#8217;s role. Available roles are Admin, Read, Write, and ReadWrite.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/set-role/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/set-role/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    &#8220;username&#8221; : &#8220;demoSolrUser&#8221;,
    &#8220;role&#8221; : &#8220;Read&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;username&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;demoSolrUser&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;role&quot;</span><span style="color: #24292E"> : </span><span style="color: #032F62">&quot;Read&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped"><table><thead><tr>
            <th><strong>Parameter</strong></th>
            <th><strong>Description</strong></th>
            <th><strong>Example</strong></th>
         </tr></thead><tbody><tr><td><strong>username</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr user name.</td><td>&#8220;demoSolrUser&#8221;</td></tr><tr><td><strong>role</strong><br><span style="color:#ff0000" class="has-inline-color">required</span><br>string</td><td>This is the Solr role: Admin, Read, Write, or ReadWrite.</td><td>&#8220;Read&#8221;</td></tr></tbody></table></figure>



<p class="wp-block-paragraph">See&nbsp;<a href="/docs/security/#solrauth/">Solr Basic Authentication</a>&nbsp;for an explanation of the Solr roles.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/solr/auth/set-role/&#8221; \
  &#8211;header &#8220;Authorization: APIkey &lt;apikey>&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;data &#8220;{
    \&#8221;username\&#8221; : \&#8221;demoSolrUser\&#8221;,
    \&#8221;role\&#8221; : \&#8221;Read\&#8221;
}&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/solr/auth/set-role/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: APIkey &lt;apikey&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;{</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">username</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">demoSolrUser</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">,</span></span>
<span class="line"><span style="color: #032F62">    </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">role</span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62"> : </span><span style="color: #005CC5">\&quot;</span><span style="color: #032F62">Read</span><span style="color: #005CC5">\&quot;</span></span>
<span class="line"><span style="color: #032F62">}&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentsolrauthsetsolruserrole.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;
$body = @{
    username=&#8217;demoSolrUser&#8217;
    role=&#8217;Read&#8217;
}
$body = $body | ConvertTo-Json
$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/solr/auth/set-role/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    username</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;demoSolrUser&#39;</span></span>
<span class="line"><span style="color: #24292E">    role</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Read&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/solr/auth/set-role/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">This method returns a JSON document containing a success message.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;message&#8221;: &#8220;Successfully updated user role!&#8221;,
  &#8220;success&#8221;: &#8220;true&#8221;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;message&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Successfully updated user role!&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;true&quot;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the&nbsp;<a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20Basic%20Auth" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/">Solr Basic Auth API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-basic-auth-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Solr IP Filtering API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 04 Mar 2021 09:57:52 +0000</pubDate>
				<category><![CDATA[Access and Security APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=7653</guid>

					<description><![CDATA[<p>Provisioning API &#8211; IP Filtering Overview The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments. Core and Enterprise Clients Only! The&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/">Continue reading <span class="screen-reader-text">Solr IP Filtering API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/">Solr IP Filtering API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="searchstax-managed-solr-api-ip-filtering">Provisioning API &#8211; IP Filtering</h1>



<hr class="wp-block-separator has-css-opacity"/>



<h2 class="wp-block-heading" id="overview">Overview</h2>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to set up IP Filtering using the API methods.</p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python&nbsp;<a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a>&nbsp;package, the&nbsp;<a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a>&nbsp;tool, and&nbsp;<a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use&nbsp;<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="/docs/searchstax-cloud-user-roles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#ipfiltering">IP Filtering</a>
<ul class="wp-block-list">
<li><a href="#ipfilterlist">account &gt; deployment &gt; ip-filter &gt; list</a></li>



<li><a href="#IPadd">account &gt; deployment &gt; ip-filter &gt; add_cidr_ip</a></li>



<li><a href="#IPdelete">account &gt; deployment &gt; ip-filter &gt; delete_cidr_ip</a></li>



<li><a href="#ipupdate">account &gt; deployment &gt; ip-filter &gt; update_cidr_ip</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a></li>



<li><a href="/docs/searchstax-cloud-dns-alias-api/">DNS Alias API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="ipfiltering">IP Filtering</h2>



<p class="wp-block-paragraph">The SearchStax Provisioning API includes methods for applying IP Filters to deployments.</p>



<h3 class="wp-block-heading" id="ipfilterlist">account &gt; deployment &gt; ip-filter &gt; list</h3>



<p class="wp-block-paragraph">This method returns a list of IP Filters from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/?page=&lt;n>
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/?page=&lt;n&gt;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment. The query parameter&nbsp;<strong>page</strong>&nbsp;is a number,&nbsp;<strong>&lt;n&gt;</strong>, that defaults to 1.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">There is no request body.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/?page=&lt;n>&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; 
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/?page=&lt;n&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentipfilterlist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$RESULTS = Invoke-RestMethod -Method Get -Headers $headers `
          -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/ip-filter/?page=1&#8221; 
$RESULTS = $RESULTS | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">          </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/ip-filter/?page=1&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULTS </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULTS </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document containing a list of IP Filters.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>[
  {
    &#8220;services&#8221;: [
      &#8220;solr&#8221;
    ],
    &#8220;cidr_ip&#8221;: &#8220;0.0.0.0/0&#8221;,
    &#8220;description&#8221;: &#8220;&#8221;
  }
]
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">[</span></span>
<span class="line"><span style="color: #24292E">  {</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;services&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #032F62">&quot;solr&quot;</span></span>
<span class="line"><span style="color: #24292E">    ],</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;cidr_ip&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;0.0.0.0/0&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #005CC5">&quot;description&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;&quot;</span></span>
<span class="line"><span style="color: #24292E">  }</span></span>
<span class="line"><span style="color: #24292E">]</span></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="IPadd">account &gt; deployment &gt; ip-filter &gt; add-cidr-ip</h3>



<div class="alert alert-warning">
<h3>Setting IP Filters on Azure Deployments</h3>
<p>When using add-cidr-ip in an Azure environment, IP filters for Zookeeper and Solr must both be explicitly set.</p>
<p>SearchStax requires Zookeeper to be locked down by IP filters. To then leave Solr open to any connection (a common request), set the Solr IP filter to &#8216;0.0.0.0/0&#8217;.</p>
</div>



<p class="wp-block-paragraph">This method adds a new IP Filter to a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/add-cidr-ip/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/add-cidr-ip/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    services=@(&#8216;solr&#8217;,&#8217;zk&#8217;)
    cidr_ip=&#8217;100.100.100.100&#8242;
    description=&#8217;Added by API&#8217;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">services=@(&#39;solr&#39;,&#39;zk&#39;)</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">cidr_ip=&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">description=&#39;Added</span><span style="color: #24292E"> </span><span style="color: #B31D28; font-style: italic">by</span><span style="color: #24292E"> </span><span style="color: #B31D28; font-style: italic">API&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>services</strong><br><span class="has-inline-color" style="color: #ff0000;">required</span><br>list of strings</td>
<td>Which services to apply the filter to. Allowed values are &#8216;solr&#8217; and &#8216;zk&#8217;.</td>
<td>(&#8216;solr&#8217;,&#8217;zk&#8217;)</td>
</tr>
<tr>
<td><strong>cidr_ip</strong><br><span class="has-inline-color" style="color: #ff0000;">required</span><br>string</td>
<td>The IP address.</td>
<td>&#8220;100.100.100.100&#8221;</td>
</tr>
<tr>
<td><strong>description</strong><br><span class="has-inline-color" style="color: #32cd32;">optional</span><br>string</td>
<td>A very brief label.</td>
<td>&#8220;Added by API&#8221;</td>
</tr>
</tbody>
</table>
</figure>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/add-cidr-ip/&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;data &#8216;{&#8220;services&#8221;:[&#8220;solr&#8221;,&#8221;zk&#8221;],&#8221;cidr_ip&#8221;:&#8221;100.100.100.100&#8243;,&#8221;description&#8221;:&#8221;Added by API&#8221;}&#8217;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/add-cidr-ip/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;services&quot;:[&quot;solr&quot;,&quot;zk&quot;],&quot;cidr_ip&quot;:&quot;100.100.100.100&quot;,&quot;description&quot;:&quot;Added by API&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentipfilteraddcidrip.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$body = @{
    services=@(&#8216;solr&#8217;,&#8217;zk&#8217;)
    cidr_ip=&#8217;100.100.100.100&#8242;
    description=&#8217;Added by PowerShell&#8217;
}
$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/ip-filter/add-cidr-ip/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    services</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;solr&#39;</span><span style="color: #D73A49">,</span><span style="color: #032F62">&#39;zk&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">    cidr_ip</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">    description</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Added by PowerShell&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/ip-filter/add-cidr-ip/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming success.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;detail&#8221;: null,
  &#8220;success&#8221;: true
}

</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;detail&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="IPdelete">account &gt; deployment &gt; ip-filter &gt; delete-cidr-ip</h3>



<p class="wp-block-paragraph">This method deletes an IP Filter from a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/delete-cidr-ip/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/delete-cidr-ip/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    cidr_ip=&#8217;100.100.100.100&#8242;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">cidr_ip=&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>cidr_ip</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>The IP address of the filter to delete.</td>
<td>&#8220;100.100.100.100&#8221;</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/delete-cidr-ip/&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;data &#8216;{&#8220;cidr_ip&#8221;:&#8221;100.100.100.100&#8243;}&#8217;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/delete-cidr-ip/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;cidr_ip&quot;:&quot;100.100.100.100&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentipfilterdeletecidrip.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$body = @{
    cidr_ip=&#8217;100.100.100.100&#8242;
}
$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/ip-filter/delete-cidr-ip/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    cidr_ip</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/ip-filter/delete-cidr-ip/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming success.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;detail&#8221;: null,
  &#8220;success&#8221;: true
}

</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;detail&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h3 class="wp-block-heading" id="ipupdate">account &gt; deployment &gt; ip-filter &gt; update-cidr-ip</h3>



<p class="wp-block-paragraph">This method updates an IP Filter in a deployment.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>POST https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/update-cidr-ip/
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">POST</span><span style="color: #24292E"> https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/update-cidr-ip/</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and&nbsp;<strong>&lt;uid&gt;</strong>&nbsp;is the ID of the deployment.</p>



<p class="wp-block-paragraph">This method uses either&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication or&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#key/">API Key</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">The request body should be a &#8220;application/json&#8221; encoded object, containing the following items:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
    services=@(&#8216;solr&#8217;,&#8217;zk&#8217;)
    cidr_ip=&#8217;100.100.100.100&#8242;
    description=&#8217;Updated by API&#8217;
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">services=@(&#39;solr&#39;,&#39;zk&#39;)</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">cidr_ip=&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">    </span><span style="color: #B31D28; font-style: italic">description=&#39;Updated</span><span style="color: #24292E"> </span><span style="color: #B31D28; font-style: italic">by</span><span style="color: #24292E"> </span><span style="color: #B31D28; font-style: italic">API&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>


<figure class="wp-block-table table table-bordered table-striped">
<table>
<thead>
<tr>
<th><strong>Parameter</strong></th>
<th><strong>Description</strong></th>
<th><strong>Example</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>services</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />list of strings</td>
<td>Which services to apply the filter to. Allowed values are &#8216;solr&#8217; and &#8216;zk&#8217;.</td>
<td>(&#8216;solr&#8217;,&#8217;zk&#8217;)</td>
</tr>
<tr>
<td><strong>cidr_ip</strong><br /><span class="has-inline-color" style="color: #ff0000;">required</span><br />string</td>
<td>The IP address.</td>
<td>&#8220;100.100.100.100&#8221;</td>
</tr>
<tr>
<td><strong>description</strong><br /><span class="has-inline-color" style="color: #32cd32;">optional</span><br />string</td>
<td>A very brief label.</td>
<td>&#8220;Added by API&#8221;</td>
</tr>
</tbody>
</table>
</figure>


<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request POST &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/deployment/&lt;uid>/ip-filter/add-cidr-ip/&#8221; \
  &#8211;header &#8220;Content-Type: application/json&#8221; \
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221; \
  &#8211;data &#8216;{&#8220;services&#8221;:[&#8220;solr&#8221;,&#8221;zk&#8221;],&#8221;cidr_ip&#8221;:&#8221;100.100.100.100&#8243;,&#8221;description&#8221;:&#8221;Updated by API&#8221;}&#8217;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">POST</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/deployment/&lt;uid&gt;/ip-filter/add-cidr-ip/&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Content-Type: application/json&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span><span style="color: #24292E"> </span><span style="color: #005CC5">\</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">--data</span><span style="color: #24292E"> </span><span style="color: #032F62">&#39;{&quot;services&quot;:[&quot;solr&quot;,&quot;zk&quot;],&quot;cidr_ip&quot;:&quot;100.100.100.100&quot;,&quot;description&quot;:&quot;Updated by API&quot;}&#39;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountdeploymentipfilterupdatecidrip.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;
$uid = &#8220;ss123456&#8221;

$body = @{
    services=@(&#8216;solr&#8217;,&#8217;zk&#8217;)
    cidr_ip=&#8217;100.100.100.100&#8242;
    description=&#8217;Updated by PowerShell&#8217;
}
$body = $body | ConvertTo-Json

$RESULT = Invoke-RestMethod -Method Post -body $body -ContentType &#8216;application/json&#8217; -Headers $headers `
         -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/deployment/$uid/ip-filter/update-cidr-ip/&#8221; 
$RESULT = $RESULT | ConvertTo-Json
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"><span style="color: #24292E">$uid </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;ss123456&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #D73A49">@</span><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">    services</span><span style="color: #D73A49">=@</span><span style="color: #24292E">(</span><span style="color: #032F62">&#39;solr&#39;</span><span style="color: #D73A49">,</span><span style="color: #032F62">&#39;zk&#39;</span><span style="color: #24292E">)</span></span>
<span class="line"><span style="color: #24292E">    cidr_ip</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;100.100.100.100&#39;</span></span>
<span class="line"><span style="color: #24292E">    description</span><span style="color: #D73A49">=</span><span style="color: #032F62">&#39;Updated by PowerShell&#39;</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"><span style="color: #24292E">$body </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $body </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Post </span><span style="color: #D73A49">-</span><span style="color: #24292E">body $body </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">         </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/deployment/</span><span style="color: #24292E">$uid</span><span style="color: #032F62">/ip-filter/update-cidr-ip/&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">The response is a JSON document confirming success.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;detail&#8221;: null,
  &#8220;success&#8221;: true
}

</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;detail&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;success&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">true</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span>
<span class="line"></span></code></pre></div>



<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the&nbsp;<a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20API%20–%20IP%20Filtering" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/">Solr IP Filtering API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-ipfilter-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Private VPC API</title>
		<link>https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/</link>
					<comments>https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/#respond</comments>
		
		<dc:creator><![CDATA[Bruce]]></dc:creator>
		<pubDate>Fri, 24 Jun 2022 01:18:46 +0000</pubDate>
				<category><![CDATA[Access and Security APIs]]></category>
		<category><![CDATA[Cloud]]></category>
		<guid isPermaLink="false">https://www.searchstax.com/docs/?p=11800</guid>

					<description><![CDATA[<p>Private VPC API The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments. Core and Enterprise Clients Only! The SearchStax API suite is&#8230; <a class="more-link" href="https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/">Continue reading <span class="screen-reader-text">Private VPC API</span></a></p>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading" id="h-private-vpc-api">Private VPC API</h1>



<hr class="wp-block-separator has-css-opacity"/>



<p class="wp-block-paragraph">The SearchStax Managed Search service provides an API supporting the creation, deletion and management of Solr deployments.</p>



<div class="alert alert-info">
<h3>Core and Enterprise Clients Only!</h3>
<p>The SearchStax API suite is available to our Core and Enterprise
clients only, as noted on our <a href="https://www.searchstax.com/pricing/cloud/">Pricing</a> page. </p>
</div>



<p class="wp-block-paragraph">This page describes how to obtain the ID number of a Virtual Private Cloud (VPC) using the API. This ID is essential to creating a new deployment inside the VPC using the <a href="/docs/searchstax-cloud-deployment-api/#createdeployment">account &gt; deployment &gt; create</a> method. </p>



<p class="wp-block-paragraph">The API can be accessed through any tool that assembles HTTP requests and dispatch them to a server. Among these would be the Python&nbsp;<a href="https://pypi.org/project/coreapi/" target="_blank" rel="noreferrer noopener">coreapi</a>&nbsp;package, the&nbsp;<a href="https://www.postman.com/" target="_blank" rel="noreferrer noopener">Postman</a>&nbsp;tool, and&nbsp;<a href="https://curl.se" target="_blank" rel="noreferrer noopener">cURL</a>. For Windows, use&nbsp;<a href="https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.1" target="_blank" rel="noreferrer noopener">PowerShell 7+</a>.</p>



<div class="alert alert-warning">
<h3>Account Owner, Admin, or Technical Contact</h3>
<p>To run the SearchStax Provisioning API, you must be the account Owner,
an account Admin, or a Technical Contact. See <a href="../userroles/#userroles">SearchStax User Roles</a>.</p>
</div>



<p class="wp-block-paragraph">Symbols enclosed in carets (&lt; and &gt;) such as&nbsp;<strong>&lt;username&gt;</strong>&nbsp;are metavariables. Substitute your local values when you encounter them in the examples.</p>



<p class="wp-block-paragraph">Contents:</p>



<ul class="wp-block-list">
<li><a href="#PrivateVPC">Private VPC API</a>
<ul class="wp-block-list">
<li><a href="#VPClist">account &gt; privatevpc &gt; list</a></li>
</ul>
</li>
</ul>



<p class="wp-block-paragraph">Related Pages:</p>



<ul class="wp-block-list">
<li><a href="/docs/searchstax-cloud-authentication-api/">Authentication API</a></li>



<li><a href="/docs/searchstax-cloud-users-api/">Users API</a></li>



<li><a href="/docs/searchstax-cloud-basic-auth-api/">Basic Auth API</a></li>



<li><a href="/docs/searchstax-cloud-ipfilter-api/">IP Filtering API</a></li>



<li><a href="/docs/searchstax-cloud-deployment-api/">Deployment API</a></li>



<li><a href="/docs/searchstax-cloud-backup-restore-api/">Backup/Restore API</a></li>



<li><a href="/docs/searchstax-cloud-custom-jars-api/">Custom JARs API</a></li>



<li><a href="/docs/searchstax-cloud-tags-api/">Tags API</a></li>



<li><a href="/docs/searchstax-cloud-alerts-api/">Alerts API</a></li>



<li><a href="/docs/searchstax-cloud-webhooks-api/">Webhooks API</a></li>



<li><a href="/docs/searchstax-cloud-zookeeper-api/">Zookeeper API</a></li>
</ul>



<h2 class="wp-block-heading" id="PrivateVPC">Private VPC API</h2>



<p class="wp-block-paragraph">SearchStax provides the ability to create new Solr deployments within your VPC using the <a href="/docs/searchstax-cloud-deployment-api/#createdeployment">account &gt; deployment &gt; create</a> method. That method, in turn, requires the ID number of the VPC in your account. The following method lets you obtain this ID number. </p>



<h4 class="wp-block-heading" id="VPClist">account &gt; privatevpc &gt; list</h4>



<p class="wp-block-paragraph">This method lists VPCs associated with an account.</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>GET /api/rest/v2/account/&lt;account_name>/privatevpc/?page=1
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #D73A49">GET</span><span style="color: #24292E"> /api/rest/v2/account/&lt;account_name&gt;/privatevpc/?page=1</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">where&nbsp;<strong>&lt;account_name&gt;</strong>&nbsp;is the name of the tenant account, and <strong>&lt;page&gt;</strong> is an optional page number within the paginated result set.</p>



<p class="wp-block-paragraph">This method uses&nbsp;<a href="/docs/searchstax-cloud-authentication-api/#token/">Token</a>&nbsp;authentication.</p>



<p class="wp-block-paragraph">When invoked from Linux (Bash script):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>curl &#8211;request GET &#8220;https://app.searchstax.com/api/rest/v2/account/&lt;account_name>/privatevpc&#8221; 
  &#8211;header &#8220;Authorization: Token &lt;token>&#8221;
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #6F42C1">curl</span><span style="color: #24292E"> </span><span style="color: #005CC5">--request</span><span style="color: #24292E"> </span><span style="color: #032F62">GET</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/&lt;account_name&gt;/privatevpc&quot;</span><span style="color: #24292E"> </span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #6F42C1">--header</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;Authorization: Token &lt;token&gt;&quot;</span></span>
<span class="line"></span></code></pre></div>



<p class="wp-block-paragraph">When invoked from Windows (<a href="https://github.com/searchstax/searchstax-client-powershell/blob/master/restapi/accountprivatevpclist.ps1" target="_blank" rel="noreferrer noopener">PowerShell script</a>):</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>$ACCOUNT = &#8220;AccountName&#8221;

$RESULT = Invoke-RestMethod -Method Get -ContentType &#8216;application/json&#8217; -Headers $headers `
              -uri &#8220;https://app.searchstax.com/api/rest/v2/account/$ACCOUNT/privatevpc/&#8221;
$RESULT = $RESULT | ConvertTo-Json</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">$ACCOUNT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #032F62">&quot;AccountName&quot;</span></span>
<span class="line"></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">Invoke-RestMethod</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Method Get </span><span style="color: #D73A49">-</span><span style="color: #24292E">ContentType </span><span style="color: #032F62">&#39;application/json&#39;</span><span style="color: #24292E"> </span><span style="color: #D73A49">-</span><span style="color: #24292E">Headers $headers </span><span style="color: #D73A49">`</span></span>
<span class="line"><span style="color: #24292E">              </span><span style="color: #D73A49">-</span><span style="color: #24292E">uri </span><span style="color: #032F62">&quot;https://app.searchstax.com/api/rest/v2/account/</span><span style="color: #24292E">$ACCOUNT</span><span style="color: #032F62">/privatevpc/&quot;</span></span>
<span class="line"><span style="color: #24292E">$RESULT </span><span style="color: #D73A49">=</span><span style="color: #24292E"> $RESULT </span><span style="color: #D73A49">|</span><span style="color: #24292E"> </span><span style="color: #005CC5">ConvertTo-Json</span></span></code></pre></div>



<p class="wp-block-paragraph">A successful response is a JSON object describing the VPCs of the account:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:1rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.5rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span role="button" tabindex="0" style="color:#24292e;display:none" aria-label="Copy" class="code-block-pro-copy-button"><textarea class="code-block-pro-copy-button-textarea" aria-hidden="true" readonly>{
  &#8220;count&#8221;: 1,
  &#8220;next&#8221;: null,
  &#8220;previous&#8221;: null,
  &#8220;results&#8221;: [
    {
      &#8220;id&#8221;: 2,
      &#8220;account&#8221;: &#8220;test&#8221;,
      &#8220;region&#8221;: &#8220;us-east1&#8221;,
      &#8220;status&#8221;: &#8220;Active&#8221;,
      &#8220;address_space&#8221;: &#8220;10.63.0.0/16&#8221;,
      &#8220;name&#8221;: &#8220;test-vpc&#8221;
    }
  ]
}
</textarea><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki github-light" style="background-color: #fff" tabindex="0"><code><span class="line"><span style="color: #24292E">{</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;count&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">1</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;next&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;previous&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">null</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">  </span><span style="color: #005CC5">&quot;results&quot;</span><span style="color: #24292E">: [</span></span>
<span class="line"><span style="color: #24292E">    {</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;id&quot;</span><span style="color: #24292E">: </span><span style="color: #005CC5">2</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;account&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;test&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;region&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;us-east1&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;status&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;Active&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;address_space&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;10.63.0.0/16&quot;</span><span style="color: #24292E">,</span></span>
<span class="line"><span style="color: #24292E">      </span><span style="color: #005CC5">&quot;name&quot;</span><span style="color: #24292E">: </span><span style="color: #032F62">&quot;test-vpc&quot;</span></span>
<span class="line"><span style="color: #24292E">    }</span></span>
<span class="line"><span style="color: #24292E">  ]</span></span>
<span class="line"><span style="color: #24292E">}</span></span>
<span class="line"></span></code></pre></div>



<div class="wp-block-group"><div class="wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained">
<h2 class="wp-block-heading" id="questions">Questions?</h2>



<p class="wp-block-paragraph">Do not hesitate to contact the <a href="mailto:support@searchstax.com?subject=SearchStax%20Cloud%20Private%20VPC%20API" target="_blank" rel="noreferrer noopener">SearchStax Support Desk</a>.</p>
</div></div>
<p>The post <a href="https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/">Private VPC API</a> appeared first on <a href="https://www.searchstax.com/docs">SearchStax Docs</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.searchstax.com/docs/searchstax-cloud-private-vpc-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
