Configurations service OpenAPI specification (2.0.0)

Download OpenAPI specification:Download

Fabrics v2 Configurations Apis for multi tenant service

Tenant Configuration Controller

These endpoints help in performing CRUD operations on tenant configurations

Get All configuration for tenant.

Get all Tenant configurations for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Configuration found and returned.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

get/tenant-config
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Replace all tenant configuration for tenant

Replace List of Tenant configuration with new configs for the given tenantId.

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
Array
configName
string

Name of the configuration

objectValue
object

Value that needs to be configured for given configName & configType

objectType
string

Data type of the ObjectValue given

configType
string

Type of the configuration

Responses
200

Configuration updated.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

put/tenant-config
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Create a configuration for tenant.

Create Tenant configuration for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
configName
string

Name of the configuration

objectValue
object

Value that needs to be configured for given configName & configType

objectType
string

Data type of the ObjectValue given

configType
string

Type of the configuration

Responses
200

Configuration created.

400

Bad Request

409

Configuration already exists for the tenant.

500

Internal Server Error

post/tenant-config
Request samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD"
}
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Update All the configuration for tenant.

Update Tenant configuration for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
Array
configName
string

Name of the configuration

objectValue
object

Value that needs to be configured for given configName & configType

objectType
string

Data type of the ObjectValue given

configType
string

Type of the configuration

Responses
200

Configuration updated.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

patch/tenant-config
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Get configuration for tenant.

Get Tenant configuration for the given tenantId

SecurityAuthorization or context
Request
path Parameters
configType
required
string
configName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Configuration found and returned.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

get/tenant-config/{configType}/name/{configName}
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Replace the configuration for tenant.

Replace Tenant configuration with new configs for the given tenantId

SecurityAuthorization or context
Request
path Parameters
configType
required
string
configName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
configName
string

Name of the configuration

objectValue
object

Value that needs to be configured for given configName & configType

objectType
string

Data type of the ObjectValue given

configType
string

Type of the configuration

Responses
200

Configuration updated.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

put/tenant-config/{configType}/name/{configName}
Request samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD"
}
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Delete the tenant's configuration.

SecurityAuthorization or context
Request
path Parameters
configName
required
string
configType
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Configuration deleted.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

delete/tenant-config/{configType}/name/{configName}
Response samples
application/json
{
  • "message": "Bad Request"
}

Update tenant configuration for tenant.

Update Tenant configuration for the given tenantId,configName and configType

SecurityAuthorization or context
Request
path Parameters
configType
required
string
configName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
configName
string

Name of the configuration

objectValue
object

Value that needs to be configured for given configName & configType

objectType
string

Data type of the ObjectValue given

configType
string

Type of the configuration

Responses
200

Configuration updated.

400

Bad Request

404

Configuration not found for tenant.

500

Internal Server Error

patch/tenant-config/{configType}/name/{configName}
Request samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD"
}
Response samples
application/json
{
  • "configName": "ENUM",
  • "objectValue": "SYSTEM",
  • "objectType": "SYSTEM",
  • "configType": "HOLD",
  • "tenantId": "erfvda5435234tgfdvsf"
}

Get configuration for given filters.

Get Tenant info for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
limit
integer <int32>
Default: 10

Numbers of records to be returned.

offset
integer <int64>
Default: 0

Number of records to skipped.

sortBy
string
Default: "updatedAt"

Item property on which data needed to be sorted on.

sortDirection
string
Default: "desc"

Direction of sorting i.e ascending or descending

Enum: "asc" "desc"
required
object
Default: {}

JSON to do filtration of records. to filter records json structure should be similar to target entity structure i.e order, shipment etc

Responses
200

Matched tenant configs

400

bad Request

404

No Configurations found for tenant.

500

Internal Server Error

post/tenant-config/query
Request samples
application/json
{
  • "limit": 10,
  • "offset": 0,
  • "sortBy": "updatedAt",
  • "sortDirection": "desc",
  • "filters": {
    }
}
Response samples
application/json
{
  • "count": 100,
  • "limit": 10,
  • "offset": 1
}

Target Configuration Controller

These endpoints help in performing CRUD operations on Target configurations

Get All Target configuration for tenant.

Get all Target configurations for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Target Configuration updated.

400

Bad Request

404

Target Configuration not found for tenant.

500

Internal Server Error

get/target-config
Response samples
application/json
[
  • {
    }
]

Create a Target configuration for tenant.

Create Target configuration for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
serviceName
required
string
processName
required
string
Array of objects (TargetServiceRequest)
Responses
200

Target Configuration updated.

400

Bad Request

404

Target Configuration not found for tenant.

409

Target Configuration already exists for the tenant.

500

Internal Server Error

