> For the complete documentation index, see [llms.txt](https://docs.cartesi.io/llms.txt)

---
id: inspect
title: "Inspect dApp state REST API"
description: "This method sends an inspect-state request to the dApp backend passing the payload string in the URL."
sidebar_label: "Inspect dApp state REST API"
hide_title: true
hide_table_of_contents: true
api: eJztV01vGzcQ/SvEXpQAtqS4cT+UooDhKq2BNAkUBT0kgUHtjrRMdsktybUsCPrvfUNypbVlI8f24ItNDYczw5k3b7jbzDRkpVdGXxXZJFPaNZT77CQryOVWNbwD+bxUTtTkS1MIR7pwQmqRlE+dl56EpX9acl54I3xJorhoGrGQ+Tdoi0Y6p/QqbDRyUxkJM96ySOkg/Th7M/ys58f7rjRtVYhFUDklnZuCilfhTPKPgOwNWbFWVSUKYoWwnQwgno/z16c/w/zV8hDa0hrtOTZNhOtAi4MUUiyUlnbTO81HuotgjXt7gWzI4kY5KlijdZS0HP34UoQgcRge45UsucZoKOXwKRE23HDSWte5kdE2NBtjvRMr0lwWmF9sjtKZEnXXQo6CIEmkoG3FQOY5NX5wIgaWviJJWBmI6ZbFqOmA06FxClGZpdjLT4K3pSLkfC+87moSUpwuERT3Kl3ZXn3W7ziCNXLDtpCoaCwcRYC6raqQmL85lbbVmqOHgVrmpdIkatQvRrEuTUXiUlpPTom/0j4sWlNVnBqkQ8ilx30ba3I6YOxBZMLrOy1KA4xGH3frKFdcGS/yUupVZ+gOiqO1Ncfd8/dYI8DdW+NVztCQPqYidRBWbqPzEhA0rTsRzqRYtPF9XKE1l8bWjB/T2pxOFUPWqRvUrGtbBz9o10ZaCetkXTb5tEUfo2kb6UtsaWyEX6FAEHCAyhL63duWTjKXl1TLbLLN/KZh1QipbLf7wsoRu473z8Zj/neXG666Nky3j/pDOMpDi3k+IpumUnmIePTV8bntsV+z+BrJB+nF/byKXiPQj+O7T1JAVAB/KgejMjd1UxH3EdDP2X3GnbYuN/zjOSyQbmtkLLsI/UKcnllomLCcdvDGOuHvT1nFvctNXtEbVSvPWlQE4VzV92RIId1KjgIR9rx45YPoMkYIHx/iNXd84F7jff/u71OHpr6cciKorUVJtx2jMZSkT+SxVJa5em0Y71bmjBwhLYnB+HYA1aoy68g+jYQqcwRMSdCrqmWFLq4XfCJAOzc2Vj2A1qBHFxtPcPTahGJ4qXO0GywXJIsF0XLQOxO4V4oDxfhSVKRX+Pcy8CIbc+Ls7OxEvPjpB/z5Zcyrczi40ILqxm/2p5kcqIFlwO5Anoki+WqxWw4VOcTUq0lKJpciEXKvANJauYGy8lS774P3qYL/aQV3B9kslDKIEn1Tca100/rr3LSRplKJmGdXZI9q9DYkjVO5tyCCBRC6QorC3HbK9QMc92NIXDlLJIlgeLegpWwrf0ytU2tRgEco1dOtHzWVVA+T6SMw+50wvHl6UrBd4xJyFUwfUhrfLPE5l4fnF1MnhnerC2DGG3MoTHx7FS0xCAAsxiisY755edurSLhKuC8uHOcgpCsKHcODapKNtgkEO8ii4TjNWlthu/S+cZPR6NcCw+Q6kfw19n5Do/aVoFOZXFY86ifn4/H5qHvW8kBTemlCmu6WJA3vP+fz9+Li/RX32v7pMUMztQ1XlUOKeRwPz4cvIMFUI64kLKZBe9FgUtDp2XCM7buhr9froQzbQ2NXo3TWjd5cXU7ffpjymWHp6yrb3S8bhxRaVXJfuwfesSH93x55+7iHnuXcSdwMSFMtde8G3UQPytHObPphznm5j6ftAZFPHwlPHwlPHwn/54+ENBl6g2OXGGqbOPhTNukeLKBKTgPLtlsG7Udb7XYsRuR2AzmWN9IquWAeBU0XyvEavL6UFSr7OFM8m6VPkOfisbC615bmt9aNrFr+heU32vQ+ZnZfoFpi/mNYcwhxNz6ze+eOvj54EOyH0B/TOQbTv1f6Bz0=
sidebar_class_name: "get api-method"
info_path: cartesi-rollups/_versioned_docs/version-1.5/rollups-apis/inspect/inspect-state-http-api-for-cartesi-rollups
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Inspect dApp state REST API"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/{payload}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



This method sends an inspect-state request to the dApp backend passing the payload string in the URL.
The payload string should be URL-encoded; the inspect server will decode the string to UTF-8.
If the dApp frontend needs to pass a binary string to the backend then it is advised to use the base64 encoding.

The response contains a status string and the reports generated by the dApp backend.
The status string can be either 'accept', 'reject', or 'exception'.
In case of exception, the field exception_payload will contain the exception payload;
Otherwise, this field will be null.

When running on machine mode, the whole Cartesi Machine is rolled back after processing the inspect-state request.
On host mode, it is advised against changing the dApp backend state when processing an inspect-state request.
Notice that this method is synchronous, so it is not advised to perform resource-intensive operations.


<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"payload","required":true,"schema":{"type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Inspect state response.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","description":"Whether inspection completed or not (and why not)","enum":["Accepted","Rejected","Exception","MachineHalted","CycleLimitExceeded","TimeLimitExceeded"],"example":"Accepted","title":"CompletionStatus"},"exception_payload":{"type":"string","description":"Payload in the Ethereum hex binary format.\nThe first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.\nFor instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.\nAn empty payload is represented by the string '0x'.\n","example":"0xdeadbeef","title":"Payload"},"reports":{"type":"array","items":{"type":"object","properties":{"payload":{"type":"string","description":"Payload in the Ethereum hex binary format.\nThe first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.\nFor instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.\nAn empty payload is represented by the string '0x'.\n","example":"0xdeadbeef","title":"Payload"}},"title":"Report"}},"processed_input_count":{"type":"integer","description":"Number of processed inputs since genesis","example":0}},"title":"InspectResponse"}}}},"default":{"description":"Error response.","content":{"text/plain":{"schema":{"type":"string","description":"Detailed error message.","example":"The request could not be understood by the server due to malformed syntax","title":"Error"}}}}}}
>
  
</StatusCodes>


      