swagger: '2.0' info: version: 1.10.11 title: IO API for messages sending functions contact: name: PagoPA url: https://forum.italia.it/c/progetto-io x-logo: url: https://io.italia.it/assets/img/io-logo-blue.svg description: | External manage apis to manage message related entities. host: api.io.pagopa.it basePath: /api/v1/messages-sending schemes: - https security: - SubscriptionKey: [] paths: /remote-contents/configurations: post: operationId: createRCConfiguration summary: Create a new remote-content configuration description: Create a new remote-content configuration using the provided payload parameters: - in: body name: body required: true schema: $ref: '#/definitions/NewRCConfigurationPublic' x-examples: text/json: | "name": "Descriptive congiguration name", "description": "Configuration description", "has_precondition": "NONE", "disable_lollipop_for": [ "DIXDPZ44E08F367A" ], "is_lollipop_enabled": false, "test_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY" }, "test_users": [ "DIXDPZ44E08F367A" ] }, "prod_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY", } } responses: '201': description: Configuration created schema: $ref: '#/definitions/RCConfigurationPublic' examples: text/json: | "configuration_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "name": "Configuration name", "description": "Configuration description", "has_precondition": "NONE", "disable_lollipop_for": [ "DIXDPZ44E08F367A" ], "is_lollipop_enabled": false, "test_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY" }, "test_users": [ "DIXDPZ44E08F367A" ] }, "prod_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY", } } '400': description: Bad request schema: $ref: '#/definitions/ProblemJson' '500': description: There was an error creating the configuration. schema: $ref: '#/definitions/ProblemJson' consumes: - application/json produces: - application/json get: operationId: listRCConfiguration summary: Get all the owned remote-content configurations description: Get all the owned remote-content configurations responses: '200': description: Return the configurations schema: $ref: '#/definitions/RCConfigurationListResponse' examples: text/json: | rcConfigList: [ { "configuration_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "name": "Configuration name", "description": "Configuration description", "has_precondition": "NONE", "disable_lollipop_for": [ "DIXDPZ44E08F367A" ], "is_lollipop_enabled": false, "test_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY" }, "test_users": [ "DIXDPZ44E08F367A" ] }, "prod_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY", } } } ] '400': description: Bad request schema: $ref: '#/definitions/ProblemJson' '403': description: Request not authorized. '404': description: Resource not found. '500': description: There was an error trying to get the configurations. schema: $ref: '#/definitions/ProblemJson' consumes: - application/json produces: - application/json /remote-contents/configurations/{configurationId}: get: operationId: getRCConfiguration summary: Get the remote-content configuration identified by the configurationId description: >- Get the remote-content configuration using the provided configurationId passed as path param parameters: - in: path name: configurationId required: true type: string description: Ulid string. format: Ulid x-import: '@pagopa/ts-commons/lib/strings' responses: '200': description: Return the configuration schema: $ref: '#/definitions/RCConfigurationResponse' examples: text/json: | "configuration_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "name": "Configuration name", "description": "Configuration description", "has_precondition": "NONE", "disable_lollipop_for": [ "DIXDPZ44E08F367A" ], "is_lollipop_enabled": false, "test_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY" }, "test_users": [ "DIXDPZ44E08F367A" ] }, "prod_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY", } } '400': description: Bad request schema: $ref: '#/definitions/ProblemJson' '403': description: Request not authorized. '404': description: Resource not found. '500': description: There was an error trying to get the configuration. schema: $ref: '#/definitions/ProblemJson' consumes: - application/json produces: - application/json put: operationId: updateRCConfiguration summary: Update an existing remote-content configuration description: >- Update an existing remote-content configuration using the provided payload parameters: - in: body name: body required: true schema: $ref: '#/definitions/NewRCConfigurationPublic' x-examples: text/json: | "name": "Descriptive congiguration name", "description": "Configuration description", "has_precondition": "NONE", "disable_lollipop_for": [ "DIXDPZ44E08F367A" ], "is_lollipop_enabled": false, "test_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY" }, "test_users": [ "DIXDPZ44E08F367A" ] }, "prod_environment": { "base_url": "string", "details_authentication": { "header_key_name": "string", "key": "string", "type": "API-KEY", } } - in: path name: configurationId required: true type: string description: Ulid string. format: Ulid x-import: '@pagopa/ts-commons/lib/strings' responses: '204': description: Configuration updated '400': description: Bad request schema: $ref: '#/definitions/ProblemJson' '403': description: Request not authorized. '404': description: Resource not found. '500': description: There was an error updating the configuration. schema: $ref: '#/definitions/ProblemJson' consumes: - application/json produces: - application/json definitions: RCConfigurationId: type: string description: Ulid string. format: Ulid x-import: '@pagopa/ts-commons/lib/strings' example: 01ARZ3NDEKTSV4RRFFQ69G5FAV RCConfigurationPublic: allOf: - $ref: '#/definitions/RCConfigurationBase' - $ref: '#/definitions/RCConfigurationEnvironment' NewRCConfigurationBase: type: object properties: name: type: string minLength: 1 description: Configuration name. description: type: string minLength: 1 description: Configuration description. has_precondition: $ref: '#/definitions/HasPrecondition' disable_lollipop_for: type: array items: type: string description: User's fiscal code. format: FiscalCode x-import: '@pagopa/ts-commons/lib/strings' example: SPNDNL80R13C555X is_lollipop_enabled: type: boolean description: Flag to check if lollipop is enabled required: - name - description - has_precondition - disable_lollipop_for - is_lollipop_enabled NewRCConfigurationPublic: allOf: - $ref: '#/definitions/NewRCConfigurationBase' - $ref: '#/definitions/RCConfigurationEnvironment' RCConfigurationBase: allOf: - $ref: '#/definitions/NewRCConfigurationBase' - type: object properties: configuration_id: type: string description: Ulid string. format: Ulid x-import: '@pagopa/ts-commons/lib/strings' example: 01ARZ3NDEKTSV4RRFFQ69G5FAV required: - configuration_id RCConfigurationEnvironment: type: object properties: test_environment: $ref: '#/definitions/RCConfigurationTestEnvironment' prod_environment: $ref: '#/definitions/RCConfigurationProdEnvironment' RCConfigurationProdEnvironment: type: object properties: base_url: type: string minLength: 1 description: Base url of the server. details_authentication: $ref: '#/definitions/RCAuthenticationConfig' required: - base_url - details_authentication RCAuthenticationConfig: type: object properties: header_key_name: type: string minLength: 1 description: header key name key: type: string minLength: 1 description: authentication config key type: type: string minLength: 1 description: authentication config type required: - header_key_name - key - type RCConfigurationTestEnvironment: allOf: - $ref: '#/definitions/RCConfigurationProdEnvironment' - type: object properties: test_users: type: array items: $ref: '#/definitions/FiscalCode' required: - test_users HasPrecondition: type: string x-extensible-enum: - ALWAYS - ONCE - NEVER RCConfigurationListResponse: type: object properties: rcConfigList: type: array items: $ref: '#/definitions/RCConfigurationResponse' RCConfigurationResponse: allOf: - $ref: '#/definitions/RCConfigurationPublic' - type: object properties: user_id: type: string minLength: 1 required: - user_id ProblemJson: type: object properties: type: type: string format: uri description: |- An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type (e.g., using HTML). default: about:blank example: https://example.com/problem/constraint-violation title: type: string description: |- A short, summary of the problem type. Written in english and readable for engineers (usually not suited for non technical stakeholders and not localized); example: Service Unavailable status: type: integer format: int32 description: >- The HTTP status code generated by the origin server for this occurrence of the problem. minimum: 100 maximum: 600 exclusiveMaximum: true example: 200 detail: type: string description: |- A human readable explanation specific to this occurrence of the problem. example: There was an error processing the request instance: type: string format: uri description: >- An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced. FiscalCode: type: string description: User's fiscal code. format: FiscalCode x-import: '@pagopa/ts-commons/lib/strings' example: SPNDNL80R13C555X securityDefinitions: SubscriptionKey: type: apiKey name: Ocp-Apim-Subscription-Key in: header description: The API key obtained through the developer portal.