endpoint.webhook

Webhook endpoint definition

type

object

properties

  • 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

  • maxPayloadSizeBytes

Maximum size in bytes of a request body accepted on this endpoint.

A larger request is rejected with a 413 Payload Too Large. Defaults to 2097152 (2 MB).

Default value is [2097152]

type

integer

default

2097152

  • methods

The HTTP verbs the endpoint listens on, each with its own optional linked action.

A request using a verb that is not declared here is rejected with a 405 Method Not Allowed.

Default value is [[{“verb”:”POST”}]]

type

array

default

verb

POST

items

WebhookMethodEntity

  • moduleId

The id of the osp-web module instance that exposes this webhook endpoint in the form of modules.rights.rights-1

type

string

  • path

The unique name of the endpoint, appended to the common prefix ‘/osp/webhooks/’ to build its public URL (e.g. ‘my-first-webhook’ is reachable at ‘https://<hostname>/osp/webhooks/my-first-webhook’).

Two endpoints cannot share the same path.

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

WebhookMethodEntity

type

object

properties

  • linkedAction

Optional run-script action executed for this verb. It must reference a run-script action; the script controls the HTTP response through its result (a ‘code’ entry sets the status code and a ‘content’ entry sets the response body

LinkedActionConfigurationEntity

  • verb

The HTTP verb handled by this entry: POST, GET, PUT or DELETE. POST/PUT write the endpoint values from the body, GET returns them, DELETE resets them.

type

string

enum

POST, GET, PUT, DELETE

additionalProperties

False

LinkedActionConfigurationEntity

type

object

properties

  • actionId

The itemId of the action.ospp to execute

type

string

  • expiration

The duration after which the action will be timed out

DurationConfigurationEntity

  • moduleId

The module that will execute the action, this can be used for example if the action is a ping who can be executed by multiples instance of osp-network-monitor

type

string

  • parameters

The parameters are allowing to choice the parameters who will be sent to the action. Each action required different parameters base on the type.

type

object

additionalProperties

oneOf

CONSTANT

LIST

PROPERTIES

FIELD

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

CONSTANT

type

object

properties

  • type

type

string

enum

CONSTANT

default

CONSTANT

  • value

A constant value

additionalProperties

False

LIST

type

object

properties

  • type

type

string

enum

LIST

default

LIST

  • values

A list of value accessors

type

array

items

oneOf

CONSTANT

LIST

PROPERTIES

FIELD

additionalProperties

False

PROPERTIES

type

object

properties

  • type

type

string

enum

PROPERTIES

default

PROPERTIES

  • properties

An object of value accessors

type

object

additionalProperties

oneOf

CONSTANT

LIST

PROPERTIES

FIELD

additionalProperties

False

FIELD

type

object

properties

  • type

type

string

enum

FIELD

default

FIELD

  • field

A field of the value

type

string

enum

ID, CONTENT, ERROR, TYPE, TIMESTAMP, NAME, DESCRIPTION

  • fieldParser

An expression to access a field of the JSON content of the value

type

string

additionalProperties

False