You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
204 lines
4.7 KiB
204 lines
4.7 KiB
{
|
|
"info": {
|
|
"_postman_id": "eebbf7c9-f616-4e1e-9128-8f26dec53958",
|
|
"name": "RedHat-Event-API",
|
|
"description": "version=1.1 - An API that gives information about the next Red Hat Event",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "location",
|
|
"description": "Folder for location",
|
|
"item": [
|
|
{
|
|
"name": "Get Location",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "285eeaa2-342e-4136-b58a-ee7992196d8a",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test(\"Location is on-line\", function () {",
|
|
" var jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.Location).to.eql(\"on-line\");",
|
|
"});"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http://{{hostname}}/location",
|
|
"description": "Get the location of the next Red Hat Event"
|
|
},
|
|
"response": [
|
|
{
|
|
"id": "5fd53940-1fda-49cf-a07a-eba6c91f472d",
|
|
"name": "Get Location",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http:///location"
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"description": "",
|
|
"type": "text",
|
|
"name": "Content-Type"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{ \n \"Location\": \"on-line\"\n}\n"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "timeframe",
|
|
"description": "Folder for timeframe",
|
|
"item": [
|
|
{
|
|
"name": "Get Timeframe",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "e7d6852e-cacd-4b79-9d0d-9140b18dd723",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test(\"Has a From and a To\", function () {",
|
|
" var jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.From).to.eql(\"19/02/2019\");",
|
|
" pm.expect(jsonData.To).to.eql(\"19/02/2019\");",
|
|
"});"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http://{{hostname}}/timeframe",
|
|
"description": "Get the timeframe of the next Red Hat Event"
|
|
},
|
|
"response": [
|
|
{
|
|
"id": "9c01b8c2-5850-4cae-8795-63ac61a83fb6",
|
|
"name": "Get Timeframe",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http:///timeframe"
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"description": "",
|
|
"type": "text",
|
|
"name": "Content-Type"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "{ \n \"From\": \"19/02/2019\",\n \"To\": \"19/02/2019\"\n}\n"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "participants",
|
|
"description": "Folder for participants",
|
|
"item": [
|
|
{
|
|
"name": "Get Participants",
|
|
"event": [
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "c4afb4fb-adc9-48e1-bfa8-fd2a60f8bf29",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
"pm.test(\"There are two participants\", function () {",
|
|
" var jsonData = pm.response.json();",
|
|
" pm.expect(jsonData.length).to.eql(2);",
|
|
"});"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http://{{hostname}}/participants",
|
|
"description": "Get the participants of the next Red Hat Event"
|
|
},
|
|
"response": [
|
|
{
|
|
"id": "077baf3d-14f9-4f79-9b18-d4e0c14dcad1",
|
|
"name": "Get Participants",
|
|
"originalRequest": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {},
|
|
"url": "http:///participants"
|
|
},
|
|
"status": "OK",
|
|
"code": 200,
|
|
"_postman_previewlanguage": "",
|
|
"header": [
|
|
{
|
|
"key": "Content-Type",
|
|
"value": "application/json",
|
|
"description": "",
|
|
"type": "text",
|
|
"name": "Content-Type"
|
|
}
|
|
],
|
|
"cookie": [],
|
|
"body": "[ \n \"Nicolas\",\n \"David\"\n]"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"event": [
|
|
{
|
|
"listen": "prerequest",
|
|
"script": {
|
|
"id": "362a91c2-9574-44f4-a069-54d6621ddaa9",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"listen": "test",
|
|
"script": {
|
|
"id": "225b3a05-f70b-4170-befb-857c69e0a556",
|
|
"type": "text/javascript",
|
|
"exec": [
|
|
""
|
|
]
|
|
}
|
|
}
|
|
]
|
|
}
|
|
|