https://github.com/fflch/switches
https://github.com/fflch/switches
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/fflch/switches
- Owner: fflch
- Created: 2021-07-18T22:55:44.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T00:00:43.000Z (over 3 years ago)
- Last Synced: 2025-01-16T00:56:19.813Z (over 1 year ago)
- Language: PHP
- Size: 277 KB
- Stars: 0
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Exemplo de requisição post com shell:
curl --include --header "Authorization: 123" \
-X POST -H "Content-Type: application/json" --data \
'{"hostname": "008.054517","ip": "200.0.1.4","poe_type": "no","model": "hp_comware","local": "fcs","position": "RACK-A"}' \
http://127.0.0.1:8000/api/equipamentos
Exemplo de requisição post com python:
import requests
import json
url = 'http://127.0.0.1:8000/api/equipamentos'
data = {"hostname": "008.054517",
"ip": "200.0.1.4",
"poe_type": "no",
"model": "hp_comware",
"local": "fcs",
"position": "RACK-A"}
headers = {'Authorization': '123'}
r = requests.post(url, data=data, headers=headers)
print(r.content)
Estrutura:
equipamento -> porta -> snapshot -> macs