-
Notifications
You must be signed in to change notification settings - Fork 12
API
Herman Wong edited this page Dec 25, 2019
·
2 revisions
myProxy has an API that can be used for 3rd party sites to manage your domain
This API uses Access Keys to authenticate requests.
The Access Keys are entered in the Header under Authentication
.
This API requires Content-Type: application/json
for all POST requests
-
GET api/mappings
This endpoint returns all domain mappings.fetch('/api/mappings', { method: 'GET', headers: { Authentication: 'YOUR_ACCESS_TOKEN_HERE` } })
-
POST api/mappings
This endpoint creates a new domain mapping.
fetch('/api/mappings', { method: 'POST', headers: { authentication: 'YOUR_ACCESS_TOKEN_HERE', 'Content-Type': 'application/json' }, body: JSON.stringify({ subdomain: 'your-subdomain', domain: 'your-domain', port: '6572', // This is optional ip: '127.0.0.1' // this is optional }) })
-
GET api/mappings/:id
This endpoint fetches a domain mapping by id
fetch('/api/mappings/your-mapping-id', { method: 'GET', headers: { authentication: 'YOUR_ACCESS_TOKEN_HERE', }, })
-
DELETE api/mappings/:id
This endpoint deletes a domain mapping by id.
fetch('/api/mappings/your-mapping-id', { method: 'DELETE', headers: { authentication: 'YOUR_ACCESS_TOKEN_HERE', } })