Skip to content

Test JS

POST
/api/shape/csd/namespaces/{namespace}/testjs
curl --request POST \
--url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/shape/csd/namespaces/example/testjs \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "domain": "example", "namespace": "example", "pageURL": "example" }'

Validate JS script tag injection in the target URL.

Examples of this operation.

namespace
required
string

Namespace Namespace.

Media typeapplication/json
TestJSRequest

Request to GET injected JS tag status.

object
domain
Domain

Root domain that page URL belongs to Example: if you are adding Client-Side Defense JS on checkout.example.com, you should enter example.com here.

string format: hostname
>= 26 characters <= 256 characters
namespace
namespace

Namespace

string
>= 6 characters <= 1024 characters
pageURL
Page URL

Page URL that user injects JS tag to.

string
<= 1024 characters
Examplegenerated
{
"domain": "example",
"namespace": "example",
"pageURL": "example"
}

A successful response.

Media typeapplication/json
TestJSResponse

GET the page URL JS status.

object
message
message

The error string if the status is failed.

string
<= 1024 characters
status
string
default: DETECTED
Allowed values: DETECTED NOT_DETECTED FAILED
Example
{
"status": "DETECTED"
}

Returned when operation is not authorized.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when there is no permission to access resource.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when resource is not found.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation on resource is conflicting with current value.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when operation has been rejected as it is happening too frequently.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server encountered an error in processing API.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when service is unavailable temporarily.

Media typeapplication/json
string format: string
Examplegenerated
example

Returned when server timed out processing request.

Media typeapplication/json
string format: string
Examplegenerated
example