Ionic Deploy. Count of deploys problem


#1

I use Ionic HTTP API, to get count of deploys in month.

I create 3 requests.

  1. auth and it is ok.
  2. request to get deploy channel https://api.ionic.io/deploy/channels/dev

Answer is:

array(2) {
  ["meta"]=>
  array(3) {
    ["status"]=>int(200)
    ["version"]=>string(12) "2.0.0-beta.0"
    ["request_id"]=>string(36) "31612bcf-0184-4f02-cfa7-15352a5cecaa"
  }
  ["data"]=> 
  array(6) {
    ["pwa"]=>NULL
    ["uuid"]=> string(36) "c8d19f70-91db-4c0d-b5a1-031a6a6ed6dc"
    ["created"]=>string(32) "2017-06-27T15:40:13.323165+00:00"
    ["tag"]=>string(3) "dev"
    ["app_id"]=> string(8) "e24347e3"
    ["deploy"]=>
    array(6) {
       ["user_id"]=>int(578226)
       ["uuid"]=>string(36) "9f0eba5a-b449-48aa-bd99-0b2d6e33a5da"
       ["ios_version"]=>
       array(3) {
          ["max"]=> NULL
          ["min"]=>NULL
          ["eq"]=>NULL
      }
      ["created"]=>string(32) "2017-06-27T15:40:14.869190+00:00"
      ["user_metadata"]=>
      array(0) {}
      ["android_version"]=>
      array(3) {
         ["max"]=>NULL
         ["min"]=>NULL
         ["eq"]=>NULL
      }
    }
  }
} 
  1. To get deploy count I request https://api.ionic.io/deploys?channel=c8d19f70-91db-4c0d-b5a1-031a6a6ed6dc&page=1&page_size=10000
    Answer is:
array(2) {
  ["meta"]=>
  array(3) {
    ["status"]=>int(404)
    ["version"]=>string(12) "2.0.0-beta.0"
    ["request_id"]=>string(36) "ce8ce7aa-9212-4a5c-ca0e-7ea505adfa64"
  }
  ["error"]=>
     array(3) {
     ["type"]=>string(8) "NotFound"
     ["link"]=>NULL
     ["message"]=>string(14) "404: Not Found"
  }
}

Why it is Not Found? What is wrong?


#2

Comparing what you wrote with https://docs.ionic.io/api/endpoints/deploy.html#gets this all looks good. I think the request is well formed and you are using the correct uuid.

Tried without that?


deploy of the channel is the currently active deploy, right?


#3

Yes. I tried to remove pagination parameters and the result is the same. And Yes, I tried the channel this active deploys in it.


#4

As this is a Ionic Service you can also use the support form and just ask them:
http://ionicframework.com/support#support


#5

I wrote here because the support is wrote the answer to me:


Zach H. (Ionic Support)
Jun 30, 3:49 PM CDT

Hi,

I wish I could be of more help here, but at our current price point our team doesn’t have the resources to support this kind of direct debugging of individual instances of our services. Instead, we work to keep our technical documentation up to date and comprehensive so that our community of developers have the resources they need to help themselves and help each other. I recommend you check out the following resources:

The Ionic Forum (extremely active Q&A forum, this is a great place to ask questions!):

The Ionic Worldwide Slack group:
http://ionicworldwide.herokuapp.com/

There’s also a lot of Ionic-related activity over at Stack Overflow

The Ionic Documentation (for information about using the actual framework and how Ionic works):
http://ionicframework.com/docs/

I hope you’re able to work through this issue!

Should I write again?


#6

Nah, seems like they don’t have the time for that right now.

What does https://api.ionic.io/deploys return without any parameters?


#7

Opened in the browser https://api.ionic.io/deploys . The result 404: Not Found

{"error": {"type": "NotFound", "message": "404: Not Found", "link": null}, "meta": {"version": "2.0.0-beta.0", "status": 404, "request_id": "14433059-cb8c-4451-c49c-65acd56b9f10"}}


#8

Yeah, I assume you still need the Auth stuff for that to work. That is the call you made with ?channel=, now just testing if without it maybe returns everything or useful data to create the correct request you were trying.


#9

For Auth I use always headers for all my requests:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI1Nzk5ZWM5Ni04OGI5LTQ3OGMtYjIwOS0zNjRmYjQ4OTkxMzAifQ.fHF7hb1PXooxpqpo9Uuyrm92xCLLDP4MKjr_VL1vNYU

And the app id is:
e24347e3

The result is the same.


#10

That would mean this documentation here is incorrect: https://docs.ionic.io/api/endpoints/deploy.html#gets Wouldn’t it?


#11

Yes and I think so. Yes and I think so.


#12

That I would send to support again… not it is not “how do I write code for this” but “this documentation here is broken”.


#13

So do you already send question to support?


#14

No, I am just trying to help you. You should write them.


#15

Ok I will try again.