• Published 10 years ago

cloudflash-hiroproxy v

Weekly downloads
-
License
-
Repository
-
Last release
10 years ago

cloudflash-ffproxy

List of ffproxy APIs

Create ffproxy category match config

Verb      URI                 Description
POST      /ffproxy/category        Create ffproxy category match configuration.

On success it returns JSON data with the UUID for the ffproxy category match created configuration.

Example Request and Response

Request JSON

[
{
    "policy": "string",
    "type": "white",
    "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [1,2,3,4]
                
        }
    ]
},
{
    "policy": "string",
    "type": "Black",
    "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [5,6]
        }
    ]
}
]

Response JSON

{
"id": "d8fc22ff-3024-4937-bf18-cfbca8010e34",
"config": [
    {
        "policy": "string",
        "type": "white/ Black list",
        "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [1,2,3,4]
                
        }
    },
    {
        "policy": "string",
        "type": "white/ Black list",
        "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [5,6]
        }
    ]
    }
]

}

List ffproxy category match

Verb	URI	             Description
GET	       /ffproxy/category     List summary of ffproxy category match configuration.

Example Request and Response

Response

[
   {
       "id": "d8fc22ff-3024-4937-bf18-cfbca8010e34",
       "config":
       [
           {
               "policy": "test policy",
               "type": "white",
               "rules":
               [
                   {
                       "condition": "0.0.0.0/0",
                       "exception":
                       [
                           "150",
                           "151"
                       ],
                       "categories":
                       [
                           1,
                           2,
                           3,
                           4
                       ]
                   }
               ]
           },
           {
               "policy": "test policy1",
               "type": "Black",
               "rules":
               [
                   {
                       "condition": "0.0.1.1/0",
                       "exception":
                       [
                           "152",
                           "153"
                       ],
                       "categories":
                       [
                           5,
                           6
                       ]
                   }
               ]
           }
       ]
   }
]

List ffproxy category match by ID

Verb	URI	                Description
GET	       /ffproxy/category/:id	List summary of ffproxy category match configured by ID.

Example Request and Response

Response

    {
   "id": "d8fc22ff-3024-4937-bf18-cfbca8010e34",
   "config":
   [
       {
           "policy": "test2",
           "type": "white",
           "rules
               {
                   "condition": "0.0.0.0/0",
                   "exception":
                   [
                       "150",
                       "151"
                   ],
                   "categories":
                   [
                       1,
                       2,
                       3,
                       4
                   ]
               }
           ]
       },
       {
           "policy": "test3",
           "type": "Black",
           "rules":
           [
               {
                   "condition": "0.0.1.1/0",
                   "exception":
                   [
                       "152",
                       "153"
                   ],
                   "categories":
                   [
                       5,
                       6
                   ]
               }
           ]
       }
   ]
}

Update ffproxy category match

Verb	URI	              Description
PUT 	/ffproxy/category/:id   update ffproxy category match configuration by ID.

On success it returns JSON data with the UUID for the ffproxy category match created configuration.

Example Request and Response

Request JSON

[
{
    "policy": "string",
    "type": "white",
    "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [1,2]
                
        }
    ]
},
{
    "policy": "string",
    "type": "Black",
    "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [5]
        }
    ]
}
] 

Response JSON

{
"id": "d8fc22ff-3024-4937-bf18-cfbca8010e34",
"config": [
    {
        "policy": "string",
        "type": "white/ Black list",
        "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [1,2]
                
        }
    },
    {
        "policy": "string",
        "type": "white/ Black list",
        "rules": [
        {
            "condition": "0.0.0.0/0",
            "exception": [ "150","151"],                    
            "categories": [5]
        }
    ]
    }
]
}

DELETE category match

Verb      URI                            Description
DELETE   /ffproxy/category/:id           Delete existing ffproxy category match configuration by ID.

Example Request and Response

Request Headers

DELETE /ffproxy/category/d8fc22ff-3024-4937-bf18-cfbca8010e34

Response Header

Status Code : 204

Create ffproxy category user

Verb	URI	              Description
POST	/ffproxy/user   Create ffproxy category user configuration.

On success it returns JSON data with the UUID for the ffproxy category match created configuration.

Example Request and Response

Request JSON

