X-Road (NIIS) Services API

services endpoints

GitHub OpenAPI

Operations 6

GET /services/{id} get service #
PATCH /services/{id} update service #
POST /services/{id}/endpoints create endpoint #
GET /services/{id}/service-clients get service clients who have access rights for the selected service #
POST /services/{id}/service-clients add access rights to selected service for new ServiceClients #
POST /services/{id}/service-clients/delete remove access to selected service from given ServiceClients #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/x-road-global:x-road-global-services-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

x-road-global-services-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: X Road Global Services API
  version: 2.1.0
  contact:
    name: Nordic Institute for Interoperability Solutions (NIIS)
    url: https://github.com/nordic-institute/X-Road-development/#enhancement-requests-and-error-reports
    email: info@niis.org
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  description: 'Operations tagged services across 2 of this provider''s published API definitions: security-server-admin-openapi.yaml, x-road-global-security-server-admin-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: /api/v1
  description: basepath for API v1
security:
- ApiKeyAuth: []
tags:
- name: Services
  description: services endpoints
paths:
  /services/{id}:
    get:
      tags:
      - Services
      summary: get service
      operationId: getService
      description: Administrator views selected service.
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          example: CS:ORG:Client:myService.v1
          format: text
          minLength: 1
          maxLength: 1279
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Service'
        '400':
          description: request was invalid
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
        '406':
          description: request specified an invalid format
        '500':
          description: internal server error
    patch:
      tags:
      - Services
      summary: update service
      operationId: updateService
      description: 'Administrator updates the service.


        This endpoint can return a warnings response which can be ignored by setting ServiceUpdate.ignore_warnings = true. If ServiceUpdate.ignore_warnings = false, it is possible to receive a warnings response from this endpoint if any one of the following conditions is true


        SSL authentication is set to true, but https connection to the service URL fails because SSL handshake fails


        SSL authentication is set to true, but https connection to the service URL fails because of other errors (e.g. host unreachable)'
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          example: CS:ORG:Client:myService.v1
          format: text
          minLength: 1
          maxLength: 1279
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceUpdate'
      responses:
        '200':
          description: service modified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Service'
        '400':
          description: request was invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
              examples:
                error_response:
                  $ref: '#/components/examples/ErrorExample'
                warnings_response:
                  $ref: '#/components/examples/UpdateServiceSslHandshakeWarningExample'
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
        '406':
          description: request specified an invalid format
        '500':
          description: internal server error
    servers:
    - url: /api/v1
      description: basepath for API v1
  /services/{id}/endpoints:
    post:
      tags:
      - Services
      summary: create endpoint
      operationId: addEndpoint
      description: Administrator creates a new endpoint.
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          example: CS:ORG:Client:myService.v1
          format: text
          minLength: 1
          maxLength: 1279
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Endpoint'
      responses:
        '201':
          description: endpoint added
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Endpoint'
        '400':
          description: request was invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
              examples:
                error_response:
                  $ref: '#/components/examples/ErrorExample'
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
        '406':
          description: request specified an invalid format
        '409':
          description: an existing item already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
        '500':
          description: internal server error
    servers:
    - url: /api/v1
      description: basepath for API v1
  /services/{id}/service-clients:
    get:
      tags:
      - Services
      summary: get service clients who have access rights for the selected service
      operationId: getServiceServiceClients
      description: Administrator views service clients who have access to the given service.
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          example: CS:ORG:Client:myService.v1
          format: text
          minLength: 1
          maxLength: 1279
      responses:
        '200':
          description: list of service clients
          content:
            application/json:
              schema:
                type: array
                uniqueItems: true
                description: array of service client objects
                items:
                  $ref: '#/components/schemas/ServiceClient'
        '400':
          description: request was invalid
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
        '406':
          description: request specified an invalid format
        '500':
          description: internal server error
    post:
      tags:
      - Services
      summary: add access rights to selected service for new ServiceClients
      operationId: addServiceServiceClients
      description: Adds access rights to selected service for new ServiceClients.
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          format: text
          minLength: 1
          maxLength: 1279
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceClients'
            examples:
              id_array_example:
                $ref: '#/components/examples/IdArrayExample'
      responses:
        '201':
          description: access rights added
          content:
            application/json:
              schema:
                type: array
                uniqueItems: true
                description: array of added service client objects
                items:
                  $ref: '#/components/schemas/ServiceClient'
        '400':
          description: request was invalid
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
              examples:
                error_metadata_response:
                  $ref: '#/components/examples/ErrorWithMetadataExample'
        '406':
          description: request specified an invalid format
        '409':
          description: an existing item already exists
        '500':
          description: internal server error
    servers:
    - url: /api/v1
      description: basepath for API v1
  /services/{id}/service-clients/delete:
    post:
      tags:
      - Services
      summary: remove access to selected service from given ServiceClients
      operationId: deleteServiceServiceClients
      description: Administrator removes access to selected service from given ServiceClients.
      parameters:
      - in: path
        name: id
        description: id of the service
        required: true
        schema:
          type: string
          format: text
          minLength: 1
          maxLength: 1279
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ServiceClients'
            examples:
              id_array_example:
                $ref: '#/components/examples/IdArrayExample'
      responses:
        '204':
          description: access right(s) deletion was successful
        '400':
          description: request was invalid
        '401':
          description: authentication credentials are missing
        '403':
          description: request has been refused
        '404':
          description: resource requested does not exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorInfo'
              examples:
                error_metadata_response:
                  $ref: '#/components/examples/ErrorWithMetadataExample'
        '500':
          description: internal server error
    servers:
    - url: /api/v1
      description: basepath for API v1
