Updated routes and added postman collection
This commit is contained in:
parent
8f540cde44
commit
a632cc704f
229
Grillo Rails Test.postman_collection.json
Normal file
229
Grillo Rails Test.postman_collection.json
Normal file
@ -0,0 +1,229 @@
|
||||
{
|
||||
"info": {
|
||||
"_postman_id": "e803f093-b1aa-4aac-8d5b-4ddab2a3d338",
|
||||
"name": "Grillo Rails Test",
|
||||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
||||
"_exporter_id": "26128232"
|
||||
},
|
||||
"item": [
|
||||
{
|
||||
"name": "Add New Metric (Foo - 100)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"value\": 100\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/foo",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
"foo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Get All Metrics (Recently Inserted)",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Update Existing Metric (Foo - 50)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"value\": 50\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/foo",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
"foo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Get All Metrics (Updated Value)",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Delete Metric",
|
||||
"request": {
|
||||
"method": "DELETE",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/foo",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
"foo"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Get All Metrics (Now Empty)",
|
||||
"protocolProfileBehavior": {
|
||||
"disableBodyPruning": true
|
||||
},
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"value\": 100\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Add New Metric (Bar - 99)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"value\": 99\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/bar",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
"bar"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
},
|
||||
{
|
||||
"name": "Add New Metric (Baz - 11)",
|
||||
"request": {
|
||||
"method": "POST",
|
||||
"header": [],
|
||||
"body": {
|
||||
"mode": "raw",
|
||||
"raw": "{\n \"value\": 11\n}",
|
||||
"options": {
|
||||
"raw": {
|
||||
"language": "json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"url": {
|
||||
"raw": "{{server}}/metric/baz",
|
||||
"host": [
|
||||
"{{server}}"
|
||||
],
|
||||
"path": [
|
||||
"metric",
|
||||
"baz"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
],
|
||||
"event": [
|
||||
{
|
||||
"listen": "prerequest",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"listen": "test",
|
||||
"script": {
|
||||
"type": "text/javascript",
|
||||
"exec": [
|
||||
""
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"variable": [
|
||||
{
|
||||
"key": "server",
|
||||
"value": "http://localhost:3000",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -2,7 +2,6 @@ Rails.application.routes.draw do
|
||||
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html
|
||||
get '/metric/', to: 'metrics#index'
|
||||
post '/metric/:key', to: 'metrics#create'
|
||||
get '/metric/:key', to: 'metrics#show'
|
||||
delete '/metric/:key', to: 'metrics#delete'
|
||||
# Defines the root path route ("/")
|
||||
# root "articles#index"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user