# Get deploys

Get a paginated list of deploys.

```
GET /deploys
```

## Query params

| Query param              | Description                                  |
| ------------------------ | -------------------------------------------- |
| `caller_public_key`      | Deploy caller public key                     |
| `block_hash`             | Hash of the deploy block                     |
| `contract_package_hash`  | Contract package hash of the called contract |
| `contract_hash`          | Called contract hash                         |
| `contract_entrypoint_id` | Called entry point ID                        |
| `from_block_height`      | From block height range                      |
| `to_block_height`        | To block height range                        |

## Sorting

| Property    | Description               |
| ----------- | ------------------------- |
| `timestamp` | Sort deploys by timestamp |

Default sorting is `timestamp DESC`

## Optional properties

| Property                   | Type                                                                                        | Description                                                                                                 |
| -------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `account_info`             | [`AccountInfo`](https://docs.cspr.cloud/1.3.x/rest-api/account-info)                        | [Account info](https://github.com/make-software/casper-account-info-contract) provided by the deploy caller |
| `centralized_account_info` | [`CentralizedAccountInfo`](https://docs.cspr.cloud/1.3.x/rest-api/centralized-account-info) | Account information available for known accounts provided by CSPR.cloud team                                |
| `caller_cspr_name`         | `string`                                                                                    | Primary CSPR.name of the deploy caller account                                                              |
| `contract_package`         | [`ContractPackage`](https://docs.cspr.cloud/1.3.x/rest-api/contract-package)                | `ContractPackage` entity.                                                                                   |
| `contract`                 | [`Contract`](https://docs.cspr.cloud/1.3.x/rest-api/contract)                               | `Contract` entity.                                                                                          |
| `contract_entrypoint`      | [`ContractEntrypoint`](https://docs.cspr.cloud/1.3.x/rest-api/contract-entry-point)         | `ContractEntrypoint` entity.                                                                                |
| `rate`                     | `float32`                                                                                   | CSPR rate for specified currency that was relevant at the moment of deploy creation.                        |
| `transfers`                | \[][`Transfer`](https://docs.cspr.cloud/1.3.x/rest-api/transfer)                            | List of `Transfer` entities.                                                                                |
| `nft_token_actions`        | \[] [`NFTTokenAction`](https://docs.cspr.cloud/1.3.x/rest-api/non-fungible-token-action)    | List of `NFTTokenAction` entities.                                                                          |
| `ft_token_actions`         | \[] [`FTTokenAction`](https://docs.cspr.cloud/1.3.x/rest-api/fungible-token-action)         | List of `Fungible token action` entities.                                                                   |

## Response

[`PaginatedResponse`](https://docs.cspr.cloud/1.3.x/documentation/overview/pagination)[`<Deploy>`](https://docs.cspr.cloud/1.3.x/rest-api/deploy)

## Example

```bash
curl -X 'GET' \
  'https://api.testnet.cspr.cloud/deploys' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
```

```json
{
  "item_count": 20,
  "page_count": 2,
  "data": [
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "2500000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": null
        },
        "target": {
          "cl_type": {
            "ByteArray": 32
          },
          "parsed": "bb9b87e33a64af8fda37ceab67609b79500e8d88a2f5364f321fdc2d6ec1f74d"
        }
      },
      "block_hash": "a87896eeafadc85a9adb4ee4dd6bb8bc5d4edf8b1695f2999916324041443b03",
      "block_height": 2175890,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "18be0ac6c551e3a80a27847004db4cf9614ac7104b6448c7be6418116c32569b",
      "entry_point_id": null,
      "error_message": null,
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-11-03T14:33:27Z"
    },
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "5000000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": 1684147006568
        },
        "target": {
          "cl_type": "PublicKey",
          "parsed": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c"
        }
      },
      "block_hash": "43ca28afa8ed3ee7ffbe97d3f47556663942e4fa7d8420f49b9f3a5e1eec6a6e",
      "block_height": 1724562,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "21945b6f126abc7de1e2d84a7161f101a7c19b22eb256dfa8e8b1d8886652ee6",
      "entry_point_id": null,
      "error_message": "ApiError::InvalidPurse [12]",
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-05-15T10:36:59Z"
    },
    ...
    {
      "args": {
        "amount": {
          "cl_type": "U512",
          "parsed": "5000000000"
        },
        "id": {
          "cl_type": {
            "Option": "U64"
          },
          "parsed": 1684318398541
        },
        "target": {
          "cl_type": "PublicKey",
          "parsed": "0203286173807276184a856010020a78df0ddf617364936b6e15efb6c1bae2f228bb"
        }
      },
      "block_hash": "f073ab064a7545593d71a8af82021b004be3a23c7ad47c5b27a4287ab894c396",
      "block_height": 1729784,
      "caller_public_key": "020304811a7b142c32860cb1c114f23b0754215918d819f485b0a201af6cde70fa6c",
      "contract_hash": null,
      "contract_package_hash": null,
      "cost": "100000000",
      "deploy_hash": "6799726d44a7fd492fb284333dac7133902e405b760bf9dfe38998f995eb7117",
      "entry_point_id": null,
      "error_message": null,
      "execution_type_id": 6,
      "payment_amount": "100000000",
      "status": "processed",
      "timestamp": "2023-05-17T10:13:46Z"
    }
  ]
}
```
