{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sap-btp/json-schema/sap-btp-service-instance-response-object-schema.json",
  "title": "ServiceInstanceResponseObject",
  "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/ServiceInstanceResponseObject",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The ID of the service instance."
    },
    "ready": {
      "type": "boolean"
    },
    "last_operation": {
      "$ref": "#/$defs/OperationResponseObject"
    },
    "name": {
      "type": "string",
      "description": "The name of the service instance."
    },
    "service_plan_id": {
      "type": "string",
      "description": "The ID of the serivce plan."
    },
    "platform_id": {
      "type": "string",
      "description": "The platform ID."
    },
    "created_by": {
      "type": "string",
      "description": "The user that created this service instance.<br>If the instance was created programmatically (for example, by the SM API), this may be a client ID.<br>For Cloud Foundry or Kubernetes instances, this is the user ID as defined by that environment's user management system."
    },
    "updated_by": {
      "type": "string",
      "description": "The user that last updated this service instance.<br>If the instance was created programmatically (for example, by the SM API), this may be a client ID.<br>For Cloud Foundry or Kubernetes instances, this is the user ID as defined by that environment's user management system.<br/>"
    },
    "dashboard_url": {
      "type": "string",
      "description": "The URL of a web-based management user interface for the service instance, also known as service dashboard."
    },
    "referenced_instance_id": {
      "type": "string",
      "description": "The ID of the instance to which the service instance refers."
    },
    "shared": {
      "type": "boolean",
      "description": "Whether the service instance is shared."
    },
    "context": {
      "type": "object",
      "description": "Contextual data for the resource."
    },
    "maintenance_info": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "The maintenance info for the resource."
    },
    "usable": {
      "type": "boolean",
      "description": "Wheher the resource can be used."
    },
    "created_at": {
      "type": "string",
      "description": "The time the resource was created. <br/>In ISO 8601 format:</br> YYYY-MM-DDThh:mm:ssTZD",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "description": "The last time the resource was updated. <br/> In ISO 8601 format.",
      "format": "date-time"
    },
    "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."
    },
    "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"
        }
      }
    },
    "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."
        }
      }
    }
  }
}