VMware Cloud Director API - POST-CreateApiFilter

VMware Cloud Director API - POST-CreateApiFilter

POST /admin/extension/service/{id}/apifilters

Operation:
POST /admin/extension/service/{id}/apifilters
Description:
Creates API filter.
Since:
5.1
Input parameters
The data needed to create {@link ApiFilterType}

Consume media type(s):
application/vnd.vmware.admin.apiFilter+xml
application/vnd.vmware.admin.apiFilter+json
Input type:
ApiFilterType
Output parameters
{@link ApiFilterType}

Produce media type(s):
application/vnd.vmware.admin.apiFilter+xml
application/vnd.vmware.admin.apiFilter+json
Output type:
ApiFilterType
Examples
Request
HTTP 1.1
POST /api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2/apifilters

Headers:
Content-Length: 193
Content-Type: application/vnd.vmware.admin.apiFilter+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=

Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ApiFilter
    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
    id="Id">
    <vmext:UrlPattern>.*//sth//</vmext:UrlPattern>
</vmext:ApiFilter>
Response
HTTP/1.1 201 Created

Headers:
Content-Length: 1050
Content-Type: application/vnd.vmware.admin.apifilter+xml;version=5.5
Location: https://vcloud.example.com/api/admin/extension/service/apifilter/125bb43d-97ad-4f84-9832-f914ebae4c39
Vary: Accept-Encoding

Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ApiFilter
    xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
    xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    href="https://vcloud.example.com/api/admin/extension/service/apifilter/125bb43d-97ad-4f84-9832-f914ebae4c39"
    id="urn:vcloud:apiFilter:125bb43d-97ad-4f84-9832-f914ebae4c39"
    type="application/vnd.vmware.admin.apiFilter+xml"
    xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/extension/service/apifilter/125bb43d-97ad-4f84-9832-f914ebae4c39"
        rel="remove"/>
    <vcloud:Link
        href="https://vcloud.example.com/api/admin/extension/service/15eacf4c-b4d0-4dba-9c65-7977a9a10ba2"
        name="NewExtensionService"
        rel="up"
        type="application/vnd.vmware.admin.service+xml"/>
    <vmext:UrlPattern>.*//sth//</vmext:UrlPattern>
</vmext:ApiFilter>