---
title: "Get all services"
method: GET
path: "/api/services"
tags: ["services"]
---

# Get all services

`GET /api/services`

Get all services

## Response `200`

Successful operation

- Service[]
  - `Canary` Canary — The configuration of the canary mode for a service descriptor
    - `enabled` boolean, required — Use canary mode for this service
    - `root` string, 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
    - `targets` Target[], required — 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
      - `host` string, hostname, required — 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` string, required — The protocol used for communication. Can be http or https
    - `traffic` integer, required — Ratio of traffic that will be sent to canary targets.
  - `additionalHeaders` object — Specify headers that will be added to each client request. Useful to add authentication
  - `api` ExposedApi — The Open API configuration for your service (if one)
    - `exposeApi` boolean, required — Whether or not the current service expose an API with an Open API descriptor
    - `openApiDescriptorUrl` string, uri — The URL of the Open API descriptor
  - `authConfigRef` string — A reference to a global auth module config
  - `buildMode` boolean, required — Display a construction page when a user try to use the service
  - `chaosConfig` ChaosConfig — Configuration for the faults that can be injected in requests
    - `badResponsesFaultConfig` BadResponsesFaultConfig — Config for bad requests injection fault
      - `ratio` number, double, required — The percentage of requests affected by this fault. Value should be between 0.0 and 1.0
      - `responses` BadResponse[], required — The possibles responses
        - `body` string, required — The body of the HTTP response
        - `headers` object, required — The HTTP headers of the response
        - `status` integer, required — The HTTP status for the response
    - `enabled` boolean, required — Whether or not this config is enabled
    - `largeRequestFaultConfig` LargeRequestFaultConfig — Config for large request injection fault
      - `additionalRequestSize` integer, required — The size added to the request body in bytes. Added payload will be spaces only.
      - `ratio` number, double, required — The percentage of requests affected by this fault. Value should be between 0.0 and 1.0
    - `largeResponseFaultConfig` LargeResponseFaultConfig — Config for large response injection fault
      - `additionalRequestSize` integer — The size added to the response body in bytes. Added payload will be spaces only.
      - `ratio` number, double, required — The percentage of requests affected by this fault. Value should be between 0.0 and 1.0
    - `latencyInjectionFaultConfig` LatencyInjectionFaultConfig — Config for large latency injection fault
      - `from` integer, required — The start range of latency added to the request
      - `ratio` number, double, required — The percentage of requests affected by this fault. Value should be between 0.0 and 1.0
      - `to` integer, required — The end range of latency added to the request
  - `clientConfig` ClientConfig — The configuration of the circuit breaker for a service descriptor
    - `backoffFactor` integer, required — Specify the factor to multiply the delay for each retry
    - `callTimeout` integer, required — Specify how long each call should last at most in milliseconds
    - `globalTimeout` integer, required — Specify how long the global call (with retries) should last at most in milliseconds
    - `maxErrors` integer, required — Specify how many errors can pass before opening the circuit breaker
    - `retries` integer, required — Specify how many times the client will try to fetch the result of the request after an error before giving up.
    - `retryInitialDelay` integer, required — Specify the delay between two retries. Each retry, the delay is multiplied by the backoff factor
    - `sampleInterval` integer, required — Specify the sliding window time for the circuit breaker in milliseconds, after this time, error count will be reseted
    - `useCircuitBreaker` boolean, required — Use a circuit breaker to avoid cascading failure when calling chains of services. Highly recommended !
  - `clientValidatorRef` string — A reference to validation authority
  - `cors` CorsSettings — The configuration for cors support
    - `allowCredentials` boolean, required — Allow to pass credentials
    - `allowHeaders` string[], required — The cors allowed headers
    - `allowMethods` string[], required — The cors allowed methods
    - `allowOrigin` string, required — The cors allowed origin
    - `enabled` boolean, required — Whether or not cors is enabled
    - `excludedPatterns` string[], required — The cors excluded patterns
    - `exposeHeaders` string[], required — The cors exposed header
    - `maxAge` integer, required — Cors max age
  - `domain` string, required — The domain on which the service is available.
  - `enabled` boolean, required — Activate or deactivate your service. Once disabled, users will get an error page saying the service does not exist
  - `enforceSecureCommunication` boolean, required — When enabled, Otoroshi will try to exchange headers with downstream service to ensure no one else can use the service from outside
  - `env` string, 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'
  - `forceHttps` boolean, required — Will force redirection to https:// if not present
  - `groups` string[], 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
  - `gzip` Gzip — Configuration for gzip of service responses
    - `blackList` string[], required — Blacklisted mime types. Wildcard supported
    - `bufferSize` integer, required — Size of the GZip buffer
    - `chunkedThreshold` integer, required — Threshold for chunking data
    - `compressionLevel` integer, required — Compression level. From 0 to 9
    - `enabled` boolean, required — Whether gzip compression is enabled or not
    - `excludedPatterns` string[], required — Patterns that are excluded from gzipping
    - `whiteList` string[], required — Whitelisted mime types. Wildcard supported
  - `headersVerification` object — Specify headers that will be verified after routing.
  - `healthCheck` HealthCheck — 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` boolean, required — Whether or not healthcheck is enabled on the current service descriptor
    - `url` string, uri — The URL to check
  - `id` string, uuid, required — A unique random string to identify your service
  - `ipFiltering` IpFiltering — The filtering configuration block for a service of globally.
    - `blacklist` string[], required — Blacklisted IP addresses
    - `whitelist` string[], required — Whitelisted IP addresses
  - `jwtVerifier` union
    - LocalJwtVerifier — A JWT verifier used only for the current service descriptor
      - `algoSettings` union, required
        - HSAlgoSettings — Settings for an HMAC + SHA signing algorithm
          - `secret` string, required — The secret value for the HMAC function
          - `size` integer, required — Size for SHA function. can be 256, 384 or 512
          - `type` string, required — String with value HSAlgoSettings
        - RSAlgoSettings — Settings for an HMAC + SHA signing algorithm
          - `privateKey` string — The private key for the RSA function
          - `publicKey` string, required — The public key for the RSA function
          - `size` integer, required — Size for SHA function. can be 256, 384 or 512
          - `type` string, required — String with value RSAlgoSettings
        - ESAlgoSettings — Settings for an EC + SHA signing algorithm
          - `privateKey` string — The private key for the RSA function
          - `publicKey` string, required — The public key for the RSA function
          - `size` integer, required — Size for SHA function. can be 256, 384 or 512
          - `type` string, required — String with value ESAlgoSettings
        - JWKSAlgoSettings — Settings for a JWK set
          - `headers` object — The headers for the http call
          - `kty` string — The type of key: RSA or EC
          - `timeout` integer — The timeout of the http call
          - `ttl` integer — The ttl of the keyset
          - `type` string, required — String with value JWKSAlgoSettings
          - `url` string — The url for the http call
      - `enabled` boolean, required — Is it enabled
      - `source` union, required
        - InQueryParam — JWT location in a query param
          - `name` string, required — Name of the query param
          - `type` string, required — String with value InQueryParam
        - InHeader — JWT location in a header
          - `name` string, required — Name of the header
          - `remove` string, required — Remove regex inside the value, like 'Bearer '
          - `type` string, required — String with value InHeader
        - InCookie — JWT location in a cookie
          - `name` string, required — Name of the cookie
          - `type` string, required — String with value InCookie
      - `strategy` union, required
        - PassThrough — Strategy where only signature and field values are verified
          - `type` string, required — String with value PassThrough
          - `verificationSettings` VerificationSettings, required — Settings to verify the value of JWT token fields
            - `fields` object, required — Fields to verify with their values
            - `mappingSettings` MappingSettings — Settings to change fields of a JWT token
              - …
        - Sign — Strategy where signature and field values are verified, and then token si re-signed
          - `algoSettings` union, required
            - HSAlgoSettings — Settings for an HMAC + SHA signing algorithm
              - …
            - RSAlgoSettings — Settings for an HMAC + SHA signing algorithm
              - …
            - ESAlgoSettings — Settings for an EC + SHA signing algorithm
              - …
            - JWKSAlgoSettings — Settings for a JWK set
              - …
          - `type` string, required — String with value Sign
          - `verificationSettings` VerificationSettings, required — Settings to verify the value of JWT token fields
            - `fields` object, required — Fields to verify with their values
            - `mappingSettings` MappingSettings — Settings to change fields of a JWT token
              - …
        - Transform — Strategy where signature and field values are verified, trasnformed and then token si re-signed
          - `algoSettings` union, required
            - HSAlgoSettings — Settings for an HMAC + SHA signing algorithm
              - …
            - RSAlgoSettings — Settings for an HMAC + SHA signing algorithm
              - …
            - ESAlgoSettings — Settings for an EC + SHA signing algorithm
              - …
            - JWKSAlgoSettings — Settings for a JWK set
              - …
          - `transformSettings` TransformSettings — Settings to transform a JWT token and its location
            - `location` union, required
              - …
            - `mappingSettings` MappingSettings, required — Settings to change fields of a JWT token
              - …
          - `type` string, required — String with value Transform
          - `verificationSettings` VerificationSettings, required — Settings to verify the value of JWT token fields
            - `fields` object, required — Fields to verify with their values
            - `mappingSettings` MappingSettings — Settings to change fields of a JWT token
              - …
      - `strict` boolean, required — Does it fail if JWT not found
      - `type` string, required — A string with value 'local'
    - RefJwtVerifier — Reference to a global JWT verifier
      - `enabled` boolean, required — Is it enabled
      - `id` string, required — The id of the GlobalJWTVerifier
      - `type` string, required — A string with value 'ref'
  - `localHost` string — The host used localy, mainly localhost:xxxx
  - `localScheme` string — The scheme used localy, mainly http
  - `maintenanceMode` boolean, required — 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` string, required — The name of your service. Only for debug and human readability purposes
  - `overrideHost` boolean — Host header will be overriden with Host of the target
  - `privateApp` boolean, required — When enabled, user will be allowed to use the service (UI) only if they are registered users of the private apps domain
  - `privatePatterns` string[] — If you define a public pattern that is a little bit too much, you can make some of public URL private again
  - `publicPatterns` string[] — 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 '/.*'
  - `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
  - `redirection` RedirectionSettings — The configuration for redirection per service
    - `code` integer, required — The http redirect code
    - `enabled` boolean, required — Whether or not redirection is enabled
    - `to` string, required — The location for redirection
  - `root` string, 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
  - `secComExcludedPatterns` string[] — URI patterns excluded from secured communications
  - `secComSettings` union
    - HSAlgoSettings — Settings for an HMAC + SHA signing algorithm
      - `secret` string, required — The secret value for the HMAC function
      - `size` integer, required — Size for SHA function. can be 256, 384 or 512
      - `type` string, required — String with value HSAlgoSettings
    - RSAlgoSettings — Settings for an HMAC + SHA signing algorithm
      - `privateKey` string — The private key for the RSA function
      - `publicKey` string, required — The public key for the RSA function
      - `size` integer, required — Size for SHA function. can be 256, 384 or 512
      - `type` string, required — String with value RSAlgoSettings
    - ESAlgoSettings — Settings for an EC + SHA signing algorithm
      - `privateKey` string — The private key for the RSA function
      - `publicKey` string, required — The public key for the RSA function
      - `size` integer, required — Size for SHA function. can be 256, 384 or 512
      - `type` string, required — String with value ESAlgoSettings
    - JWKSAlgoSettings — Settings for a JWK set
      - `headers` object — The headers for the http call
      - `kty` string — The type of key: RSA or EC
      - `timeout` integer — The timeout of the http call
      - `ttl` integer — The ttl of the keyset
      - `type` string, required — String with value JWKSAlgoSettings
      - `url` string — The url for the http call
  - `sendOtoroshiHeadersBack` boolean — When enabled, Otoroshi will send headers to consumer like request id, client latency, overhead, etc ...
  - `statsdConfig` StatsdConfig — The configuration for statsd metrics push
    - `datadog` boolean, required — Datadog agent
    - `host` string, required — The host of the StatsD agent
    - `port` integer, required — The port of the StatsD agent
  - `subdomain` string, required — The subdomain on which the service is available
  - `targets` Target[], required — 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
    - `host` string, hostname, required — 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` string, required — The protocol used for communication. Can be http or https
  - `transformerRef` string — A reference to a request transformer
  - `userFacing` boolean — The fact that this service will be seen by users and cannot be impacted by the Snow Monkey
  - `xForwardedHeaders` boolean — Send X-Forwarded-* headers

## Other responses

- `400` — Bad resource format. Take another look to the swagger, or open an issue :)
- `401` — You have to provide an Api Key. Api Key can be passed with 'Otoroshi-Client-Id' and 'Otoroshi-Client-Secret' headers, or use basic http authentication
- `404` — Resource not found or does not exist

---

[API](https://skmtc.net/maif/apis/otoroshi.md) · [All operations](https://skmtc.net/maif/apis/otoroshi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/maif/otoroshi/versions/276881687271/schema)
