Apr
MAY
Jun
12
2017
2018
2019
About this capture
Organization:
University of Oklahoma
University of Oklahoma
Archive-It Partner Since: Jul, 2007
Organization Type: Colleges & Universities
Organization URL:
http://libraries.ou.edu University Libraries is the largest research library collection in the state of Oklahoma and contains more than 4.9 million volumes and more than 63,000 print and electronic periodical subscriptions. University Libraries includes several distinguished special collections such as the Harry W. Bass Collection in Business History, the History of Science Collections, the Western History Collections, and the John and Mary Nichols Rare Book and Special Collections in English literature.
Websites maintained by the University of Oklahoma Libraries. Includes the main library website as well as the University of Oklahoma Digital Collections.
T h e W a y b a c k M a c h i n e - h t t p : / / w e b . a r c h i v e . o r g / w e b / 2 0 1 8 0 5 1 2 2 0 4 5 2 3 / h t t p s : / / d e v e l o p e r . g i t h u b . c o m / v 3 / g i t / r e f s /
A P I D o c s
V e r s i o n s
● R e f e r e n c e
● G u i d e s
● L i b r a r i e s
Navigate the docs…
API Overview
Media Types
OAuth Authorizations API
Other Authentication Methods
Troubleshooting
Pre-release Program
API Previews
Versions
Activity overview
Events
Event Types & Payloads
Feeds
Notifications
Starring
Watching
Checks
Check Runs
Check Suites
Gists overview
Comments
Git Data overview
Blobs
Commits
References
Tags
Trees
GitHub Apps overview
Installations
Marketplace
Permissions
Available Endpoints
Issues overview
Assignees
Comments
Events
Labels
Milestones
Timeline
Migration overview
Migrations
Source Imports
Miscellaneous overview
Codes of Conduct
Emojis
Gitignore
Licenses
Markdown
Meta
Rate Limit
Organizations overview
Blocking Users (Organizations)
Members
Outside Collaborators
Webhooks
Projects overview
Cards
Collaborators
Columns
Pull Requests overview
Reviews
Review Comments
Review Requests
Reactions overview
Commit Comment
Issue
Issue Comment
Pull Request Review Comment
Team Discussion
Team Discussion Comment
Repositories overview
Branches
Collaborators
Comments
Commits
Community
Contents
Deploy Keys
Deployments
Downloads
Forks
Invitations
Merging
Pages
Releases
Statistics
Statuses
Traffic
Webhooks
Search overview
Repositories
Code
Commits
Issues
Users
Topics
Text match metadata
Legacy search
Teams
Discussions
Discussion comments
Members
SCIM
Users overview
Blocking Users
Emails
Followers
Git SSH Keys
GPG Keys
G i t R e f e r e n c e s
A G i t r e f e r e n c e ( g i t r e f ) i s j u s t a f i l e t h a t c o n t a i n s a G i t c o m m i t S H A - 1 h a s h .
W h e n r e f e r r i n g t o a G i t c o m m i t , y o u c a n u s e t h e G i t r e f e r e n c e , w h i c h i s a n
e a s y - t o - r e m e m b e r n a m e , r a t h e r t h a n t h e h a s h . T h e G i t r e f e r e n c e c a n b e r e w r i t t e n
t o p o i n t t o a n e w c o m m i t . A b r a n c h i s j u s t a G i t r e f e r e n c e t h a t s t o r e s t h e n e w G i t
c o m m i t h a s h . T h e s e e n d p o i n t s a l l o w y o u t o r e a d a n d w r i t e r e f e r e n c e s
t o y o u r G i t d a t a b a s e o n G i t H u b .
S e e t h e G i t D a t a b a s e A P I f o r m o r e d e t a i l s .
● G e t a r e f e r e n c e
● G e t a l l r e f e r e n c e s
● C r e a t e a r e f e r e n c e
● U p d a t e a r e f e r e n c e
● D e l e t e a r e f e r e n c e
N o t e : T o h e l p w i t h m i g r a t i n g f r o m o u r R E S T A P I v 3 t o G r a p h Q L A P I v 4 , w e ' r e i n t r o d u c i n g a p r e v i e w p e r i o d t o i n c l u d e t h e G r a p h Q L n o d e _ i d i n t h e r e s p o n s e f o r m a n y R E S T A P I v 3 r e s o u r c e s . S e e t h e b l o g p o s t f o r f u l l d e t a i l s . T o a c c e s s n o d e _ i d d u r i n g t h e p r e v i e w p e r i o d , y o u m u s t p r o v i d e a c u s t o m m e d i a t y p e i n t h e A c c e p t h e a d e r :
application/vnd.github.jean-grey-preview+json
W a r n i n g : T h e A P I m a y c h a n g e w i t h o u t a d v a n c e n o t i c e d u r i n g t h e p r e v i e w p e r i o d . P r e v i e w f e a t u r e s a r e n o t s u p p o r t e d f o r p r o d u c t i o n u s e . I f y o u e x p e r i e n c e a n y i s s u e s , c o n t a c t G i t H u b s u p p o r t .
G e t a r e f e r e n c e
R e t u r n s a s i n g l e r e f e r e n c e f r o m y o u r G i t d a t a b a s e .
N o t e : Y o u n e e d t o e x p l i c i t l y r e q u e s t a p u l l r e q u e s t t o t r i g g e r a m e r g e c o m m i t c r e a t i o n . F o r m o r e i n f o r m a t i o n , s e e " C h e c k i n g m e r g e a b i l i t y o f p u l l r e q u e s t s " .
GET /repos/:owner/:repo/git/refs/:ref
T h e r e f i n t h e U R L m u s t b e f o r m a t t e d a s h e a d s / b r a n c h , n o t j u s t b r a n c h . F o r e x a m p l e , t h e c a l l t o g e t t h e d a t a f o r a b r a n c h n a m e d s k u n k w o r k z / f e a t u r e A w o u l d b e :
GET /repos/:owner/:repo/git/refs/heads/skunkworkz/featureA
{
"ref" : "refs/heads/featureA" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA" ,
"object" : {
"type" : "commit" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
I f t h e r e f d o e s n ' t e x i s t i n t h e r e p o s i t o r y , b u t e x i s t i n g r e f s s t a r t w i t h r e f
t h e y w i l l b e r e t u r n e d a s a n a r r a y . F o r e x a m p l e , a c a l l t o g e t t h e d a t a f o r a
b r a n c h n a m e d f e a t u r e , w h i c h d o e s n ' t e x i s t , w o u l d r e t u r n h e a d r e f s
i n c l u d i n g f e a t u r e A a n d f e a t u r e B w h i c h d o .
GET /repos/:owner/:repo/git/refs/heads/feature
[
{
"ref" : "refs/heads/feature-a" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-a" ,
"object" : {
"type" : "commit" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
},
{
"ref" : "refs/heads/feature-b" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/feature-b" ,
"object" : {
"type" : "commit" ,
"sha" : "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac"
}
}
]
I f t h e r e f d o e s n ' t m a t c h a n e x i s t i n g r e f o r a n y p r e f i x e s a 4 0 4 w i l l b e r e t u r n e d .
GET /repos/:owner/:repo/git/refs/heads/feature-branch-that-no-longer-exists
{
"message" : "Not Found" ,
"documentation_url" : "https://developer.github.com/v3"
}
G e t a l l r e f e r e n c e s
R e t u r n s a n a r r a y o f a l l t h e r e f e r e n c e s f r o m y o u r G i t d a t a b a s e , i n c l u d i n g n o t e s a n d s t a s h e s i f t h e y e x i s t o n t h e s e r v e r . A n y t h i n g i n t h e n a m e s p a c e , n o t j u s t h e a d s a n d t a g s , t h o u g h t h a t w o u l d b e t h e m o s t c o m m o n .
N o t e : Y o u n e e d t o e x p l i c i t l y r e q u e s t a p u l l r e q u e s t t o t r i g g e r a m e r g e c o m m i t c r e a t i o n . F o r m o r e i n f o r m a t i o n , s e e " C h e c k i n g m e r g e a b i l i t y o f p u l l r e q u e s t s " .
GET /repos/:owner/:repo/git/refs
Y o u c a n a l s o r e q u e s t a s u b - n a m e s p a c e . F o r e x a m p l e , t o g e t a l l t h e t a g
r e f e r e n c e s , y o u c a n c a l l :
GET /repos/:owner/:repo/git/refs/tags
F o r a f u l l r e f s l i s t i n g , y o u ' l l g e t s o m e t h i n g t h a t l o o k s l i k e :
[
{
"ref" : "refs/heads/master" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/master" ,
"object" : {
"type" : "commit" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
},
{
"ref" : "refs/heads/gh-pages" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/gh-pages" ,
"object" : {
"type" : "commit" ,
"sha" : "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac"
}
},
{
"ref" : "refs/tags/v0.0.1" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v0.0.1" ,
"object" : {
"type" : "tag" ,
"sha" : "940bd336248efae0f9ee5bc7b2d5c985887b16ac" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac"
}
}
]
C r e a t e a r e f e r e n c e
POST /repos/:owner/:repo/git/refs
C r e a t e s a r e f e r e n c e f o r y o u r r e p o s i t o r y . Y o u a r e u n a b l e t o c r e a t e n e w r e f e r e n c e s f o r e m p t y r e p o s i t o r i e s , e v e n i f t h e c o m m i t S H A - 1 h a s h u s e d e x i s t s . E m p t y r e p o s i t o r i e s a r e r e p o s i t o r i e s w i t h o u t b r a n c h e s .
P a r a m e t e r s
Name
Type
Description
ref
string
Required . The name of the fully qualified reference (ie: refs/heads/master). If it doesn't start with 'refs' and have at least two slashes, it will be rejected.
sha
string
Required . The SHA1 value for this reference.
I n p u t
{
"ref" : "refs/heads/featureA" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd"
}
R e s p o n s e
{
"ref" : "refs/heads/featureA" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA" ,
"object" : {
"type" : "commit" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
U p d a t e a r e f e r e n c e
PATCH /repos/:owner/:repo/git/refs/:ref
P a r a m e t e r s
Name
Type
Description
sha
string
Required . The SHA1 value to set this reference to
force
boolean
Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to false will make sure you're not overwriting work. Default: false
I n p u t
{
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"force" : true
}
R e s p o n s e
{
"ref" : "refs/heads/featureA" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA" ,
"object" : {
"type" : "commit" ,
"sha" : "aa218f56b14c9653891f9e74264a383fa43fefbd" ,
"url" : "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
}
}
D e l e t e a r e f e r e n c e
DELETE /repos/:owner/:repo/git/refs/:ref
E x a m p l e : D e l e t i n g a b r a n c h :
DELETE /repos/octocat/Hello-World/git/refs/heads/feature-a
E x a m p l e : D e l e t i n g a t a g :
DELETE /repos/octocat/Hello-World/git/refs/tags/v1.0
R e s p o n s e
Navigate the docs…
API Overview
Media Types
OAuth Authorizations API
Other Authentication Methods
Troubleshooting
Pre-release Program
API Previews
Versions
Activity overview
Events
Event Types & Payloads
Feeds
Notifications
Starring
Watching
Checks
Check Runs
Check Suites
Gists overview
Comments
Git Data overview
Blobs
Commits
References
Tags
Trees
GitHub Apps overview
Installations
Marketplace
Permissions
Available Endpoints
Issues overview
Assignees
Comments
Events
Labels
Milestones
Timeline
Migration overview
Migrations
Source Imports
Miscellaneous overview
Codes of Conduct
Emojis
Gitignore
Licenses
Markdown
Meta
Rate Limit
Organizations overview
Blocking Users (Organizations)
Members
Outside Collaborators
Webhooks
Projects overview
Cards
Collaborators
Columns
Pull Requests overview
Reviews
Review Comments
Review Requests
Reactions overview
Commit Comment
Issue
Issue Comment
Pull Request Review Comment
Team Discussion
Team Discussion Comment
Repositories overview
Branches
Collaborators
Comments
Commits
Community
Contents
Deploy Keys
Deployments
Downloads
Forks
Invitations
Merging
Pages
Releases
Statistics
Statuses
Traffic
Webhooks
Search overview
Repositories
Code
Commits
Issues
Users
Topics
Text match metadata
Legacy search
Teams
Discussions
Discussion comments
Members
SCIM
Users overview
Blocking Users
Emails
Followers
Git SSH Keys
GPG Keys
● M e d i a T y p e s
● O A u t h A u t h o r i z a t i o n s A P I
● O t h e r A u t h e n t i c a t i o n M e t h o d s
● T r o u b l e s h o o t i n g
● P r e - r e l e a s e P r o g r a m
● A P I P r e v i e w s
● V e r s i o n s
● E v e n t s
● E v e n t T y p e s & P a y l o a d s
● F e e d s
● N o t i f i c a t i o n s
● S t a r r i n g
● W a t c h i n g
● C h e c k R u n s
● C h e c k S u i t e s
● C o m m e n t s
● B l o b s
● C o m m i t s
● R e f e r e n c e s
● T a g s
● T r e e s
● I n s t a l l a t i o n s
● G i t H u b M a r k e t p l a c e
● P e r m i s s i o n s
● A v a i l a b l e E n d p o i n t s
● A s s i g n e e s
● C o m m e n t s
● E v e n t s
● L a b e l s
● M i l e s t o n e s
● T i m e l i n e
● M i g r a t i o n s
● S o u r c e I m p o r t s
● C o d e s o f C o n d u c t
● E m o j i s
● G i t i g n o r e
● L i c e n s e s
● M a r k d o w n
● M e t a
● R a t e L i m i t
● B l o c k i n g U s e r s
● M e m b e r s
● O u t s i d e C o l l a b o r a t o r s
● W e b h o o k s
● C a r d s
● C o l l a b o r a t o r s
● C o l u m n s
● R e v i e w s
● R e v i e w C o m m e n t s
● R e v i e w R e q u e s t s
● C o m m i t C o m m e n t
● I s s u e
● I s s u e C o m m e n t
● P u l l R e q u e s t R e v i e w C o m m e n t
● T e a m D i s c u s s i o n
● T e a m D i s c u s s i o n C o m m e n t
● B r a n c h e s
● C o l l a b o r a t o r s
● C o m m e n t s
● C o m m i t s
● C o m m u n i t y
● C o n t e n t s
● D e p l o y K e y s
● D e p l o y m e n t s
● D o w n l o a d s
● F o r k s
● I n v i t a t i o n s
● M e r g i n g
● P a g e s
● R e l e a s e s
● S t a t i s t i c s
● S t a t u s e s
● T r a f f i c
● W e b h o o k s
● R e p o s i t o r i e s
● C o d e
● C o m m i t s
● I s s u e s
● U s e r s
● T o p i c s
● T e x t m a t c h m e t a d a t a
● L e g a c y s e a r c h
● D i s c u s s i o n s
● D i s c u s s i o n c o m m e n t s
● M e m b e r s
● B l o c k i n g U s e r s
● E m a i l s
● F o l l o w e r s
● G i t S S H K e y s
● G P G K e y s
A P I S t a t u s