Can I get a log of all requests made using a GitHub API key? - github

I would like to use the GitHub API to get a log of all API requests made using a specific API key. I couldn't find anything in the GitHub API documentation about getting a history of usage for my API key. Is this possible?

Related

Can a workflow badge be retrieved with the GitHub API?

The GitHub API documentation shows an example for retrieving repository workflows.
The response includes a badge_url field for each workflow. For example:
"badge_url": "https://github.com/octo-org/octo-repo/workflows/CI/badge.svg"
Is it possible to retrieve the badge using the GitHub API? My question arises for a scenario where I'm trying to retrieve the badge for a private repository, and it would be more convenient to use the GitHub API versus alternative approaches.

When should you not use GitHub GraphQL API?

Much has been written about the benefits of the GitHub GraphQL API. And this is a really great technology. The only thing I can't figure out is in what situations is it still better to use the good old REST API v3?
Github GraphQL API is subject to the following caveats:
GraphQL API can only be accessed using authentication. You need a token to use this API. Thus, you can't use GraphQL in an environment where you can't secure the provisioning of this token. For example, in a web app without github authentication. This is a big caveat, especially for people who want to create web app or scripts that target only public repository informations.
Searching commits and code using the search API is not possible in Github Graphql. Only searching repos, issues and users are supported (for the search API)
some features like comparing commits and getting contributors are not possible yet in Graphql. Another example: you can't recursively get a tree using GraphQL API
some mutations already available in v3 may not yet have been implemented in GraphQL (create commit, create tag, create branch etc...), checkout mutations documentation

how do you use the google review Gatsby plugin?

I'm trying to use the gatsby-source-google-reviews plugin. Upon trying to run develop, I get an invalid API key message. Where do I find and put this API key? And is the API key considered the same thing as the placeID?

How to post a message to the github api using hub api?

I want to use hub to create some automation script but can't figure out how to post a message to the api. More specifically it is this api endpoint I want to post to: https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key
I've tried the following:
hub api user/gpg_keys -F armored_public_key='-----BEGING PGP ....'
hub api user/gpg_keys --raw-field "body={armored_public_key='-----BEGING PGP ....'}
None of the above work, the response back is:
{"message":"Not Found","documentation_url":"https://developer.github.com/v3/users/gpg_keys/#create-a-gpg-key"}
which is not very helpful. I thought that -F meant fields within the payload, but I guess I'm wrong.
So how do I post a message with a body using hub api?
UPDATE
I did download the repo to create a modified version that has some more logging, but can't figure out what's wrong. Everything looks good from what I understand in how the request is made.
Looking through the code I found the reason to why this is. It seems like it is hard coded that you should only get the repo scopes when you log in the first time. If you use a token you've created yourself that has more access everything will work as it should.

JIRA REST API Oauth dance cannot be implemented with consumer key

I am trying to call the JIRA REST API and get a request token. I have defined an application link in JIRA with consumer key and public key. But when I am trying to request the request-token with the following url
http://localhost:8080//plugins/servlet/oauth/request-token?oauth_consumer_key=consumerKey (which was used in creating the application link)
I am getting the following response
oauth_problem=consumer_key_unknown
How to get rid of this?
This link would be handy if you are using python.
https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples/src/d625161454d1ca97b4515c6147b093fac9a68f7e/python/app.py?at=default
Also use python centrifi package to get pass sslHandShakeError. ( atlassian root certificate seems to be not from known one )