This app aims to make Debian official cloud images more easily accessible to users. Users will be able to search for images based on their attributes, follow instructions to run the images on providers and also follow a RSS feed which will notify about new images releases.
https://www.getpostman.com/collections/8346a24dfed7b06f9521
For the login we use Basic Auth, so for this step to work you should access the URL on your browser and type your credentials.
If everything goes well a token should appear within a JSON response. This token needs to be used to perform write and delete actions on DB and have a 30 min expiration.
If you typed a wrong username or password an error message saying “Could not verify” should appear.
curl -X GET "http://image-finder.debian.net/api/login"
GET /api/login HTTP/1.1
Host: image-finder.debian.net
Parameter | Type |
---|---|
name | String |
arch | String |
release | String |
img_type | String |
vendor | String |
version | String |
job_url | String |
package | String |
provider_id | Integer |
created_at | Date(yyyy-MM-dd) |
curl -X POST -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"name":"",
"arch":"",
"release":"",
"img_type":"",
"vendor":"",
"version":"",
"job_url":"",
"package":"",
"provider_id":0,
"created_at":""
}' "http://image-finder.debian.net/api/image"
POST /api/image HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"name":"",
"arch":"",
"release":"",
"img_type":"",
"vendor":"",
"version":"",
"job_url":"",
"package":"",
"provider_id":0,
"created_at":""
}
Parameter | Type |
---|---|
name | String |
arch | String |
release | String |
img_type | String |
vendor | String |
version | String |
job_url | String |
package | String |
created_at | Date(yyyy-MM-dd) |
curl -X PUT -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"name":"",
"arch":"",
"release":"",
"img_type":"",
"vendor":"",
"version":"",
"job_url":"",
"package":"",
"created_at":""
}' "http://image-finder.debian.net/api/image/{IMAGE_ID}"
PUT /api/image/%7BIMAGE_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"name":"",
"arch":"",
"release":"",
"img_type":"",
"vendor":"",
"version":"",
"job_url":"",
"package":"",
"created_at":""
}
curl -X GET -H "Content-Type: application/json" "http://image-finder.debian.net/api/image"
GET /api/image HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
curl -X POST -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"name":"",
"description":"",
"markdown_file": ""
}' "http://image-finder.debian.net/api/provider"
POST /api/provider HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"name":"",
"description":"",
"markdown_file": ""
}
curl -X PUT -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"name":"",
"description":"",
"markdown_file": ""
}' "http://image-finder.debian.net/api/provider/{PROVIDER_ID}"
PUT /api/provider/%7BPROVIDER_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"name":"",
"description":"",
"markdown_file": ""
}
curl -X GET -H "Content-Type: application/json" "http://image-finder.debian.net/api/provider"
GET /api/provider HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
curl -X GET -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" "http://image-finder.debian.net/api/user"
GET /api/user HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
curl -X GET -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" "http://image-finder.debian.net/api/user/{USER_PUBLIC_ID}"
GET /api/user/%7BUSER_PUBLIC_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
curl -X POST -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"name":"",
"password":""
}' "http://image-finder.debian.net/api/user"
POST /api/user HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"name":"",
"password":""
}
curl -X PUT -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" "http://image-finder.debian.net/api/user/promote/{USER_PUBLIC_ID}"
PUT /api/user/promote/%7BUSER_PUBLIC_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
curl -X DELETE -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" "http://image-finder.debian.net/api/user/{USER_PUBLIC_ID}"
DELETE /api/user/%7BUSER_PUBLIC_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
curl -X PUT -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" "http://image-finder.debian.net/api/user/unpromote/{USER_PUBLIC_ID}"
PUT /api/user/unpromote/%7BUSER_PUBLIC_ID%7D HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
curl -X POST -H "Content-Type: application/json" -H "x-access-token: {YOUR_TOKEN}" -d '{
"old_password":"",
"new_password":"",
"repeat_password": ""
}' "http://image-finder.debian.net/api/user/change_password"
POST /api/user/change_password HTTP/1.1
Host: image-finder.debian.net
Content-Type: application/json
x-access-token: {YOUR_TOKEN}
{
"old_password":"",
"new_password":"",
"repeat_password": ""
}