6.0.0 • Published 4 years ago
@datafire/getsandbox v6.0.0
@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
- fromTimestamp
Output
- output
array
- items ActivityMessage
getSandboxes
getSandboxes
getsandbox.getSandboxes({}, context)
Input
- input
object
- filterType
string
- filterType
Output
- output
array
- items Sandbox
createSandbox
createSandbox
getsandbox.createSandbox({
"body": {}
}, context)
Input
- input
object
- body required CreateSandbox
Output
- output Sandbox
deleteSandbox
deleteSandbox
getsandbox.deleteSandbox({
"sandboxName": ""
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox
- sandboxName required
Output
Output schema unknown
getSandbox
getSandbox
getsandbox.getSandbox({
"sandboxName": ""
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox
- sandboxName required
Output
- output Sandbox
updateSandbox
updateSandbox
getsandbox.updateSandbox({
"sandboxName": "",
"body": {
"name": ""
}
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox - body required Sandbox
- sandboxName required
Output
- output Sandbox
forkSandbox
forkSandbox
getsandbox.forkSandbox({
"sandboxName": ""
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox
- sandboxName required
Output
- output Sandbox
deleteSandboxState
deleteSandboxState
getsandbox.deleteSandboxState({
"sandboxName": ""
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox
- sandboxName required
Output
Output schema unknown
getSandboxState
getSandboxState
getsandbox.getSandboxState({
"sandboxName": ""
}, context)
Input
- input
object
- sandboxName required
string
: Name of the Sandbox
- sandboxName required
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
- createdTimestamp
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
- activeErrorOverride
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)
- commitBaseTemplate
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.
- code
RouteConfig
- RouteConfig
object
- errorStrategy
string
(values: NONE, TIMEOUT, SERVICE_DOWN) - latencyMs
integer
- latencyMultiplier
integer
- latencyType
string
(values: NONE, CONSTANT, LINEAR) - method
string
- path
string
- errorStrategy
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'.
- body
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'.
- body
RuntimeTransaction
- RuntimeTransaction
object
- request RuntimeRequest
- responses
array
- items RuntimeResponse
- sandboxName
string
: The source sandbox name.
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.- items Sandbox
- configuredRoutes
array
: Extra configuration applied to some routes, delays, overrides etc.- items ConfiguredRouteDetails
- 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
- items
- 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.
- apiDefinition