Anonymize loans (v0.1)

http://localhost:9130

Table of contents

Anonymize loans API

Anonymize loans API

/anonymize-storage-loans

POST /anonymize-storage-loans

POST /anonymize-storage-loans
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Request schema for anonymize loans",
  "type": "object",
  "properties": {
    "loanIds": {
      "description": "Loan ids to be anonymized",
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "additionalProperties": false
}

Response 200

Loans that have been anonymized

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Response schema for anonymize loans request",
  "type": "object",
  "properties": {
    "anonymizedLoans": {
      "description": "Successfully anonymized loan ids",
      "type": "array",
      "items":{
        "type": "string"
      }
    },
    "notAnonymizedLoans": {
      "type": "array",
      "items": {
        "description": "Collection of loans",
        "type": "object",
        "properties": {
          "reason": {
            "description": "Reason of failure",
            "type": "string"
          },
          "loanIds": {
            "description": "List of loan IDs that have not been anonymized",
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}

Response 422

Validation errors

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A set of errors",
  "type": "object",
  "properties": {
    "errors": {
      "description": "List of errors",
      "id": "errors",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "error.schema"
      }
    },
    "total_records": {
      "description": "Total number of errors",
      "type": "integer"
    }
  }
}

Example:

{
  "errors": [
    {
      "message": "may not be null",
      "type": "1",
      "code": "-1",
      "parameters": [
        {
          "key": "moduleTo",
          "value": "null"
        }
      ]
    }
  ]
}

Response 500

Internal server error, e.g. due to misconfiguration

Body

Media type: text/plain

Type: any

Example:

Internal server error, contact administrator