View Single Post
Old 06-08-2023, 08:54 PM  
tomash999
Confirmed User
 
Industry Role:
Join Date: Sep 2015
Posts: 88
It depends on the version. See the examples in the documentation

```
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>"\
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/OWNER/R...trees/TREE_SHA
```
Get a tree (docs.github.com/en/rest/git/trees):
https://docs.github.com/en/rest/git/...-28#get-a-tree

Quote:
Versions will be named based on the date when they were released. For example, if we release a new version on December 25, 2025, we would call that version 2025-12-25.

When we release a new version, the previous version(s) will still be available, so you won’t be forced to upgrade right away.

Picking what version you want to use is easy. You just specify the version you want to use on a request-by-request basis using the X-GitHub-Api-Version header.

In our API documentation, you can pick which version of the docs you want to view using the version picker.
tomash999 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote