Skip to content

Akash Console Managed API does not return URI and port #415

@piber-dev

Description

@piber-dev

Describe the bug
Users have reported that the endpoint /v1/deployments/{dseq} for console does not return status, ports, URIs, and other information that .

Expected return

{
  "data": {
    "deployment": {
      "id": {
        "owner": "string",
        "dseq": "dddddddddddddddd"
      },
      "state": "string",
      "hash": "string",
      "created_at": "string"
    },
    "leases": [
      {
        "id": {
          "owner": "string",
          "dseq": "dddddddddd",
          "gseq": 0,
          "oseq": 0,
          "provider": "string",
          "bseq": 0
        },
        "state": "string",
        "price": {
          "denom": "string",
          "amount": "string"
        },
        "created_at": "string",
        "closed_on": "string",
        "reason": "string",
        "status": {
          "forwarded_ports": {
            "additionalProp1": [
              {
                "port": 0,
                "externalPort": 0,
                "host": "string",
                "available": 0
              }
            ],
            "additionalProp2": [
              {
                "port": 0,
                "externalPort": 0,
                "host": "string",
                "available": 0
              }
            ],
            "additionalProp3": [
              {
                "port": 0,
                "externalPort": 0,
                "host": "string",
                "available": 0
              }
            ]
          },
          "ips": {
            "additionalProp1": [
              {
                "IP": "string",
                "Port": 0,
                "ExternalPort": 0,
                "Protocol": "string"
              }
            ],
            "additionalProp2": [
              {
                "IP": "string",
                "Port": 0,
                "ExternalPort": 0,
                "Protocol": "string"
              }
            ],
            "additionalProp3": [
              {
                "IP": "string",
                "Port": 0,
                "ExternalPort": 0,
                "Protocol": "string"
              }
            ]
          },
          "services": {
            "additionalProp1": {
              "name": "string",
              "available": 0,
              "total": 0,
              "uris": [
                "string"
              ],
              "observed_generation": 0,
              "replicas": 0,
              "updated_replicas": 0,
              "ready_replicas": 0,
              "available_replicas": 0
            },
            "additionalProp2": {
              "name": "string",
              "available": 0,
              "total": 0,
              "uris": [
                "string"
              ],
              "observed_generation": 0,
              "replicas": 0,
              "updated_replicas": 0,
              "ready_replicas": 0,
              "available_replicas": 0
            },
            "additionalProp3": {
              "name": "string",
              "available": 0,
              "total": 0,
              "uris": [
                "string"
              ],
              "observed_generation": 0,
              "replicas": 0,
              "updated_replicas": 0,
              "ready_replicas": 0,
              "available_replicas": 0
            }
          }
        }
      }
    ],
    "escrow_account": {
      "id": {
        "scope": "string",
        "xid": "string"
      },
      "state": {
        "owner": "string",
        "state": "string",
        "transferred": [
          {
            "denom": "string",
            "amount": "string"
          }
        ],
        "settled_at": "string",
        "funds": [
          {
            "denom": "string",
            "amount": "string"
          }
        ],
        "deposits": [
          {
            "owner": "string",
            "height": "string",
            "source": "string",
            "balance": {
              "denom": "string",
              "amount": "string"
            }
          }
        ]
      }
    }
  }
}

Actual return

"leases": [
      {
        "id": {
          "owner": "akash14t0449d66srr76xdfjqty28rcq2tx5n90c6nt4",
          "dseq": "25151289",
          "gseq": 1,
          "oseq": 1,
          "provider": "akash1kqzpqqhm39umt06wu8m4hx63v5hefhrfmjf9dj",
          "bseq": 0
        },
        "state": "active",
        "price": {
          "denom": "ibc/170C677610AC31DF0904FFE09CD3B5C657492170E7E52372E48756B71E56F2F1",
          "amount": "25.307681000000000000"
        },
        "created_at": "25151300",
        "closed_on": "0",
        "reason": "lease_closed_invalid",
        "status": null
      }

Additional context
Currently both console and users use the https://console.akash.network/provider-proxy-mainnet/ endpoint as a workaround with multiple users (3 or more) finding success in the following snippet:

      const providerUrl = `https://${providerHostname}:8443/lease/${dseq}/${gseq}/${oseq}/status`;
      
      const proxyPayload = {
        method: 'GET',
        url: providerUrl,
        providerAddress: providerAddress,
        auth: {
          type: 'mtls',
          certPem: certificate.certPem,
          keyPem: certificate.encryptedKey,
        },
      };

      const response = await axios.post('https://console.akash.network/provider-proxy-mainnet/', proxyPayload, {
        headers: {
          'Content-Type': 'application/json',
          'x-api-key': this.config.apiKey,
        },
      });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions