API Lifecycle Demo
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.8 KiB

{
"info": {
"_postman_id": "eebbf7c9-f616-4e1e-9128-8f26dec53958",
"name": "RHTE-API",
"description": "version=1.1 - An API that gives information about the Red Hat Tech Exchange",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
"name": "location",
"description": "Folder for location",
"item": [
{
"name": "Get Next Location",
"event": [
{
"listen": "test",
"script": {
"id": "285eeaa2-342e-4136-b58a-ee7992196d8a",
"type": "text/javascript",
"exec": [
"pm.test(\"Location is Praha\", function () {",
" var jsonData = pm.response.json();",
" pm.expect(jsonData.Location).to.eql(\"La Defense\");",
"});"
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": "http://{{hostname}}/location",
"description": "Get the location of the next RedHat Tech Exchange"
},
"response": [
{
"id": "5fd53940-1fda-49cf-a07a-eba6c91f472d",
"name": "Get Next 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\": \"La Defense\"\n}\n"
}
]
}
]
},
{
"name": "timeframe",
"description": "Folder for timeframe",
"item": [
{
"name": "Get Next 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(\"10/10/2018\");",
" pm.expect(jsonData.To).to.eql(\"10/10/2018\");",
"});"
]
}
}
],
"request": {
"method": "GET",
"header": [],
"body": {},
"url": "http://{{hostname}}/timeframe",
"description": "Get the timeframe of the next RedHat Tech Exchange"
},
"response": [
{
"id": "9c01b8c2-5850-4cae-8795-63ac61a83fb6",
"name": "Get Next 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\": \"10/10/2018\",\n \"To\": \"10/10/2018\"\n}\n"
}
]
}
]
},
{
"name": "participants",
"description": "Folder for participants",
"item": [
{
"name": "Get Next 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 RedHat Tech Exchange"
},
"response": [
{
"id": "077baf3d-14f9-4f79-9b18-d4e0c14dcad1",
"name": "Get Next 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 \"Sebastien\",\n \"Nicolas\"\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": [
""
]
}
}
]
}