curl --request POST \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/settings/test/restore' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"version": 157178,
"expected_policy_version": 260899,
"change_reason": "Adjust thresholds after reviewing retained evidence"
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.settings.restore({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
environment: "test",
body: {
version: 157178,
expectedPolicyVersion: 260899,
changeReason: "Adjust thresholds after reviewing retained evidence",
},
});
console.log(result);
}
run();
from noresponse import NoResponse
import os
with NoResponse(
api_key=os.getenv("NORESPONSE_API_KEY", ""),
) as no_response:
res = no_response.settings.restore(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", environment="test", version=157178, expected_policy_version=260899, change_reason="Adjust thresholds after reviewing retained evidence")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v12"
"github.com/noresponsehq/go/v12/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Settings.Restore(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", components.KeyEnvironmentTest, components.PolicyRestoreRequest{
Version: 157178,
ExpectedPolicyVersion: 260899,
ChangeReason: "Adjust thresholds after reviewing retained evidence",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import org.noresponse.NoResponse;
import org.noresponse.models.errors.AuthenticationException;
import org.noresponse.models.errors.BadRequestException;
import org.noresponse.models.errors.ConflictException;
import org.noresponse.models.errors.NotFoundException;
import org.noresponse.models.errors.PermissionDeniedException;
import org.noresponse.models.errors.RateLimitException;
import org.noresponse.models.operations.RestorePolicyResponse;
import org.noresponse.models.shared.KeyEnvironment;
import org.noresponse.models.shared.PolicyRestoreRequest;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
RestorePolicyResponse res = sdk.settings().restore()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.environment(KeyEnvironment.TEST)
.body(PolicyRestoreRequest.builder()
.version(157178L)
.expectedPolicyVersion(260899L)
.changeReason("Adjust thresholds after reviewing retained evidence")
.build())
.call();
if (res.settings().isPresent()) {
System.out.println(res.settings().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Settings.RestoreAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
environment: KeyEnvironment.Test,
body: new PolicyRestoreRequest() {
Version = 157178,
ExpectedPolicyVersion = 260899,
ChangeReason = "Adjust thresholds after reviewing retained evidence",
}
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
use NoResponse\Models\Shared;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$body = new Shared\PolicyRestoreRequest(
version: 157178,
expectedPolicyVersion: 260899,
changeReason: 'Adjust thresholds after reviewing retained evidence',
);
$response = $sdk->settings->restore(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
environment: Shared\KeyEnvironment::Test,
body: $body
);
$result = $response->result;
// handle response
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.settings.restore(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', environment: Models::Shared::KeyEnvironment::TEST, body: Models::Shared::PolicyRestoreRequest.new(
version: 157_178,
expected_policy_version: 260_899,
change_reason: 'Adjust thresholds after reviewing retained evidence'
))
unless res.nil?
# handle response
end
{
"workspace_id": "<string>",
"environment": "live",
"retention_days": 183,
"policy_version": 1,
"flows": {
"account_creation": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
},
"login": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
},
"purchase": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
}
},
"refused_sources": [
"github"
],
"screening_daily_cap": 50000000,
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 401,
"detail": "<string>",
"code": "unauthorized",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 403,
"detail": "<string>",
"code": "workspace_forbidden",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 409,
"detail": "<string>",
"code": "policy_version_conflict",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 413,
"detail": "<string>",
"code": "payload_too_large",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 415,
"detail": "<string>",
"code": "unsupported_media_type",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}Restore captured settings as a new guarded version
Restore an earlier configuration as a new version after checking the expected current version. Record a reason for the change. Requires settings and policy_publish together, or management, within the key’s own workspace and environment.
curl --request POST \
--url 'https://api.noresponse.org/v1/workspaces/tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM/settings/test/restore' \
--header "Authorization: Bearer $NORESPONSE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"version": 157178,
"expected_policy_version": 260899,
"change_reason": "Adjust thresholds after reviewing retained evidence"
}'
import { NoResponse } from "@noresponse/node";
const noResponse = new NoResponse({
apiKey: process.env["NORESPONSE_API_KEY"] ?? "",
});
async function run() {
const result = await noResponse.settings.restore({
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
environment: "test",
body: {
version: 157178,
expectedPolicyVersion: 260899,
changeReason: "Adjust thresholds after reviewing retained evidence",
},
});
console.log(result);
}
run();
from noresponse import NoResponse
import os
with NoResponse(
api_key=os.getenv("NORESPONSE_API_KEY", ""),
) as no_response:
res = no_response.settings.restore(workspace_id="tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", environment="test", version=157178, expected_policy_version=260899, change_reason="Adjust thresholds after reviewing retained evidence")
# Handle response
print(res)
package main
import(
"context"
"os"
noresponse "github.com/noresponsehq/go/v12"
"github.com/noresponsehq/go/v12/models/components"
"log"
)
func main() {
ctx := context.Background()
s := noresponse.New(
noresponse.WithSecurity(os.Getenv("NORESPONSE_API_KEY")),
)
res, err := s.Settings.Restore(ctx, "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM", components.KeyEnvironmentTest, components.PolicyRestoreRequest{
Version: 157178,
ExpectedPolicyVersion: 260899,
ChangeReason: "Adjust thresholds after reviewing retained evidence",
})
if err != nil {
log.Fatal(err)
}
if res != nil {
// handle response
}
}
package hello.world;
import java.lang.Exception;
import org.noresponse.NoResponse;
import org.noresponse.models.errors.AuthenticationException;
import org.noresponse.models.errors.BadRequestException;
import org.noresponse.models.errors.ConflictException;
import org.noresponse.models.errors.NotFoundException;
import org.noresponse.models.errors.PermissionDeniedException;
import org.noresponse.models.errors.RateLimitException;
import org.noresponse.models.operations.RestorePolicyResponse;
import org.noresponse.models.shared.KeyEnvironment;
import org.noresponse.models.shared.PolicyRestoreRequest;
public class Application {
public static void main(String[] args) throws Exception {
NoResponse sdk = NoResponse.builder()
.apiKey(System.getenv().getOrDefault("NORESPONSE_API_KEY", ""))
.build();
RestorePolicyResponse res = sdk.settings().restore()
.workspaceId("tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM")
.environment(KeyEnvironment.TEST)
.body(PolicyRestoreRequest.builder()
.version(157178L)
.expectedPolicyVersion(260899L)
.changeReason("Adjust thresholds after reviewing retained evidence")
.build())
.call();
if (res.settings().isPresent()) {
System.out.println(res.settings().get());
}
}
}
using NoResponse;
using NoResponse.Models.Shared;
using System;
var sdk = new NoResponseClient(apiKey: Environment.GetEnvironmentVariable("NORESPONSE_API_KEY"));
var res = await sdk.Settings.RestoreAsync(
workspaceId: "tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM",
environment: KeyEnvironment.Test,
body: new PolicyRestoreRequest() {
Version = 157178,
ExpectedPolicyVersion = 260899,
ChangeReason = "Adjust thresholds after reviewing retained evidence",
}
);
// handle response
<?php
declare(strict_types=1);
require 'vendor/autoload.php';
use NoResponse;
use NoResponse\Models\Shared;
$sdk = NoResponse\NoResponseClient::builder()
->setSecurity(
getenv('NORESPONSE_API_KEY') ?: ''
)
->build();
$body = new Shared\PolicyRestoreRequest(
version: 157178,
expectedPolicyVersion: 260899,
changeReason: 'Adjust thresholds after reviewing retained evidence',
);
$response = $sdk->settings->restore(
workspaceId: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM',
environment: Shared\KeyEnvironment::Test,
body: $body
);
$result = $response->result;
// handle response
require 'noresponse'
Models = ::NoResponse::Models
s = ::NoResponse::NoResponseClient.new(
api_key: ENV.fetch('NORESPONSE_API_KEY', '')
)
res = s.settings.restore(workspace_id: 'tnt_01JA2Z8K6Q4V7W9XBCDEFGHJKM', environment: Models::Shared::KeyEnvironment::TEST, body: Models::Shared::PolicyRestoreRequest.new(
version: 157_178,
expected_policy_version: 260_899,
change_reason: 'Adjust thresholds after reviewing retained evidence'
))
unless res.nil?
# handle response
end
{
"workspace_id": "<string>",
"environment": "live",
"retention_days": 183,
"policy_version": 1,
"flows": {
"account_creation": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
},
"login": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
},
"purchase": {
"step_up": 50,
"review": 51,
"default_depth": "quick",
"inherits_account_creation": true,
"admission": "immediate",
"hold_seconds": 43215,
"on_expiry": "allow",
"block": 50
}
},
"refused_sources": [
"github"
],
"screening_daily_cap": 50000000,
"updated_by": "<string>",
"updated_at": "2023-11-07T05:31:56Z"
}{
"type": "<string>",
"title": "<string>",
"status": 400,
"detail": "<string>",
"code": "invalid_request",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 401,
"detail": "<string>",
"code": "unauthorized",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 403,
"detail": "<string>",
"code": "workspace_forbidden",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 404,
"detail": "<string>",
"code": "not_found",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 409,
"detail": "<string>",
"code": "policy_version_conflict",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 413,
"detail": "<string>",
"code": "payload_too_large",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 415,
"detail": "<string>",
"code": "unsupported_media_type",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 503,
"detail": "<string>",
"code": "service_unavailable",
"request_id": "<string>",
"instance": "<string>",
"invalid_params": [
{
"field": "<string>",
"reason": "<string>",
"example": "<string>"
}
]
}Authorizations
Your API key, sent as Authorization: Bearer <key>. A key is nrk_live_ or nrk_test_, a 26-character key id, _ and a 43-character secret. Account, audit and usage data stay within the key's environment. Dedicated team scopes apply across the workspace.
assess creates and reads assessments, records outcomes and reports key usage. investigate reads accounts, assessment history and request diagnostics without export or enforcement access. The legacy history scope also permits account exports, submitted identifiers and enforcement reports. delete permits account and assessment deletion.
evidence or detailed adds detailed merged evidence and submitted identifiers where the operation permits them. Neither grants access to the underlying resource alone. exports permits exports with the underlying account or audit scope. audit reads audit events and usage reads usage. audit_manage manages audit streams and retention, and includes audit-read and export authority.
webhooks manages webhook endpoints. integrations manages hosted auth-provider integrations. management manages keys, settings, lists, reviews and policy evaluations in the key's environment. New keys cannot exceed the issuer's effective permissions.
settings reads configuration, previews policy and list changes, runs evaluations and changes retention. Publishing decision policy or changing lists requires settings and policy_publish together, or the legacy management scope.
groups creates and reads groups, adds people, starts and cancels screenings and records decisions on people, in the key's environment.
members reads the workspace directory. members_manage also administers non-owner members and invitations. These scopes require a live key issued by a current owner with access to both environments. They grant access across the workspace. management does not grant team access. API keys cannot change owners or accept invitations.
A missing, unknown, revoked or expired key answers 401. A valid key without a required scope answers 403.
Path Parameters
The workspace id. A workspace the acting user is not an active member of answers 404, as do another workspace than an API key's own, a malformed id and a test environment's id. The workspace id, which is also its live environment's workspace id; the test environment's is the same id with:test appended. A workspace created through the API is tnt_ and a 26-character ULID.
^[A-Za-z0-9][A-Za-z0-9_.-]{0,122}$The environment: live or test. Each has its own settings. Any other value answers 400. An API key reads and changes only its own environment's; the other answers 404. The environment the key belongs to. A live key assesses with live sources; a test key answers from the deterministic simulator.
live, test Body
Publish a captured configuration as a new version. Version checks and publication are atomic. Longer retention does not revive expired records, and restored policy does not undo customer enforcement.
Response
Restore captured settings as a new guarded version.
One environment's settings: how long its assessments are kept, and for each flow the risk thresholds that decide it and the depth a request that names none is served at, the sources it refuses, and the daily cap on screening spend. Live and test each have their own. A flow without thresholds of its own uses account_creation's (inherits_account_creation). Every change is recorded in the audit log as settings.updated, with who made it.
The sources this environment refuses, sorted; empty, the default, refuses none. An assessment never contacts a refused source: its coverage is missing (an identifier with no other source lists coverage-unavailable as unavailable), never not_found, and a stored result of a refused source is not reused.
25A NoResponse source: github (GitHub accounts), phone (the phone lookup), breach (breach exposure), rdap (the email domain's registration), mx (the email domain's mail servers), ipintel (IP intelligence) or an email account source that searches one platform for an account by email address (adobe, nvidia, wix, life360, zapier, google). google runs only for Gmail addresses. scratch, dailymotion, substack, duolingo, dockerhub, wikipedia, internetarchive, telegram, spotify, patreon, wordpress, okru and flickr each search that platform for an account by username; telegram also searches by phone number, through a logged-in Telegram lookup account. whatsapp searches WhatsApp for an account by phone number.
github, phone, breach, rdap, mx, ipintel, adobe, nvidia, wix, life360, zapier, google, scratch, dailymotion, substack, duolingo, dockerhub, wikipedia, internetarchive, telegram, spotify, patreon, wordpress, okru, flickr, whatsapp The most the environment's screenings may spend in one UTC day, in minor units of USD (cents), 0 to 100000000; null is no cap. Default 50000. A screening whose estimated_spend exceeds the cap less the day's recorded spend and what open screenings may still spend answers 409 screening_cap_exceeded.
0 <= x <= 100000000