API
Docs and API's for Weasy.io
URL forwarding
Manage all the url forwarding in your website.Accepts GET POST PUT DELETE
All requests to the API must be authenticated with an API key on the HTTP Authorization header.
GET
Get all files from website filemanagerRequest example
~ curl -i -X GET \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/urlforwarding
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
https://api.weasy.io/v1/urlforwarding
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| limit | integer | optional | define items per page |
| page | integer | optional | define page to display |
POST
Add a url forward or collection of url forwards to your website.Request example
~ curl -i -X POST \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[{"source":"http://www.weasy.io/products/sample","type":302,"destination":"http://www.weasy.io/products/sample2"},\
{"source":"http://www.weasy.io/products/sample3","type":301,"destination":"http://www.weasy.io/products/sample4"}]'\
https://api.weasy.io/v1/urlforward
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[{"source":"http://www.weasy.io/products/sample","type":302,"destination":"http://www.weasy.io/products/sample2"},\
{"source":"http://www.weasy.io/products/sample3","type":301,"destination":"http://www.weasy.io/products/sample4"}]'\
https://api.weasy.io/v1/urlforward
Body response example [ HTTP CODE: 200 ]
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| source | string | required | source url to be redirected |
| type | integer | required | redirect type options: 301 for permanent, 302 for temporary redirect |
| destination | string | required | destination to the new url |
PUT
Change a url forward from your website.Request example
~ curl -i -X PUT \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"source":"http://www.weasy.io/products/sample","type":302,"destination":"http://www.weasy.io/products/sample3"}'\
https://api.weasy.io/v1/urlforward/1
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '{"source":"http://www.weasy.io/products/sample","type":302,"destination":"http://www.weasy.io/products/sample3"}'\
https://api.weasy.io/v1/urlforward/1
Body response example [ HTTP CODE: 200 ]
Path parameters
| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| id | integer | required | url forward id |
Body attributes
A json payload containing the following attributes.| NAME | TYPE | REQUIRED | DESCRIPTION |
|---|---|---|---|
| source | string | required | source url to be redirected |
| type | integer | required | redirect type options: 301 for permanent, 302 for temporary redirect |
| destination | string | required | destination to the new url |
DELETE
Delete a url forward or collection of url forwards from your website.Request example
~ curl -i -X DELETE \
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/newsletter
-H 'X-API-KEY:xsFPVLn7aOllXixPDaGBgCZpyTmyX7G6CniNtKD' \
-H 'Content-Type:application/json' \
-d '[1,2]'\
https://api.weasy.io/v1/newsletter
Body response example [ HTTP CODE: 200 ]
Body attributes
| Attribute description |
|---|
| A json payload containing an array of id or ids. Use GET for collect all the ids. |