endoflife-date / endoflife.date

Informative site with EoL dates of everything
https://endoflife.date
MIT License
2.47k stars 757 forks source link

Discrepancy between website and API representation #5526

Open trangvu9 opened 2 months ago

trangvu9 commented 2 months ago

Hi, I was looking at Istio, on the website (https://endoflife.date/istio) it shows security support column:

image

But the API doesn't have this info:

image

How do I get this security column using the API?

Thanks

welcome[bot] commented 2 months ago

Thank you for opening your first issue here :+1:. Be sure to follow the issue template if you chose one.

captn3m0 commented 2 months ago

The security column is same as the EoL field for Istio.

trangvu9 commented 2 months ago

The security column is same as the EoL field for Istio.

how do I know this? Make a guess?

captn3m0 commented 2 months ago

The schema is documented at https://endoflife.date/docs/api. If you're looking specifically for the label that we're using - that isn't a part of the API, since the API should be product neutral.

Instead, we offer two fields for support, eol, discontinued, lts. Assuming you're using the data somewhere programmatically, that should work, since these are somewhat cleanly defined.

Do you have a usecase where you need the labels as well?

If you really need this information, this is all part of our frontmatter, so is picked up by other sources, such as DataTig, which provides it over an API: https://hub.datatig.com/gh/endoflife-date/endoflife.date/tree/master/type/products/record/istio/api1.json (browse at https://hub.datatig.com/gh/endoflife-date/endoflife.date/tree/master/type/products/record/istio). In the case of Istio, the eolColumnLabel field is coming from our defaults defined at https://github.com/endoflife-date/endoflife.date/blob/master/_config.yml#L72-L101. So you could do a JSON merge of our defaults + frontmatter and read the Labels.

Finally, our upcoming v1 API (#2080) has a labels key: https://deploy-preview-2080--endoflife-date.netlify.app/docs/api/v1/. See sample at https://deploy-preview-2080--endoflife-date.netlify.app/api/v1/products/almalinux/. Feedback is welcome

trangvu9 commented 2 months ago

The schema is documented at https://endoflife.date/docs/api. If you're looking specifically for the label that we're using - that isn't a part of the API, since the API should be product neutral.

Instead, we offer two fields for support, eol, discontinued, lts. Assuming you're using the data somewhere programmatically, that should work, since these are somewhat cleanly defined.

Do you have a usecase where you need the labels as well?

If you really need this information, this is all part of our frontmatter, so is picked up by other sources, such as DataTig, which provides it over an API: https://hub.datatig.com/gh/endoflife-date/endoflife.date/tree/master/type/products/record/istio/api1.json (browse at https://hub.datatig.com/gh/endoflife-date/endoflife.date/tree/master/type/products/record/istio). In the case of Istio, the eolColumnLabel field is coming from our defaults defined at https://github.com/endoflife-date/endoflife.date/blob/master/_config.yml#L72-L101. So you could do a JSON merge of our defaults + frontmatter and read the Labels.

Finally, our upcoming v1 API (#2080) has a labels key: https://deploy-preview-2080--endoflife-date.netlify.app/docs/api/v1/. See sample at https://deploy-preview-2080--endoflife-date.netlify.app/api/v1/products/almalinux/. Feedback is welcome

Thanks for the explanation. It serves me well. I just wanted to somewhat replicate what you have on the website and the API is the only thing that I looked at, so it seems not possible if using just the API alone. This indeed turns out to be true.

Regarding my use case, I'm looking for an API that has security support label.

captn3m0 commented 2 months ago

I just wanted to somewhat replicate what you have on the website

Can you help us understand this usecase further? Is this a private version of the website? Or a specialized version? We have a page documenting Known Users and would love add your usecase to the list.