components:
  schemas:
    ServiceClients:
      type: object
      description: object containing and array of ServiceClients
      properties:
        items:
          type: array
          uniqueItems: true
          description: array of ServiceClients
          items:
            $ref: '#/components/schemas/ServiceClient'
    ServiceClient:
      type: object
      description: service client. May be a subsystem, local group, or a global group
      required:
      - id
      properties:
        id:
          type: string
          format: text
          description: subject id - can be a subsystem id <instance_id>:<member_class>:<member_code>:<subsystem> | globalgroup id <instance_id>:<group_code> | localgroup resource id in number format <id>
          example: DEV:ORG:1234:Subsystem | DEV:security-server-owners | 123
          minLength: 1
          maxLength: 1279
        name:
          type: string
          format: text
          description: name of the ServiceClient - can be the name of a member or the description of a group
          example: Security server owners
          readOnly: true
          minLength: 1
          maxLength: 255
        local_group_code:
          type: string
          format: text
          description: group code in case the object is a local group
          example: My own Local group code
          minLength: 1
          maxLength: 255
          readOnly: true
        service_client_type:
          $ref: '#/components/schemas/ServiceClientType'
        rights_given_at:
          type: string
          format: date-time
          description: time when access right were given at. When listing client's service clients without specifying the service, the time when first service access right was given to this service client for any service. When listing service clients for a specific service, time when service client was added permission to that service.
          example: '2018-12-15T00:00:00.001Z'
          readOnly: true
    ServiceClientType:
      type: string
      format: text
      description: subject type
      example: GLOBALGROUP
      readOnly: true
      enum:
      - GLOBALGROUP
      - LOCALGROUP
      - SUBSYSTEM
    Endpoint:
      type: object
      description: Endpoint for a service
      required:
      - service_code
      - method
      - path
      properties:
        id:
          type: string
          description: unique identifier
          example: 15
        service_code:
          type: string
          example: example_service_code
          description: service code
        client_id:
          type: string
          format: text
          description: <instance_id>:<member_class>:<member_code>:<subsystem>(optional)
          example: FI:GOV:123:ABC
          readOnly: true
          minLength: 1
          maxLength: 255
        method:
          type: string
          description: http method mapped to this endpoint
          example: GET
          enum:
          - '*'
          - GET
          - POST
          - PUT
          - DELETE
          - PATCH
          - HEAD
          - OPTIONS
          - TRACE
        path:
          type: string
          description: relative path where this endpoint is mapped to
          example: /foo
        generated:
          type: boolean
          description: has endpoint been generated from openapi3 description
          example: true
          readOnly: true
    ServiceUpdate:
      type: object
      description: object for updating a service or all services within service description
      required:
      - url
      - timeout
      - ssl_auth
      properties:
        url:
          type: string
          format: url
          description: service url
          example: https://domain.com/service
          minLength: 1
          maxLength: 255
        timeout:
          type: integer
          format: int32
          description: service time out value
          example: 60
          minimum: 0
          maximum: 1000
        ssl_auth:
          type: boolean
          description: service ssl auth
          example: true
        url_all:
          description: url is applied for all services
          type: boolean
          example: false
          default: false
        timeout_all:
          description: timeout value is applied for all services
          type: boolean
          example: false
          default: false
        ssl_auth_all:
          description: ssl authentication is applied for all services
          type: boolean
          example: false
          default: false
        ignore_warnings:
          type: boolean
          default: false
          description: if true, any ignorable warnings are ignored. if false (or missing), any warnings cause request to fail
    Service:
      type: object
      description: service for the service description
      required:
      - id
      - service_code
      - url
      - timeout
      - service_description_id
      - client_id
      properties:
        id:
          type: string
          format: text
          description: encoded service id, including client id
          example: CS:ORG:Client:myService.v1
          minLength: 1
          maxLength: 1279
        service_description_id:
          type: string
          description: unique identifier
          example: 123
        client_id:
          type: string
          format: text
          description: <instance_id>:<member_class>:<member_code>:<subsystem>(optional)
          example: FI:GOV:123:ABC
          minLength: 1
          maxLength: 255
        full_service_code:
          type: string
          format: text
          description: encoded service code and version
          example: myService.v1
          minLength: 1
          maxLength: 511
        service_code:
          type: string
          format: text
          description: encoded service code
          example: myService
          minLength: 1
          maxLength: 255
        timeout:
          type: integer
          format: int32
          description: service time out value
          example: 60
          minimum: 0
          maximum: 1000
        title:
          type: string
          readOnly: true
          format: text
          description: service title
          example: client deletion
          minLength: 1
          maxLength: 255
        ssl_auth:
          type: boolean
          description: service ssl auth
          example: true
        subjects_count:
          type: integer
          format: int32
          description: count of acl subjects
          example: 5
          minimum: 0
          maximum: 100000
        url:
          type: string
          format: url
          description: service url
          example: https://domain.com/service
          minLength: 1
          maxLength: 255
        endpoints:
          type: array
          description: list of endpoints linked to this service
          items:
            $ref: '#/components/schemas/Endpoint'
    ErrorInfo:
      $ref: ../../../../../../common/common-admin-api/src/main/resources/common-openapi-definition.yaml#/components/schemas/ErrorInfo
  examples:
    ErrorExample:
      $ref: ../../../../../../common/common-admin-api/src/main/resources/common-openapi-definition.yaml#/components/examples/ErrorExample
    UpdateServiceSslHandshakeWarningExample:
      summary: Warning response when trying to update a service with HTTPS set to "true" but the SSL handshake fails.
      value:
        status: 400
        error:
          code: warnings_detected
        warnings:
        - code: internal_server_ssl_handshake_error
    IdArrayExample:
      summary: Id array request body example
      value:
        items:
        - DEV:ORG:1234:Subsystem
        - DEV:security-server-owners
        - '123'
    ErrorWithMetadataExample:
      $ref: ../../../../../../common/common-admin-api/src/main/resources/common-openapi-definition.yaml#/components/examples/ErrorWithMetadataExample
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: X-Road-ApiKey token=<api key>
x-refined-from:
- security-server-admin-openapi.yaml
- x-road-global-security-server-admin-openapi.yml