1

have a nice day i have json file and i want all of it's parameters get converted into php objects . i mean i want all of json variables to be changed by php this is my json file and i want post to my url

{
 "variables": [],
 "info": {
  "name": "Test API",
  "_postman_id": "4f1fda5f-910c-71ac-0914-db2d0b9c6521",
  "description": "",
  "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
 },
 "item": [
  {
   "name": "Access Token",
   "request": {
    "url": "{{url}}/api/authorize/access_token",
    "method": "POST",
    "header": [],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "client_id",
       "value": "{{clientId}}",
       "type": "text"
      },
      {
       "key": "client_secret",
       "value": "{{clientSecret}}",
       "type": "text"
      },
      {
       "key": "grant_type",
       "value": "client_credentials",
       "type": "text"
      }
     ]
    },
    "description": "Client Credentials for Postman"
   },
   "response": []
  },
  {
   "name": "Layout create",
   "request": {
    "url": "{{url}}/api/layout?envelope=1",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "name",
       "value": "Postman layout",
       "type": "text"
      }
     ]
    },
    "description": ""
   },
   "response": []
  },
  {
   "name": "Region create",
   "request": {
    "url": "{{url}}/api/region/24?envelope=1",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "width",
       "value": "300",
       "type": "text"
      },
      {
       "key": "height",
       "value": "450",
       "type": "text"
      },
      {
       "key": "top",
       "value": "150",
       "type": "text"
      },
      {
       "key": "left",
       "value": "350",
       "type": "text"
      }
     ]
    },
    "description": ""
   },
   "response": []
  },
  {
   "name": "Library Upload",
   "request": {
    "url": "{{url}}/api/library",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "files",
       "value": "",
       "type": "file"
      },
      {
       "key": "name",
       "value": "API UPLOAD",
       "type": "text"
      },
      {
       "key": "oldMediaId",
       "value": "249",
       "type": "text",
       "disabled": true
      },
      {
       "key": "updateInLayouts",
       "value": "1",
       "type": "text",
       "disabled": true
      },
      {
       "key": "deleteOldRevisions",
       "value": "1",
       "type": "text",
       "disabled": true
      }
     ]
    },
    "description": ""
   },
   "response": []
  },
  {
   "name": "Playlist Library Assign",
   "request": {
    "url": "{{url}}/api/playlist/library/assign/177",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "media[]",
       "value": "134",
       "type": "text"
      }
     ]
    },
    "description": "\n"
   },
   "response": []
  },
  {
   "name": "Action: Change Layout",
   "request": {
    "url": "{{url}}/api/displaygroup/2/action/changeLayout?envelope=1",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "layoutId",
       "value": "24",
       "type": "text"
      },
      {
       "key": "downloadRequired",
       "value": "true",
       "type": "text"
      },
      {
       "key": "changeMode",
       "value": "queue",
       "type": "text"
      }
     ]
    },
    "description": "Root Request\n"
   },
   "response": []
  },
  {
   "name": "Action: Overlay Layout",
   "request": {
    "url": "{{url}}/api/displaygroup/28/action/overlayLayout?envelope=1",
    "method": "POST",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "layoutId",
       "value": "73",
       "type": "text"
      },
      {
       "key": "downloadRequired",
       "value": "true",
       "type": "text"
      },
      {
       "key": "duration",
       "value": "10",
       "type": "text"
      }
     ]
    },
    "description": "Root Request\n"
   },
   "response": []
  },
  {
   "name": "Layouts",
   "request": {
    "url": "{{url}}/api/layout?layout=&embed=regions,playlists",
    "method": "GET",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "client_id",
       "value": "{{clientId}}",
       "type": "text"
      },
      {
       "key": "client_secret",
       "value": "{{clientSecret}}",
       "type": "text"
      },
      {
       "key": "grant_type",
       "value": "client_credentials",
       "type": "text"
      }
     ]
    },
    "description": "\n"
   },
   "response": []
  },
  {
   "name": "DisplayGroups",
   "request": {
    "url": "{{url}}/api/displaygroup",
    "method": "GET",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "access_token",
       "value": "{{access_token}}",
       "type": "text"
      }
     ]
    },
    "description": "\n"
   },
   "response": []
  },
  {
   "name": "Displays",
   "request": {
    "url": "{{url}}/api/display",
    "method": "GET",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {
     "mode": "formdata",
     "formdata": [
      {
       "key": "client_id",
       "value": "lqDQiJiv8lEWi9TTddSgTGb8aIod0OLpLWP0ipnn",
       "type": "text"
      },
      {
       "key": "client_secret",
       "value": "gKtQM7Jnt02LpnRyknuUyI7pI7xmlvW5M9bZ7LVtxC7gLzNp1IXUMfGvVNmdeoEFVkTVhKEmaIGKl9RtpnhqlVb71oq32443VuHYQgQdHvfr2iTgdN4x10Xig87QM47P2CQXQ5gn6Y6XpKuLq27flNDUtsHEyWiTirQL3HcUipL8dEbBwJzLvqDmzFoq7Q83MWs8TDkcVIuolx5qWLdeN7YLwV6liAa2gR0egmc5yUQkCGMxzx4bhGVMDywAfa",
       "type": "text"
      },
      {
       "key": "grant_type",
       "value": "client_credentials",
       "type": "text"
      }
     ]
    },
    "description": "\n"
   },
   "response": []
  },
  {
   "name": "Request Screenshot",
   "request": {
    "url": "{{url}}/api/display/requestscreenshot/33?envelope=1",
    "method": "PUT",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {},
    "description": ""
   },
   "response": []
  },
  {
   "name": "Media",
   "request": {
    "url": "{{url}}/api/library?media=API",
    "method": "GET",
    "header": [
     {
      "key": "Authorization",
      "value": "Bearer {{access_token}}",
      "description": ""
     }
    ],
    "body": {},
    "description": ""
   },
   "response": []
  }
 ]
}
kbkwp
  • 11
  • 6

0 Answers0