Files
Julien Lengrand-Lambert 3cdf8826eb Adding flyio
2024-03-07 10:52:37 +01:00

305 lines
9.1 KiB
HTTP

## UsersApi
### Add an email address for the authenticated user
## Add an email address for the authenticated user
POST https://api.github.com/user/emails
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"emails" : [ "octocat@github.com", "mona@github.com", "octocat@octocat.org" ]
}
### Add social accounts for the authenticated user
## Add social accounts for the authenticated user
POST https://api.github.com/user/social_accounts
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"account_urls" : [ "https://facebook.com/GitHub", "https://www.youtube.com/@GitHub" ]
}
### Block a user
## Block a user
PUT https://api.github.com/user/blocks/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Check if a user is blocked by the authenticated user
## Check if a user is blocked by the authenticated user
GET https://api.github.com/user/blocks/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Check if a user follows another user
## Check if a user follows another user
GET https://api.github.com/users/{{username}}/following/{{target_user}}
Authorization: Bearer {{bearerToken}}
### Check if a person is followed by the authenticated user
## Check if a person is followed by the authenticated user
GET https://api.github.com/user/following/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Create a GPG key for the authenticated user
## Create a GPG key for the authenticated user
POST https://api.github.com/user/gpg_keys
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"name" : "Octocat's GPG Key",
"armored_public_key" : "-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v1\n\nmQINBFnZ2ZIBEADQ2Z7Z7\n-----END PGP PUBLIC KEY BLOCK-----"
}
### Create a public SSH key for the authenticated user
## Create a public SSH key for the authenticated user
POST https://api.github.com/user/keys
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"title" : "ssh-rsa AAAAB3NzaC1yc2EAAA",
"key" : "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234"
}
### Create a SSH signing key for the authenticated user
## Create a SSH signing key for the authenticated user
POST https://api.github.com/user/ssh_signing_keys
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"key" : "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
"title" : "ssh-rsa AAAAB3NzaC1yc2EAAA"
}
### Delete an email address for the authenticated user
## Delete an email address for the authenticated user
DELETE https://api.github.com/user/emails
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"emails" : [ "octocat@github.com", "mona@github.com" ]
}
### Delete a GPG key for the authenticated user
## Delete a GPG key for the authenticated user
DELETE https://api.github.com/user/gpg_keys/{{gpg_key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Delete a public SSH key for the authenticated user
## Delete a public SSH key for the authenticated user
DELETE https://api.github.com/user/keys/{{key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Delete social accounts for the authenticated user
## Delete social accounts for the authenticated user
DELETE https://api.github.com/user/social_accounts
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"account_urls" : [ "https://facebook.com/GitHub", "https://www.youtube.com/@GitHub" ]
}
### Delete an SSH signing key for the authenticated user
## Delete an SSH signing key for the authenticated user
DELETE https://api.github.com/user/ssh_signing_keys/{{ssh_signing_key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Follow a user
## Follow a user
PUT https://api.github.com/user/following/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get the authenticated user
## Get the authenticated user
GET https://api.github.com/user
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get a user
## Get a user
GET https://api.github.com/users/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get contextual information for a user
## Get contextual information for a user
GET https://api.github.com/users/{{username}}/hovercard
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get a GPG key for the authenticated user
## Get a GPG key for the authenticated user
GET https://api.github.com/user/gpg_keys/{{gpg_key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get a public SSH key for the authenticated user
## Get a public SSH key for the authenticated user
GET https://api.github.com/user/keys/{{key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Get an SSH signing key for the authenticated user
## Get an SSH signing key for the authenticated user
GET https://api.github.com/user/ssh_signing_keys/{{ssh_signing_key_id}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List users
## List users
GET https://api.github.com/users
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List users blocked by the authenticated user
## List users blocked by the authenticated user
GET https://api.github.com/user/blocks
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List email addresses for the authenticated user
## List email addresses for the authenticated user
GET https://api.github.com/user/emails
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List the people the authenticated user follows
## List the people the authenticated user follows
GET https://api.github.com/user/following
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List followers of the authenticated user
## List followers of the authenticated user
GET https://api.github.com/user/followers
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List followers of a user
## List followers of a user
GET https://api.github.com/users/{{username}}/followers
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List the people a user follows
## List the people a user follows
GET https://api.github.com/users/{{username}}/following
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List GPG keys for the authenticated user
## List GPG keys for the authenticated user
GET https://api.github.com/user/gpg_keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List GPG keys for a user
## List GPG keys for a user
GET https://api.github.com/users/{{username}}/gpg_keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List public email addresses for the authenticated user
## List public email addresses for the authenticated user
GET https://api.github.com/user/public_emails
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List public keys for a user
## List public keys for a user
GET https://api.github.com/users/{{username}}/keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List public SSH keys for the authenticated user
## List public SSH keys for the authenticated user
GET https://api.github.com/user/keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List social accounts for the authenticated user
## List social accounts for the authenticated user
GET https://api.github.com/user/social_accounts
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List social accounts for a user
## List social accounts for a user
GET https://api.github.com/users/{{username}}/social_accounts
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List SSH signing keys for the authenticated user
## List SSH signing keys for the authenticated user
GET https://api.github.com/user/ssh_signing_keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### List SSH signing keys for a user
## List SSH signing keys for a user
GET https://api.github.com/users/{{username}}/ssh_signing_keys
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Set primary email visibility for the authenticated user
## Set primary email visibility for the authenticated user
PATCH https://api.github.com/user/email/visibility
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"visibility" : "private"
}
### Unblock a user
## Unblock a user
DELETE https://api.github.com/user/blocks/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Unfollow a user
## Unfollow a user
DELETE https://api.github.com/user/following/{{username}}
Accept: application/json
Authorization: Bearer {{bearerToken}}
### Update the authenticated user
## Update the authenticated user
PATCH https://api.github.com/user
Content-Type: application/json
Accept: application/json
Authorization: Bearer {{bearerToken}}
{
"blog" : "https://github.com/blog",
"name" : "monalisa octocat"
}