v1

latestOpenAPI 3.0.0Apache 2.02026-07-1410280162.7 KB
services

Update a service descriptor with a diff

Update a service descriptor with a diff

patch/api/services/{serviceId}

Path parameters

serviceIdstring required

The service id

Request body

op'add' | 'replace' | 'remove' | 'copy' | 'test' required
pathstring required
{"stackTrail":"components:schemas:Patch:items:properties:value","oasType":"schema","type":"unknown"}

Example request

[
  {
    "path": "a string value"
  }
]

Response

Successful operation

additionalHeadersobject

Specify headers that will be added to each client request. Useful to add authentication

authConfigRefstring

A reference to a global auth module config

buildModeboolean required

Display a construction page when a user try to use the service

clientValidatorRefstring

A reference to validation authority

domainstring required

The domain on which the service is available.

enabledboolean required

Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist

enforceSecureCommunicationboolean required

When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside

envstring required

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'

forceHttpsboolean required

Will force redirection to https:// if not present

groupsstring[] required

Each service descriptor is attached to groups. 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

headersVerificationobject

Specify headers that will be verified after routing.

idstring uuid required

A unique random string to identify your service

localHoststring

The host used localy, mainly localhost:xxxx

localSchemestring

The scheme used localy, mainly http

maintenanceModeboolean required

Display a maintainance page when a user try to use the service

matchingHeadersobject

Specify headers that MUST be present on client request to route it. Useful to implement versioning

matchingRootstring

The root path on which the service is available

metadataobject

Just a bunch of random properties

namestring required

The name of your service. Only for debug and human readability purposes

overrideHostboolean

Host header will be overriden with Host of the target

privateAppboolean required

When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain

privatePatternsstring[]

If you define a public pattern that is a little bit too much, you can make some of public URL private again

publicPatternsstring[]

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 '/.*'

redirectToLocalboolean

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

rootstring required

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

secComExcludedPatternsstring[]

URI patterns excluded from secured communications

sendOtoroshiHeadersBackboolean

When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ...

subdomainstring required

The subdomain on which the service is available

transformerRefstring

A reference to a request transformer

userFacingboolean

The fact that this service will be seen by users and cannot be impacted by the Snow Monkey

xForwardedHeadersboolean

Send X-Forwarded-* headers

Example response

{
  "Canary": {
    "enabled": true,
    "root": "a string value",
    "targets": [
      {
        "host": "www.google.com",
        "scheme": "a string value"
      }
    ],
    "traffic": 123123
  },
  "additionalHeaders": {
    "key": "value"
  },
  "api": {
    "exposeApi": true,
    "openApiDescriptorUrl": "http://www.google.com"
  },
  "authConfigRef": "a string value",
  "buildMode": true,
  "chaosConfig": {
    "badResponsesFaultConfig": {
      "ratio": 42.2,
      "responses": [
        {
          "body": "a string value",
          "headers": {
            "key": "value"
          },
          "status": 123123
        }
      ]
    },
    "enabled": true,
    "largeRequestFaultConfig": {
      "additionalRequestSize": 123123,
      "ratio": 42.2
    },
    "largeResponseFaultConfig": {
      "additionalRequestSize": 123123,
      "ratio": 42.2
    },
    "latencyInjectionFaultConfig": {
      "from": 123123,
      "ratio": 42.2,
      "to": 123123
    }
  },
  "clientConfig": {
    "backoffFactor": 123123,
    "callTimeout": 123123,
    "globalTimeout": 123123,
    "maxErrors": 123123,
    "retries": 123123,
    "retryInitialDelay": 123123,
    "sampleInterval": 123123,
    "useCircuitBreaker": true
  },
  "clientValidatorRef": "a string value",
  "cors": {
    "allowCredentials": true,
    "allowHeaders": [
      "a string value"
    ],
    "allowMethods": [
      "a string value"
    ],
    "allowOrigin": "a string value",
    "enabled": true,
    "excludedPatterns": [
      "a string value"
    ],
    "exposeHeaders": [
      "a string value"
    ],
    "maxAge": 123123
  },
  "domain": "a string value",
  "enabled": true,
  "enforceSecureCommunication": true,
  "env": "a string value",
  "forceHttps": true,
  "groups": [
    "a string value"
  ],
  "gzip": {
    "blackList": [
      "a string value"
    ],
    "bufferSize": 123,
    "chunkedThreshold": 123,
    "compressionLevel": 123123,
    "enabled": true,
    "excludedPatterns": [
      "a string value"
    ],
    "whiteList": [
      "a string value"
    ]
  },
  "headersVerification": {
    "key": "value"
  },
  "healthCheck": {
    "enabled": true,
    "url": "http://www.google.com"
  },
  "id": "110e8400-e29b-11d4-a716-446655440000",
  "ipFiltering": {
    "blacklist": [
      "192.192.192.192"
    ],
    "whitelist": [
      "192.192.192.192"
    ]
  },
  "jwtVerifier": {
    "algoSettings": {
      "secret": "a string value",
      "size": 123123,
      "type": "a string value"
    },
    "enabled": true,
    "source": {
      "name": "a string value",
      "type": "a string value"
    },
    "strategy": {
      "type": "a string value",
      "verificationSettings": {
        "fields": {
          "key": "value"
        },
        "mappingSettings": {
          "map": {
            "key": "value"
          },
          "remove": [
            "a string value"
          ],
          "values": {
            "key": "value"
          }
        }
      }
    },
    "strict": true,
    "type": "a string value"
  },
  "localHost": "a string value",
  "localScheme": "a string value",
  "maintenanceMode": true,
  "matchingHeaders": {
    "key": "value"
  },
  "matchingRoot": "a string value",
  "metadata": {
    "key": "value"
  },
  "name": "a string value",
  "overrideHost": true,
  "privateApp": true,
  "privatePatterns": [
    "a string value"
  ],
  "publicPatterns": [
    "a string value"
  ],
  "redirectToLocal": true,
  "redirection": {
    "code": 123123,
    "enabled": true,
    "to": "a string value"
  },
  "root": "a string value",
  "secComExcludedPatterns": [
    "a string value"
  ],
  "secComSettings": {
    "secret": "a string value",
    "size": 123123,
    "type": "a string value"
  },
  "sendOtoroshiHeadersBack": true,
  "statsdConfig": {
    "datadog": true,
    "host": "a string value",
    "port": 123123
  },
  "subdomain": "a string value",
  "targets": [
    {
      "host": "www.google.com",
      "scheme": "a string value"
    }
  ],
  "transformerRef": "a string value",
  "userFacing": true,
  "xForwardedHeaders": true
}