6.0.0 • Published 4 years ago

@datafire/getsandbox v6.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@datafire/getsandbox

Client library for Sandbox API

Installation and Usage

npm install --save @datafire/getsandbox
let getsandbox = require('@datafire/getsandbox').create({
  api_key: ""
});

.then(data => {
  console.log(data);
});

Description

Sandbox API

Actions

getSandboxesActivity

searchActivity

getsandbox.getSandboxesActivity({}, context)

Input

  • input object
    • fromTimestamp integer: Timestamp to start search from, epoch time in milliseconds.
    • sourceSandboxes string: Comma-separated list of Sandbox names to search.
    • keyword string: A keyword to search activities by, will match any part of the ActivityMessage.
    • allTypes boolean: Flag to return all types of activity, defaults to just Requests
    • maxResults integer: Maximum number of results to return

Output

getSandboxes

getSandboxes

getsandbox.getSandboxes({}, context)

Input

  • input object
    • filterType string

Output

createSandbox

createSandbox

getsandbox.createSandbox({
  "body": {}
}, context)

Input

Output

deleteSandbox

deleteSandbox

getsandbox.deleteSandbox({
  "sandboxName": ""
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox

Output

Output schema unknown

getSandbox

getSandbox

getsandbox.getSandbox({
  "sandboxName": ""
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox

Output

updateSandbox

updateSandbox

getsandbox.updateSandbox({
  "sandboxName": "",
  "body": {
    "name": ""
  }
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox
    • body required Sandbox

Output

forkSandbox

forkSandbox

getsandbox.forkSandbox({
  "sandboxName": ""
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox

Output

deleteSandboxState

deleteSandboxState

getsandbox.deleteSandboxState({
  "sandboxName": ""
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox

Output

Output schema unknown

getSandboxState

getSandboxState

getsandbox.getSandboxState({
  "sandboxName": ""
}, context)

Input

  • input object
    • sandboxName required string: Name of the Sandbox

Output

Output schema unknown

Definitions

ActivityMessage

  • ActivityMessage object
    • createdTimestamp integer: Epoch time in milliseconds when the message was created
    • message string: The details of the message when type is 'log'
    • messageObject RuntimeTransaction
    • messageType string (values: request, log)
    • sandboxId string: The ID of the sandbox that generated this message

ConfiguredRouteDetails

  • ConfiguredRouteDetails object
    • activeErrorOverride boolean: Whether error overrides are enabled or not.
    • activeLatency boolean: Whether latency delays are enabled or not.
    • defaultLatency integer: A delay in milliseconds applied to requests at a 'normal' level.
    • errorOverrideType required string (values: NONE, TIMEOUT, SERVICE_DOWN): The type of error override applied to this route.
    • loadLatency integer: A delay in milliseconds applied to requests at a 'high' level.
    • loadThreshold integer: The threshold in transactions/second to signify 'high' load
    • method string
    • path string
    • properties object
    • routeConfig RouteConfig
    • transport string

CreateSandbox

  • CreateSandbox object
    • commitBaseTemplate boolean: Whether to commit the example Sandbox definition upon creation.
    • description string: Text describing this Sandbox.
    • name string: Optional name to give the Sandbox, will be generated if omitted.
    • ownerOrganisationName string: Name of the team this Sandbox should be created under.
    • parentSandboxName string: Name of the Sandbox this should be created under, if exists will be a 'clone'.
    • transportType string (values: HTTP)

Error

  • Error object
    • code string
    • detailedMessage string: Longer message describing the error.
    • field string: Message describing which field the error relates to.
    • message string: Short message describing the error.

RouteConfig

  • RouteConfig object
    • errorStrategy string (values: NONE, TIMEOUT, SERVICE_DOWN)
    • latencyMs integer
    • latencyMultiplier integer
    • latencyType string (values: NONE, CONSTANT, LINEAR)
    • method string
    • path string

RuntimeRequest

  • RuntimeRequest object
    • body string: The body of the given request.
    • contentType string: The content type of the body, for example 'application/json'.
    • fullSandboxId string: The parent ID of the Sandbox that received the request.
    • fullSandboxName string: The parent name of the Sandbox that received the request.
    • headers object: Transport headers for the given request.
    • ip string: The requestor IP address.
    • properties object
    • receivedTimestamp integer: The epoch time in milliseconds when the request was received.
    • sandboxId string: The ID of the Sandbox that received the request.
    • sandboxName string: The name of the Sandbox that received the request.
    • transport string: Which transport the request was for, 'HTTP'.

RuntimeResponse

  • RuntimeResponse object
    • body string: The body of the given response.
    • durationMillis integer: Duration in milliseconds of the processing time in Sandbox.
    • error Error
    • headers object: Transport headers for the given response.
    • respondedTimestamp integer: The epoch time in milliseconds when the response was sent.
    • responseDelay integer: Duration in milliseconds of the response delay.
    • transport string: Which transport the request was for, 'HTTP'.

RuntimeTransaction

Sandbox

  • Sandbox object
    • apiDefinition string (values: None, Apiary, Swagger_V2_Json, RAML_V08, WSDL): The import source of this Sandbox.
    • childSandboxes array: Clones of this Sandbox.
    • configuredRoutes array: Extra configuration applied to some routes, delays, overrides etc.
    • description string
    • gitAccessToken string
    • gitUrl string: The git clone URL.
    • hasRepository boolean: Whether this Sandbox has a git repository or not.
    • id string: The ID of the Sandbox.
    • ipWhitelist array: The list of IPs allowed to make requests, all allowed if omitted.
      • items string
    • name required string
    • parentSandbox Sandbox
    • properties object
    • proxyStatus string (values: STARTED, STOPPED): The listener status.
    • runtimeVersion string (values: VERSION_1, VERSION_2): The library version of this Sandbox.
    • sandboxUrl string: The request URL for this Sandbox.
    • stackType string (values: JavaScript)
    • transportType string (values: HTTP): The listener transport.
6.0.0

4 years ago

5.0.0

7 years ago

4.0.0

7 years ago

3.0.0

8 years ago

2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

0.0.3

9 years ago

0.0.1

9 years ago