{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-operation-response-object-schema.json",
  "title": "OperationResponseObject",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sap-btp-service-manager-openapi.yml#/components/schemas/OperationResponseObject",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the operation."
    },
    "ready": {
      "type": "boolean",
      "description": "Whether the resource is ready."
    },
    "type": {
      "type": "string",
      "description": "The type of the operation.<br><br> Possible values:",
      "enum": [
        "CREATE",
        "UPDATE",
        "DELETE"
      ]
    },
    "state": {
      "type": "string",
      "description": "Valid values are: in progress, succeeded, and failed. <br> While the state is \"in progress\", the platform should continue polling. <br/> The responses: \"state\": \"succeeded\" or \"state\": \"failed\" must cause the platform to stop polling.",
      "enum": [
        "in progress",
        "succeeded",
        "failed"
      ]
    },
    "description": {
      "type": "string",
      "description": "Details about the operation for customer-facing UI."
    },
    "resource_id": {
      "type": "string",
      "description": "The ID of the resource. <br> Exists if: \"state\": \"succeeded\", and also for PATCH and DELETE requests"
    },
    "transitive_resources": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TransitiveResource"
      }
    },
    "resource_type": {
      "type": "string",
      "description": "The type of the resource (e.g. service_brokers, service_instances)."
    },
    "platform_id": {
      "type": "string",
      "description": "The ID of the platform associated with the operation."
    },
    "correlation_id": {
      "type": "string",
      "description": "The correlation ID received from the request related to this operation."
    },
    "reschedule": {
      "type": "boolean",
      "description": "Whether the operation has reached a checkpoint and can be executed again."
    },
    "deletion_scheduled": {
      "type": "string",
      "description": "The time the resource is scheduled for deletion. <br/>In ISO 8601 format:</br> YYYY-MM-DDThh:mm:ssTZD",
      "format": "date-time"
    },
    "created_at": {
      "type": "string",
      "description": "The time the resource was created. <br/>In ISO 8601 format.",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "description": "The last time the resource was updated. <br/>In ISO 8601 format. <br/>Recommended field if \"state\": \"succeeded\" or \"state\": \"failed\".",
      "format": "date-time"
    },
    "errors": {
      "anyOf": [
        {
          "$ref": "#/$defs/Error"
        },
        {
          "type": "string",
          "description": "A JSON object that contains details about one or more errors if the operation has failed.",
          "items": {
            "$ref": "#/$defs/Error"
          }
        }
      ]
    },
    "labels": {
      "$ref": "#/$defs/Labels"
    }
  },
  "$defs": {
    "Error": {
      "type": "object",
      "description": "A response object that contains details about the error.",
      "properties": {
        "error": {
          "type": "string",
          "description": "The name of the error."
        },
        "description": {
          "type": "string",
          "description": "The description of the error."
        },
        "broker_error": {
          "type": "object",
          "properties": {
            "StatusCode": {
              "type": "integer",
              "description": "The broker status code."
            },
            "ErrorMessage": {
              "type": "string",
              "description": "A machine-readable error string that may be returned by the broker."
            },
            "Description": {
              "type": "string",
              "description": "A human-readable description of the error that may be returned by the broker."
            },
            "ResponseError": {
              "type": "string",
              "description": "ResponseError is set to the error that occurred when unmarshalling a response body from the broker."
            }
          },
          "description": "The broker error"
        }
      }
    },
    "Labels": {
      "type": "object",
      "additionalProperties": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "description": "Additional data associated with the resource entity. <br><br>Can be an empty object."
    },
    "TransitiveResource": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the resource."
        },
        "type": {
          "type": "string",
          "description": "The type of the resource."
        },
        "operation_type": {
          "type": "string",
          "description": "The type of the operation associated with the resource."
        },
        "criteria": {
          "type": "string",
          "description": "The minimum criteria required to use the resource in the context of the platform."
        }
      }
    }
  }
}