{
"policy-name": "test user",
"user-address": [
    "0.0.0.0/0",
    "10.1.10.158"
],
"whitelist": [
    {
        "url": "www.test1.com",
        "exception": "151"
    }
],
"blacklist": [
    {
        "url": "www.test2.com",
        "exception": "152"
    }
],
"user-category": [
    {
        "cat-id": 41,
        "name": "test cat",
        "description": "testing",
        "domain": [
            "test1",
            "test2"
        ],
        "url": [
            "urltest1",
            "urltest2"
        ]
    }
]
}

Response JSON

    {
   "id": "488ef428-a495-4eac-817f-37d0f2bac363",
   {
   "config":
       "policy-name": "test user",
       "user-address":
       [
           "0.0.0.0/0",
           "10.1.10.158"
       ],
       "whitelist":
       [
           {
               "url": "www.test1.com",
               "exception": "151"
           }
       ],
       "blacklist":
       [
           {
               "url": "www.test2.com",
               "exception": "152"
           }
       ],
       "user-category":
       [
           {
               "cat-id": 41,
               "name": "test cat",
               "description": "testing",
               "domain":
               [
                   "test1",
                   "test2"
               ],
               "url":
               [
                   "urltest1",
                   "urltest2"
               ]
           }
       ]
   }
}

List ffproxy category user

Verb	URI	            Description
GET	       /ffproxy/user 	  List summary of ffproxy category user configuration.

Example Request and Response

Response

[
   {
       "id": "488ef428-a495-4eac-817f-37d0f2bac363",
       "config":
       {
           "policy-name": "test",
           "user-address":
           [
               "0.0.0.0/0",
               "10.1.10.158"
           ],
           "whitelist":
           [
               {
                   "url": "www.test1.com",
                   "exception": "151"
               }
           ],
           "blacklist":
           [
               {
                   "url": "www.test2.com",
                   "exception": "152"
               }
           ],
           "user-category":
           [
               {
                   "cat-id": 41,
                   "name": "test cat",
                   "description": "testing",
                   "domain":
                   [
                       "test1",
                       "test2"
                   ],
                   "url":
                   [
                       "urltest1",
                       "urltest2"
                   ]
               }
           ]
       }
   }
]

List ffproxy category user by ID

Verb	URI	                Description
GET	       /ffproxy/user/:id	List summary of ffproxy category user configured by ID.

Example Request and Response

Response

    {
   "id": "488ef428-a495-4eac-817f-37d0f2bac363",
   "config":
   {
       "policy-name": "test",
       "user-address":
       [
           "0.0.0.0/0",
           "10.1.10.158"
       ],
       "whitelist":
       [
           {
               "url": "www.test1.com",
               "exception": "151"
           }
       ],
       "blacklist":
       [
           {
               "url": "www.test2.com",
               "exception": "152"
           }
       ],
       "user-category":
       [
           {
               "cat-id": 41,
               "name": "test cat",
               "description": "testing",
               "domain":
               [
                   "test1",
                   "test2"
               ],
               "url":
               [
                   "urltest1",
                   "urltest2"
               ]
           }
       ]
   }
}

Update ffproxy category user

Verb	URI	              Description
PUT	      /ffproxy/user/:id   update ffproxy category user configuration by ID.

On success it returns JSON data with the UUID for the ffproxy category match created configuration.

Example Request and Response

Request JSON

{
"policy-name": "test update user",
"user-address": [
    "0.0.0.0/0",
    "10.1.10.158"
],
"whitelist": [
    {
        "url": "www.test1.com",
        "exception": "152"
    }
],
"blacklist": [
    {
        "url": "www.test2.com",
        "exception": "153"
    }
],
"user-category": [
    {
        "cat-id": 41,
        "name": "cat test",
        "description": "testing",
        "domain": [
            "test1",
            "test2"
        ],
        "url": [
            "urltest1",
            "urltest2"
        ]
    }
]
}

Response JSON

{

"id": "488ef428-a495-4eac-817f-37d0f2bac363",
"config": {
    "policy-name": "test update user",
    "user-address": [
        "0.0.0.0/0",
        "10.1.10.158"
    ],
    "whitelist": [
        {
            "url": "www.test1.com",
            "exception": "152"
        }
    ],
    "blacklist": [
        {
            "url": "www.test2.com",
            "exception": "153"
        }
    ],
    "user-category": [
        {
            "cat-id": 41,
            "name": "cat test",
            "description": "testing",
            "domain": [
                "test1",
                "test2"
            ],
            "url": [
                "urltest1",
                "urltest2"
            ]
        }
    ]
}
}

