Client library for Otoroshi Admin
npm install --save @datafire/maif_local_otoroshi
let maif_local_otoroshi = require('@datafire/maif_local_otoroshi').create({
username: "",
password: ""
});
.then(data => {
console.log(data);
});
Admin API of the Otoroshi reverse proxy
Get all api keys
maif_local_otoroshi.allApiKeys(null, context)
This action has no parameters
- output
array
- items ApiKey
Get the full configuration of Otoroshi
maif_local_otoroshi.globalConfig(null, context)
This action has no parameters
- output GlobalConfig
Update the global configuration with a diff
maif_local_otoroshi.patchGlobalConfig({
"body": []
}, context)
- input
object
- body required Patch
- output GlobalConfig
Update the global configuration
maif_local_otoroshi.putGlobalConfig({
"body": {
"streamEntityOnly": true,
"autoLinkToDefaultGroup": true,
"limitConcurrentRequests": true,
"maxConcurrentRequests": 0,
"useCircuitBreakers": true,
"apiReadOnly": true,
"u2fLoginOnly": true,
"ipFiltering": {
"whitelist": [],
"blacklist": []
},
"throttlingQuota": 0,
"perIpThrottlingQuota": 0,
"analyticsEventsUrl": "",
"analyticsWebhooks": [],
"alertsWebhooks": [],
"alertsEmails": [],
"endlessIpAddresses": []
}
}, context)
- input
object
- body required GlobalConfig
- output GlobalConfig
Get all service groups
maif_local_otoroshi.allServiceGroups(null, context)
This action has no parameters
- output
array
- items Group
Create a new service group
maif_local_otoroshi.createGroup({
"body": {
"id": "",
"name": ""
}
}, context)
- input
object
- body required Group
- output Group
Get all api keys for the group of a service
maif_local_otoroshi.apiKeysFromGroup({
"groupId": ""
}, context)
- input
object
- groupId required
string
: The api key group id
- groupId required
- output
array
- items ApiKey
Create a new api key for a group
maif_local_otoroshi.createApiKeyFromGroup({
"groupId": "",
"body": {
"clientId": "",
"clientSecret": "",
"clientName": "",
"authorizedGroup": "",
"enabled": true
}
}, context)
- input
object
- groupId required
string
: The api key group id - body required ApiKey
- groupId required
- output ApiKey
Delete an api key for a specified service group
maif_local_otoroshi.deleteApiKeyFromGroup({
"groupId": "",
"clientId": ""
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id
- groupId required
- output Deleted
Get an api key for a specified service group
maif_local_otoroshi.apiKeyFromGroup({
"groupId": "",
"clientId": ""
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id
- groupId required
- output ApiKey
Update an api key for a specified service descriptor with a diff
maif_local_otoroshi.patchApiKeyFromGroup({
"groupId": "",
"clientId": "",
"body": []
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id - body required Patch
- groupId required
- output ApiKey
Update an api key for a specified service group
maif_local_otoroshi.updateApiKeyFromGroup({
"groupId": "",
"clientId": "",
"body": {
"clientId": "",
"clientSecret": "",
"clientName": "",
"authorizedGroup": "",
"enabled": true
}
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id - body required ApiKey
- groupId required
- output ApiKey
Reset the quota state of an api key
maif_local_otoroshi.resetApiKeyFromGroupQuotas({
"groupId": "",
"clientId": ""
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id
- groupId required
- output Quotas
Get the quota state of an api key
maif_local_otoroshi.apiKeyFromGroupQuotas({
"groupId": "",
"clientId": ""
}, context)
- input
object
- groupId required
string
: The api key group id - clientId required
string
: the api key id
- groupId required
- output Quotas
Delete a service group
maif_local_otoroshi.deleteGroup({
"serviceGroupId": ""
}, context)
- input
object
- serviceGroupId required
string
: The service group id
- serviceGroupId required
- output Deleted
Get a service group
maif_local_otoroshi.serviceGroup({
"serviceGroupId": ""
}, context)
- input
object
- serviceGroupId required
string
: The service group id
- serviceGroupId required
- output Group
Update a service group with a diff
maif_local_otoroshi.patchGroup({
"serviceGroupId": "",
"body": []
}, context)
- input
object
- serviceGroupId required
string
: The service group id - body required Patch
- serviceGroupId required
- output Group
Update a service group
maif_local_otoroshi.updateGroup({
"serviceGroupId": "",
"body": {
"id": "",
"name": ""
}
}, context)
- input
object
- serviceGroupId required
string
: The service group id - body required Group
- serviceGroupId required
- output Group
Get all services descriptor for a group
maif_local_otoroshi.serviceGroupServices({
"serviceGroupId": ""
}, context)
- input
object
- serviceGroupId required
string
: The service group id
- serviceGroupId required
- output
array
- items ApiKey
Import the full state of Otoroshi as a file
maif_local_otoroshi.fullImportFromFile({
"body": {
"label": "",
"dateRaw": 0,
"date": "",
"stats": {
"calls": 0,
"dataIn": 0,
"dataOut": 0
},
"config": {
"streamEntityOnly": true,
"autoLinkToDefaultGroup": true,
"limitConcurrentRequests": true,
"maxConcurrentRequests": 0,
"useCircuitBreakers": true,
"apiReadOnly": true,
"u2fLoginOnly": true,
"ipFiltering": {
"whitelist": [],
"blacklist": []
},
"throttlingQuota": 0,
"perIpThrottlingQuota": 0,
"analyticsEventsUrl": "",
"analyticsWebhooks": [],
"alertsWebhooks": [],
"alertsEmails": [],
"endlessIpAddresses": []
},
"admins": [],
"simpleAdmins": [],
"serviceGroups": [],
"apiKeys": [],
"serviceDescriptors": [],
"errorTemplates": []
}
}, context)
- input
object
- body required ImportExport
- output Done
Get global otoroshi stats
maif_local_otoroshi.globalLiveStats(null, context)
This action has no parameters
- output Stats
Get live feed of global otoroshi stats (global) or for a service {id}
maif_local_otoroshi.serviceLiveStats({
"id": ""
}, context)
- input
object
- id required
string
: The service id or global for otoroshi stats
- id required
- output Stats
Export the full state of Otoroshi
maif_local_otoroshi.fullExport(null, context)
This action has no parameters
- output ImportExport
Import the full state of Otoroshi
maif_local_otoroshi.fullImport({
"body": {
"label": "",
"dateRaw": 0,
"date": "",
"stats": {
"calls": 0,
"dataIn": 0,
"dataOut": 0
},
"config": {
"streamEntityOnly": true,
"autoLinkToDefaultGroup": true,
"limitConcurrentRequests": true,
"maxConcurrentRequests": 0,
"useCircuitBreakers": true,
"apiReadOnly": true,
"u2fLoginOnly": true,
"ipFiltering": {
"whitelist": [],
"blacklist": []
},
"throttlingQuota": 0,
"perIpThrottlingQuota": 0,
"analyticsEventsUrl": "",
"analyticsWebhooks": [],
"alertsWebhooks": [],
"alertsEmails": [],
"endlessIpAddresses": []
},
"admins": [],
"simpleAdmins": [],
"serviceGroups": [],
"apiKeys": [],
"serviceDescriptors": [],
"errorTemplates": []
}
}, context)
- input
object
- body required ImportExport
- output Done
Get all services
maif_local_otoroshi.allServices(null, context)
This action has no parameters
- output
array
- items Service
Create a new service descriptor
maif_local_otoroshi.createService({
"body": {
"id": "",
"groupId": "",
"name": "",
"env": "",
"domain": "",
"subdomain": "",
"targets": [],
"root": "",
"enabled": true,
"privateApp": true,
"forceHttps": true,
"maintenanceMode": true,
"buildMode": true,
"enforceSecureCommunication": true
}
}, context)
- input
object
- body required Service
- output Service
Delete a service descriptor
maif_local_otoroshi.deleteService({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output Deleted
Get a service descriptor
maif_local_otoroshi.service({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output Service
Update a service descriptor with a diff
maif_local_otoroshi.patchService({
"serviceId": "",
"body": []
}, context)
- input
object
- serviceId required
string
: The service id - body required Patch
- serviceId required
- output Service
Update a service descriptor
maif_local_otoroshi.updateService({
"serviceId": "",
"body": {
"id": "",
"groupId": "",
"name": "",
"env": "",
"domain": "",
"subdomain": "",
"targets": [],
"root": "",
"enabled": true,
"privateApp": true,
"forceHttps": true,
"maintenanceMode": true,
"buildMode": true,
"enforceSecureCommunication": true
}
}, context)
- input
object
- serviceId required
string
: The service id - body required Service
- serviceId required
- output Service
Get all api keys for the group of a service
maif_local_otoroshi.apiKeys({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id
- serviceId required
- output
array
- items ApiKey
Create a new api key for a service
maif_local_otoroshi.createApiKey({
"serviceId": "",
"body": {
"clientId": "",
"clientSecret": "",
"clientName": "",
"authorizedGroup": "",
"enabled": true
}
}, context)
- input
object
- serviceId required
string
: The api key service id - body required ApiKey
- serviceId required
- output ApiKey
Delete an api key for a specified service descriptor
maif_local_otoroshi.deleteApiKey({
"serviceId": "",
"clientId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id
- serviceId required
- output Deleted
Get an api key for a specified service descriptor
maif_local_otoroshi.apiKey({
"serviceId": "",
"clientId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id
- serviceId required
- output ApiKey
Update an api key for a specified service descriptor with a diff
maif_local_otoroshi.patchApiKey({
"serviceId": "",
"clientId": "",
"body": []
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id - body required Patch
- serviceId required
- output ApiKey
Update an api key for a specified service descriptor
maif_local_otoroshi.updateApiKey({
"serviceId": "",
"clientId": "",
"body": {
"clientId": "",
"clientSecret": "",
"clientName": "",
"authorizedGroup": "",
"enabled": true
}
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id - body required ApiKey
- serviceId required
- output ApiKey
Get the group of an api key
maif_local_otoroshi.apiKeyGroup({
"serviceId": "",
"clientId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id
- serviceId required
- output Group
Reset the quota state of an api key
maif_local_otoroshi.resetApiKeyQuotas({
"serviceId": "",
"clientId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id
- serviceId required
- output Quotas
Get the quota state of an api key
maif_local_otoroshi.apiKeyQuotas({
"serviceId": "",
"clientId": ""
}, context)
- input
object
- serviceId required
string
: The api key service id - clientId required
string
: the api key id
- serviceId required
- output Quotas
Delete a service descriptor target
maif_local_otoroshi.serviceDeleteTarget({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output
array
- items Target
Get a service descriptor targets
maif_local_otoroshi.serviceTargets({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output
array
- items Target
Update a service descriptor targets
maif_local_otoroshi.updateServiceTargets({
"serviceId": "",
"body": []
}, context)
- input
object
- serviceId required
string
: The service id - body required Patch
- serviceId required
- output
array
- items Target
Add a target to a service descriptor
maif_local_otoroshi.serviceAddTarget({
"serviceId": "",
"body": {
"host": "",
"scheme": ""
}
}, context)
- input
object
- serviceId required
string
: The service id - body required Target
- serviceId required
- output
array
- items Target
Delete a service descriptor error template
maif_local_otoroshi.deleteServiceTemplate({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output Deleted
Get a service descriptor error template
maif_local_otoroshi.serviceTemplate({
"serviceId": ""
}, context)
- input
object
- serviceId required
string
: The service id
- serviceId required
- output ErrorTemplate
Update a service descriptor targets
maif_local_otoroshi.createServiceTemplate({
"serviceId": "",
"body": {
"serviceId": "",
"template40x": "",
"template50x": "",
"templateBuild": "",
"templateMaintenance": "",
"messages": {}
}
}, context)
- input
object
- serviceId required
string
: The service id - body required ErrorTemplate
- serviceId required
- output ErrorTemplate
Update an error template to a service descriptor
maif_local_otoroshi.updateServiceTemplate({
"serviceId": "",
"body": {
"serviceId": "",
"template40x": "",
"template50x": "",
"templateBuild": "",
"templateMaintenance": "",
"messages": {}
}
}, context)
- input
object
- serviceId required
string
: The service id - body required ErrorTemplate
- serviceId required
- output ErrorTemplate
Import the full state of Otoroshi as a file
maif_local_otoroshi.health(null, context)
This action has no parameters
- output OtoroshiHealth
Get all environments provided by the current Otoroshi instance
maif_local_otoroshi.allLines(null, context)
This action has no parameters
- output Environment
Get all services for an environment provided by the current Otoroshi instance
maif_local_otoroshi.servicesForALine({
"line": ""
}, context)
- input
object
- line required
string
: The environment where to find services
- line required
- output
array
- items Service
Get a template of an Otoroshi Api Key. The generated entity is not persisted
maif_local_otoroshi.initiateApiKey(null, context)
This action has no parameters
- output ApiKey
Get a template of an Otoroshi service group. The generated entity is not persisted
maif_local_otoroshi.initiateServiceGroup(null, context)
This action has no parameters
- output Group
Get a template of an Otoroshi service descriptor. The generated entity is not persisted
maif_local_otoroshi.initiateService(null, context)
This action has no parameters
- output Service
- ApiKey
object
: An Otoroshi Api Key. An Api Key is defined for a group of services to allow usage of the same Api Key for multiple services.- authorizedGroup required
string
: The group id on which the key is authorized - clientId required
string
: The unique id of the Api Key. Usually 16 random alpha numerical characters, but can be anything - clientName required
string
: The name of the api key, for humans ;-) - clientSecret required
string
: The secret of the Api Key. Usually 64 random alpha numerical characters, but can be anything - dailyQuota
integer
: Authorized number of calls per day - enabled required
boolean
: Whether or not the key is enabled. If disabled, resources won't be available to calls using this key - metadata
object
: Bunch of metadata for the key - monthlyQuota
integer
: Authorized number of calls per month - throttlingQuota
integer
: Authorized number of calls per second, measured on 10 seconds
- authorizedGroup required
- Auth0Config
object
: Configuration for Auth0 domain- callbackUrl required
string
: Auth0 callback URL - clientId required
string
: Auth0 client id - clientSecret required
string
: Auth0 client secret - domain required
string
: Auth0 domain
- callbackUrl required
- Canary
object
: The configuration of the canary mode for a service descriptor- enabled required
boolean
: Use canary mode for this service - root required
string
: Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar - targets required
array
: The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures- items Target
- traffic required
integer
: Ratio of traffic that will be sent to canary targets.
- enabled required
- CleverSettings
object
: Configuration for CleverCloud client- consumerKey required
string
: CleverCloud consumer key - consumerSecret required
string
: CleverCloud consumer token - orgaId required
string
: CleverCloud organization id - secret required
string
: CleverCloud oauth secret - token required
string
: CleverCloud oauth token
- consumerKey required
- ClientConfig
object
: The configuration of the circuit breaker for a service descriptor- backoffFactor required
integer
: Specify the factor to multiply the delay for each retry - callTimeout required
integer
: Specify how long each call should last at most in milliseconds - globalTimeout required
integer
: Specify how long the global call (with retries) should last at most in milliseconds - maxErrors required
integer
: Specify how many errors can pass before opening the circuit breaker - retries required
integer
: Specify how many times the client will try to fetch the result of the request after an error before giving up. - retryInitialDelay required
integer
: Specify the delay between two retries. Each retry, the delay is multiplied by the backoff factor - sampleInterval required
integer
: Specify the sliding window time for the circuit breaker in milliseconds, after this time, error count will be reseted - useCircuitBreaker required
boolean
: Use a circuit breaker to avoid cascading failure when calling chains of services. Highly recommended !
- backoffFactor required
- Deleted
object
- deleted required
boolean
- deleted required
- Done
object
- done required
boolean
- done required
- Environment
string
: The name of the environment for service descriptors
- ErrorTemplate
object
: Error templates for a service descriptor- messages required
object
: Map for custom messages - serviceId required
string
: The Id of the service for which the error template is enabled - template40x required
string
: The html template for 40x errors - template50x required
string
: The html template for 50x errors - templateBuild required
string
: The html template for build page - templateMaintenance required
string
: The html template for maintenance page
- messages required
- ExposedApi
object
: The Open API configuration for your service (if one)- exposeApi required
boolean
: Whether or not the current service expose an API with an Open API descriptor - openApiDescriptorUrl
string
: The URL of the Open API descriptor
- exposeApi required
- GlobalConfig
object
: The global config object of Otoroshi, used to customize settings of the current Otoroshi instance- alertsEmails required
array
: Email addresses that will receive all Otoroshi alert events- items
string
- items
- alertsWebhooks required
array
: Webhook that will receive all Otoroshi alert events- items Webhook
- analyticsEventsUrl required
string
: The URL to get analytics events from - analyticsWebhooks required
array
: Webhook that will receive all internal Otoroshi events- items Webhook
- apiReadOnly required
boolean
: If enabled, Admin API won't be able to write/update/delete entities - autoLinkToDefaultGroup required
boolean
: If not defined, every new service descriptor will be added to the default group - backofficeAuth0Config Auth0Config
- cleverSettings CleverSettings
- endlessIpAddresses required
array
: IP addresses for which any request to Otoroshi will respond with 128 Gb of zeros- items
string
- items
- ipFiltering required IpFiltering
- limitConcurrentRequests required
boolean
: If enabled, Otoroshi will reject new request if too much at the same time - lines
array
: Possibles lines for Otoroshi- items
string
- items
- mailGunSettings MailgunSettings
- maxConcurrentRequests required
integer
: The number of authorized request processed at the same time - maxHttp10ResponseSize
integer
: The max size in bytes of an HTTP 1.0 response - maxLogsSize
integer
: Number of events kept locally - middleFingers
boolean
: Use middle finger emoji as a response character for endless HTTP responses - perIpThrottlingQuota required
integer
: Authorized number of calls per second globally per IP address, measured on 10 seconds - privateAppsAuth0Config Auth0Config
- streamEntityOnly required
boolean
: HTTP will be streamed only. Doesn't work with old browsers - throttlingQuota required
integer
: Authorized number of calls per second globally, measured on 10 seconds - u2fLoginOnly required
boolean
: If enabled, login to backoffice through Auth0 will be disabled - useCircuitBreakers required
boolean
: If enabled, services will be authorized to use circuit breakers
- alertsEmails required
- Group
object
: An Otoroshi service group is just a group of service descriptor. It is useful to be able to define Api Keys for the whole group- description
string
: The descriptoin of the group - id required
string
: The unique id of the group. Usually 64 random alpha numerical characters, but can be anything - name required
string
: The name of the group
- description
- HealthCheck
object
: The configuration for checking health of a service. Otoroshi will perform GET call on the URL to check if the service is still alive- enabled required
boolean
: Whether or not healthcheck is enabled on the current service descriptor - url
string
: The URL to check
- enabled required
- ImportExport
object
: The structure that can be imported to or exported from Otoroshi. It represent the memory state of Otoroshi- admins required
array
: Current U2F admin at the time of export- items
object
: Administrator using FIDO U2F device to access Otoroshi- createdAt required
integer
: The creation date of the user - label required
string
: The label for the user - password required
string
: The hashed password of the user - registration required
object
: The U2F registration slug - username required
string
: The email address of the user
- createdAt required
- items
- apiKeys required
array
: Current apik keys at the time of export- items
object
: An Otoroshi Api Key. An Api Key is defined for a group of services to allow usage of the same Api Key for multiple services.- authorizedGroup required
string
: The group id on which the key is authorized - clientId required
string
: The unique id of the Api Key. Usually 16 random alpha numerical characters, but can be anything - clientName required
string
: The name of the api key, for humans ;-) - clientSecret required
string
: The secret of the Api Key. Usually 64 random alpha numerical characters, but can be anything - dailyQuota
integer
: Authorized number of calls per day - enabled required
boolean
: Whether or not the key is enabled. If disabled, resources won't be available to calls using this key - metadata
object
: Bunch of metadata for the key - monthlyQuota
integer
: Authorized number of calls per month - throttlingQuota
integer
: Authorized number of calls per second, measured on 10 seconds
- authorizedGroup required
- items
- appConfig
object
: Current env variables at the time of export - config required GlobalConfig
- date required
string
- dateRaw required
integer
- errorTemplates required
array
: Current error templates at the time of export- items
object
: Error templates for a service descriptor- messages required
object
: Map for custom messages - serviceId required
string
: The Id of the service for which the error template is enabled - template40x required
string
: The html template for 40x errors - template50x required
string
: The html template for 50x errors - templateBuild required
string
: The html template for build page - templateMaintenance required
string
: The html template for maintenance page
- messages required
- items
- label required
string
- serviceDescriptors required
array
: Current service descriptors at the time of export- items
object
: An otoroshi service descriptor. Represent a forward HTTP call on a domain to another location with some optional api management mecanism- Canary Canary
- additionalHeaders
object
: Specify headers that will be added to each client request. Useful to add authentication - api ExposedApi
- buildMode required
boolean
: Display a construction page when a user try to use the service - clientConfig ClientConfig
- domain required
string
: The domain on which the service is available. - enabled required
boolean
: Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist - enforceSecureCommunication required
boolean
: When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside - env required
string
: The line on which the service is available. Based on that value, the name of the line will be appended to the subdomain. For line prod, nothing will be appended. For example, if the subdomain is 'foo' and line is 'preprod', then the exposed service will be available at 'foo.preprod.mydomain' - forceHttps required
boolean
: Will force redirection to https:// if not present - groupId required
string
: Each service descriptor is attached to a group. A group can have one or more services. Each API key is linked to a group and allow access to every service in the group - healthCheck HealthCheck
- id required
string
: A unique random string to identify your service - ipFiltering IpFiltering
- localHost
string
: The host used localy, mainly localhost:xxxx - localScheme
string
: The scheme used localy, mainly http - maintenanceMode required
boolean
: Display a maintainance page when a user try to use the service - matchingHeaders
object
: Specify headers that MUST be present on client request to route it. Useful to implement versioning - matchingRoot
string
: The root path on which the service is available - metadata
object
: Just a bunch of random properties - name required
string
: The name of your service. Only for debug and human readability purposes - privateApp required
boolean
: When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain - privatePatterns
array
: If you define a public pattern that is a little bit too much, you can make some of public URL private again- items
string
- items
- publicPatterns
array
: By default, every services are private only and you'll need an API key to access it. However, if you want to expose a public UI, you can define one or more public patterns (regex) to allow access to anybody. For example if you want to allow anybody on any URL, just use '/.*'- items
string
- items
- redirectToLocal
boolean
: If you work locally with Otoroshi, you may want to use that feature to redirect one particuliar service to a local host. For example, you can relocate https://foo.preprod.bar.com to http://localhost:8080 to make some tests - root required
string
: Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar - secComExcludedPatterns
array
: URI patterns excluded from secured communications- items
string
- items
- sendOtoroshiHeadersBack
boolean
: When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ... - statsdConfig StatsdConfig
- subdomain required
string
: The subdomain on which the service is available - targets required
array
: The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures- items Target
- items
- serviceGroups required
array
: Current service groups at the time of export- items
object
: An Otoroshi service group is just a group of service descriptor. It is useful to be able to define Api Keys for the whole group- description
string
: The descriptoin of the group - id required
string
: The unique id of the group. Usually 64 random alpha numerical characters, but can be anything - name required
string
: The name of the group
- description
- items
- simpleAdmins required
array
: Current simple admins at the time of export- items
object
: Administrator using just login/password tuple to access Otoroshi- createdAt required
integer
: The creation date of the user - label required
string
: The label for the user - password required
string
: The hashed password of the user - username required
string
: The email address of the user
- createdAt required
- items
- stats required ImportExportStats
- admins required
- ImportExportStats
object
: Global stats for the current Otoroshi instances- calls required
integer
: Number of calls to Otoroshi globally - dataIn required
integer
: The amount of data sent to Otoroshi globally - dataOut required
integer
: The amount of data sent from Otoroshi globally
- calls required
- IpFiltering
object
: The filtering configuration block for a service of globally.- blacklist required
array
: Blacklisted IP addresses- items
string
- items
- whitelist required
array
: Whitelisted IP addresses- items
string
- items
- blacklist required
- MailgunSettings
object
: Configuration for mailgun api client- apiKey required
string
: Mailgun Api Key - domain required
string
: Mailgun domain
- apiKey required
- OtoroshiHealth
object
: The structure that represent current Otoroshi health- datastore required
string
(values: healthy, unhealthy, unreachable) - otoroshi required
string
(values: healthy, unhealthy, down)
- datastore required
- Patch
array
: A set of changes described in JSON Patch format: http://jsonpatch.com/ (RFC 6902)- items
object
- op required
string
(values: add, replace, remove, copy, test) - path required
string
- op required
- items
- Quotas
object
: Quotas state for an api key on a service group- authorizedCallsPerDay required
integer
: The number of authorized calls per day - authorizedCallsPerMonth required
integer
: The number of authorized calls per month - authorizedCallsPerSec required
integer
: The number of authorized calls per second - currentCallsPerDay required
integer
: The current number of calls per day - currentCallsPerMonth required
integer
: The current number of calls per month - currentCallsPerSec required
integer
: The current number of calls per second - remainingCallsPerDay required
integer
: The remaining number of calls per day - remainingCallsPerMonth required
integer
: The number of authorized calls per month - remainingCallsPerSec required
integer
: The remaining number of calls per second
- authorizedCallsPerDay required
- Service
object
: An otoroshi service descriptor. Represent a forward HTTP call on a domain to another location with some optional api management mecanism- Canary Canary
- additionalHeaders
object
: Specify headers that will be added to each client request. Useful to add authentication - api ExposedApi
- buildMode required
boolean
: Display a construction page when a user try to use the service - clientConfig ClientConfig
- domain required
string
: The domain on which the service is available. - enabled required
boolean
: Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist - enforceSecureCommunication required
boolean
: When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside - env required
string
: The line on which the service is available. Based on that value, the name of the line will be appended to the subdomain. For line prod, nothing will be appended. For example, if the subdomain is 'foo' and line is 'preprod', then the exposed service will be available at 'foo.preprod.mydomain' - forceHttps required
boolean
: Will force redirection to https:// if not present - groupId required
string
: Each service descriptor is attached to a group. A group can have one or more services. Each API key is linked to a group and allow access to every service in the group - healthCheck HealthCheck
- id required
string
: A unique random string to identify your service - ipFiltering IpFiltering
- localHost
string
: The host used localy, mainly localhost:xxxx - localScheme
string
: The scheme used localy, mainly http - maintenanceMode required
boolean
: Display a maintainance page when a user try to use the service - matchingHeaders
object
: Specify headers that MUST be present on client request to route it. Useful to implement versioning - matchingRoot
string
: The root path on which the service is available - metadata
object
: Just a bunch of random properties - name required
string
: The name of your service. Only for debug and human readability purposes - privateApp required
boolean
: When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain - privatePatterns
array
: If you define a public pattern that is a little bit too much, you can make some of public URL private again- items
string
- items
- publicPatterns
array
: By default, every services are private only and you'll need an API key to access it. However, if you want to expose a public UI, you can define one or more public patterns (regex) to allow access to anybody. For example if you want to allow anybody on any URL, just use '/.*'- items
string
- items
- redirectToLocal
boolean
: If you work locally with Otoroshi, you may want to use that feature to redirect one particuliar service to a local host. For example, you can relocate https://foo.preprod.bar.com to http://localhost:8080 to make some tests - root required
string
: Otoroshi will append this root to any target choosen. If the specified root is '/api/foo', then a request to https://yyyyyyy/bar will actually hit https://xxxxxxxxx/api/foo/bar - secComExcludedPatterns
array
: URI patterns excluded from secured communications- items
string
- items
- sendOtoroshiHeadersBack
boolean
: When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ... - statsdConfig StatsdConfig
- subdomain required
string
: The subdomain on which the service is available - targets required
array
: The list of target that Otoroshi will proxy and expose through the subdomain defined before. Otoroshi will do round-robin load balancing between all those targets with circuit breaker mecanism to avoid cascading failures- items Target
- SimpleAdmin
object
: Administrator using just login/password tuple to access Otoroshi- createdAt required
integer
: The creation date of the user - label required
string
: The label for the user - password required
string
: The hashed password of the user - username required
string
: The email address of the user
- createdAt required
- Stats
object
: Live stats for a service or globally- calls required
integer
: Number of calls on the specified service or globally - concurrentHandledRequests required
integer
: The number of concurrent request currently - dataIn required
integer
: The amount of data sent to the specified service or Otoroshi globally - dataInRate required
integer
: The rate of data sent to the specified service or Otoroshi globally - dataOut required
integer
: The amount of data sent from the specified service or Otoroshi globally - dataOutRate required
integer
: The rate of data sent from the specified service or Otoroshi globally - duration required
integer
: The average duration for a call - overhead required
integer
: The average overhead time induced by Otoroshi for each call - rate required
integer
: The rate of data sent from and to the specified service or Otoroshi globally
- calls required
- StatsdConfig
object
: The configuration for statsd metrics push- datadog required
boolean
: Datadog agent - host required
string
: The host of the StatsD agent - port required
integer
: The port of the StatsD agent
- datadog required
- Target
object
: A Target is where an HTTP call will be forwarded in the end from a service domain- host required
string
: The host on which the HTTP call will be forwarded. Can be a domain name, or an IP address. Can also have a port - scheme required
string
: The protocol used for communication. Can be http or https
- host required
- U2FAdmin
object
: Administrator using FIDO U2F device to access Otoroshi- createdAt required
integer
: The creation date of the user - label required
string
: The label for the user - password required
string
: The hashed password of the user - registration required
object
: The U2F registration slug - username required
string
: The email address of the user
- createdAt required
- Webhook
object
: A callback URL where events are posted- headers required
object
: Headers to authorize the call or whatever - url required
string
: The URL where events are posted
- headers required