post/target-config
Request samples
application/json
{
  • "serviceName": "order-service",
  • "processName": "order-create",
  • "targetService": [
    ]
}
Response samples
application/json
{
  • "tenantId": "asferf3r4safasdcd",
  • "serviceName": "order-service",
  • "processName": "order-create",
  • "targetService": [
    ]
}

Get configuration for tenant.

Get Tenant configuration for the given tenantId

SecurityAuthorization or context
Request
path Parameters
serviceName
required
string
processName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Target Configuration updated.

400

Bad Request

404

Target Configuration not found for tenant.

500

Internal Server Error

get/target-config/{serviceName}/{processName}
Response samples
application/json
{
  • "tenantId": "asferf3r4safasdcd",
  • "serviceName": "order-service",
  • "processName": "order-create",
  • "targetService": [
    ]
}

Delete the Target's configuration.

SecurityAuthorization or context
Request
path Parameters
serviceName
required
string
processName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Target Configuration deleted.

400

Bad Request

404

Target Configuration not found for tenant.

500

Internal Server Error

delete/target-config/{serviceName}/{processName}
Response samples
application/json
{
  • "message": "Bad Request"
}

Fraud Configuration Controller

These endpoints help in performing CRUD operations on Fraud configurations

Get All Fraud configuration for tenant.

Get all Fraud configurations for the given tenantId

SecurityAuthorization or context
Request
path Parameters
serviceName
required
string
processName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Fraud Configuration updated.

400

Bad Request

404

Fraud Configuration not found for tenant

500

Internal Server Error

get/fraud-config/{processName}/{serviceName}
Response samples
application/json
{
  • "tenantId": "asferf3r4safasdcd",
  • "serviceName": "FRAUD_RELEASE_SERVICE",
  • "processName": "ORDER_CREATE",
  • "configuration": {
    }
}

Replace the Fraud configuration for tenant.

Replace Fraud configuration with new configs for the given tenantId

SecurityAuthorization or context
Request
path Parameters
serviceName
required
string
processName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
required
Array of Array of objects (Condition)
Responses
200

Fraud Configuration updated.

400

Bad Request

404

Fraud Configuration not found for tenant.

409

Fraud Configuration already exists for the tenant.

500

Internal Server Error

put/fraud-config/{processName}/{serviceName}
Request samples
application/json
{
  • "conditions": "[ // OR BLOCK START\n [ // AND BLOCK STARTS\n {\n \"key\": \"orderDate\",\n \"operator\": \"lte\",\n \"type\": \"date\",\n \"value\": [-59, \"SECONDS\"] // now -59 sec\n },\n {\n \"key\": \"type\",\n \"operator\": \"in\",\n \"value\": [\"web\", \"mobile\"]\n }\n ], // AND BLOCK END\n [ // AND BLOCK STARTS\n {\n \"key\": \"orderDate\",\n \"operator\": \"lt\",\n \"type\": \"date\",\n \"value\": [-10, \"MINUTES\"]\n },\n {\n \"key\": \"type\",\n \"operator\": \"is\",\n \"value\": \"postman\"\n }\n ] // AND BLOCK ENDS\n ] // OR BLOCK ENDS\n"
}
Response samples
application/json
{
  • "tenantId": "asferf3r4safasdcd",
  • "serviceName": "FRAUD_RELEASE_SERVICE",
  • "processName": "ORDER_CREATE",
  • "configuration": {
    }
}

Delete the Fraud's configuration.

SecurityAuthorization or context
Request
path Parameters
serviceName
required
string
processName
required
string
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Fraud Configuration deleted.

400

Bad Request

404

Fraud Configuration not found for tenant.

500

Internal Server Error

delete/fraud-config/{processName}/{serviceName}
Response samples
application/json
{
  • "message": "Bad Request"
}

Get All Fraud configuration for tenant.

Get all Fraud configurations for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Responses
200

Fraud Configuration updated.

400

Bad Request

404

Fraud Configuration not found for tenant

500

Internal Server Error

get/fraud-config
Response samples
application/json
[
  • {
    }
]

Create a Fraud configuration for tenant.

Create Fraud configuration for the given tenantId

SecurityAuthorization or context
Request
header Parameters
required
object (XSiteContext)

x-site-context value

Request Body schema: application/json
serviceName
required
string
processName
required
string
required
object (CriteriaConfiguration)

CriteriaConfiguration model

Responses
200

Configuration updated.

400

Bad Request

404

Configuration not found for tenant.

409

Fraud Configuration already exists for the tenant.

500

Internal Server Error

post/fraud-config
Request samples
application/json
{
  • "serviceName": "FRAUD_RELEASE_SERVICE",
  • "processName": "ORDER_CREATE",
  • "configuration": {
    }
}
Response samples
application/json
{
  • "tenantId": "asferf3r4safasdcd",
  • "serviceName": "FRAUD_RELEASE_SERVICE",
  • "processName": "ORDER_CREATE",
  • "configuration": {
    }
}