api-endpoint.ospp

Api endpoint

The api endpoint configuration define a specific endpoint with the allowed parameters.

This allow to limit the access to a specific endpoint with the OnSphere right and only authorized limited parameters.

type

object

properties

  • endpoint

The endpoint (/user, /building/rooms) use after the host define on api-service.ospp.

It must start with /.

If the request require parameter on the url like (/building/{id}), it can be define by putting the name of the parameter between {} and defining it as an PATH parameter inside the parameters list.

type

string

pattern

^/.*

  • isTemplateGeneratedByOspComposer

Name of the playbook that generated this file. If present, the file is managed by the Composer and may be overwritten on regeneration. Used for selective clean. Do not edit or set manually.

type

string

  • method

type

string

enum

GET, POST, PUT, DELETE, PATCH

  • parameters

The list of available parameters for the endpoint.

Undefined parameters will be ignored during the execution of a request.

type

array

items

oneOf

PATH

QUERY

BODY

  • responseTimeout

The maximum time allowed to get a response from this endpoint. This value override the one define on the api service configuration.

It is also possible to override it when doing the request.

DurationConfigurationEntity

  • responseValidation

The schema to validate and/or strip the response received from the endpoint.

If none is set no validation will be done.

ResponseValidationConfiguration

  • service

Id of the service providing this endpoint.

type

string

  • templateId

The id of the template to use for this file

type

string

  • templateVariables

The variables and their values to be replaced from the template

type

object

additionalProperties

  • variablesFiles

The variables files to use to replace the variables. The first file of the list will take precedence over the following one. Template variables take precedence over the contents of the files.

type

array

items

type

string

additionalProperties

False

PATH

A parameter that is defined on the url by putting it between {} like /building/{id}

type

object

properties

  • type

type

string

enum

PATH

default

PATH

  • defaultValue

Define a default value for the parameter. This value will be always added to the request if defined

If a mandatory parameter is missing, this value will be used. Otherwise, the request will fail.

The value is sanitized and url encoded before sending the request.

type

string

  • name

The name of the parameter either to replace on the PATH or use a key on the QUERY.

type

string

additionalProperties

False

QUERY

A parameter that is defined on the url after ? like /building?id=10

type

object

properties

  • type

type

string

enum

QUERY

default

QUERY

  • defaultValue

Define a default value for the parameter. This value will be always added to the request if defined

If a mandatory parameter is missing, this value will be used. Otherwise, the request will fail.

The value is sanitized and url encoded before sending the request.

type

string

  • mandatory

Define if the parameter is mandatory for the endpoint.

Default value is [false]

type

boolean

default

False

  • name

The name of the parameter either to replace on the PATH or use a key on the QUERY.

type

string

additionalProperties

False

BODY

A parameter that will be injected as the body of an endpoint if it support it.

type

object

properties

  • type

type

string

enum

BODY

default

BODY

  • contentType

The content type of the body.

Default value is [“JSON”]

type

string

enum

JSON

default

JSON

  • defaultValue

Define a default value for the parameter. This value will be always added to the request if defined

If a mandatory parameter is missing, this value will be used. Otherwise, the request will fail.

The value can be any valid Json object.

  • "data"
    
  • {
        "test": "data"
    }
    
  • [
        "value",
        "test": "data",
        {
            "other": "test"
        }
    ]
    
  • mandatory

Define if the parameter is mandatory for the endpoint.

Default value is [true]

type

boolean

default

True

  • name

The name of the parameter either to replace on the PATH or use a key on the QUERY.

type

string

  • schema

The schema to use to validate the body parameter when the content type is JSON.

type

string

additionalProperties

False

DurationConfigurationEntity

type

object

properties

  • unit

The unit of time expressed

type

string

enum

NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS

  • value

The amount of time expressed with the unit

type

integer

additionalProperties

False

ResponseValidationConfiguration

type

object

properties

  • filter

Enable the stripping of the response.

Default value is [false]

type

boolean

default

False

  • schema

The id of the schema to use to validate and strip the response received from the endpoint.

type

string

  • validate

Enable the validation of the response.

Default value is [true]

type

boolean

default

True

additionalProperties

False