DELETE category user

Verb      URI                          Description
DELETE   /ffproxy/user/:id            Delete existing ffproxy category user configuration by ID.

Example Request and Response

Request Headers

DELETE category/user/488ef428-a495-4eac-817f-37d0f2bac363

Response Header

Status Code : 204

Create ffproxy url match config

Verb	URI	          Description
POST	/ffproxy/url   Create ffproxy url match configuration.

On success it returns JSON data with the UUID for the ffproxy url match created configuration.

Example Request and Response

Request JSON

{
  "file-type": [".avi",".asf"]
}

Response JSON

    {
   "id": "19faaf78-47a6-4abb-814b-f3c043d598de",
   "config":
   {
       "file-type":
       [
           ".avi",
           ".asf"
       ]
   }
}

List ffproxy url match

Verb	URI	        Description
GET	     /ffproxy/url	        List summary of ffproxy url match configured.

Example Request and Response

Response [ { "id": "19faaf78-47a6-4abb-814b-f3c043d598de", "config": { "file-type": ".avi", ".asf" } } ]

List ffproxy url match by ID

Verb	URI	           Description
GET	    /ffproxy/url/:id	   List summary of ffproxy url match configured by ID.

Example Request and Response

Response

   {
   "id": "19faaf78-47a6-4abb-814b-f3c043d598de",
   "config":
   {
       "file-type":
       [
           ".avi",
           ".asf"
       ]
   }
}


  

Update ffproxy url match config

Verb	URI	              Description
PUT 	/ffproxy/url/:id        update ffproxy url match configuration by ID.

On success it returns JSON data with the UUID for the ffproxy url match created configuration.

Example Request and Response

Request JSON

{
   "file-type": [".mov",".asf"]
}
  

Response JSON

{

"id": "19faaf78-47a6-4abb-814b-f3c043d598de",
"config": {
    "file-type": [
        ".mov",
        ".asf"
    ]
}
}

DELETE url match

Verb     URI                        Description
DELETE   /ffproxy/url/:id             Delete existing ffproxy url match configuration by ID.

Example Request and Response

Request Headers

DELETE url/match/d8fc22ff-3024-4937-bf18-cfbca8010e34

Response Header

Status Code : 204

Create ffproxy category map config

Verb	URI	          Description
POST	/ffproxy/map   Create ffproxy category map configuration.

On success it returns JSON data with the UUID for the ffproxy category map created configuration.

Example Request and Response

Request JSON

{
"category-name" : "test cat",
"description" : "testing",
"domain" : "test",
"url" : "www.google.com"
}

Response JSON

{
  "id": "2684b26d-1d89-4c9c-94f1-32aba1fc2dff",
  "config": {
    "category-name": "test cat",
    "description": "testing",
    "domain": "test",
    "url": "www.google.com"
  }
}

List ffproxy category map

Verb	URI	           Description
GET	     /ffproxy/map	   List summary of ffproxy category map configuration.

Example Request and Response

Response

[
   {
       "id": "2684b26d-1d89-4c9c-94f1-32aba1fc2dff",
       "config":
       {
           "category-name": "test cat",
           "description": "testing",
           "domain": "test",
           "url": "www.google.com"
       }
   }
]

List ffproxy category map by ID

Verb	URI	            Description
GET	    /ffproxy/map/:id	    List summary of ffproxy category map configuration by ID.

Example Request and Response

Response

{
   "id": "2684b26d-1d89-4c9c-94f1-32aba1fc2dff",
   "config":
   {
       "category-name": "test cat",
       "description": "testing",
       "domain": "test",
       "url": "www.google.com"
   }
}

DELETE category map

Verb    URI                          Description
DELETE   /ffproxy/map/:id           Delete existing ffproxy category map  configuration by ID.

Example Request and Response

Request Headers

DELETE /category/map/2684b26d-1d89-4c9c-94f1-32aba1fc2dff

Response Header

Status Code : 204