You can view and manage the proxy configuration for a token attribute rules using the Token Attribute Rule REST API.
 
  
  
   The cURL command examples use the URL structure:
   
http(s)://host:port/wsm-pmrest/v2/trust/{trustname}/attributerule/proxy
    
   
  
  
  The following use case shows you how to:
 
   
   -  
Create the proxy
   
   -  
Modify the proxy
   
   -  
View the proxy
   
   -  
Delete the proxy
   
  
 
  To manage the proxy configuration using the Token Attribute Rules Rest API:
 
   
  
  
  - Specify the headers on the cURL command line:
   
 
    -H Accept:application/json
 
       
  - Set the proxy for the issuer 
www.example.com in the trusted issuer document myTrustDocument by running the following command:
    
    curl -i -X POST -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy 
    Example
 
    curl -i -X POST -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
 
    See Create the Proxy. 
 
    The following shows an example of the request body.
 
    {
  "proxyhost": "www.proxy.com",
  "proxyport": "1234"
}
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20171",
  "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully created."
}
 
       
  - Update the port number to 
80 for the issuer www.abccompany.com by running the following command:
    
    curl -i -X PATCH -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy 
    Example
 
    curl -i -X PATCH -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
 
    See Update the Proxy. 
 
    The following shows an example of the request body.
 
    {
  "proxyport": "80"
}
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20172",
  "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully updated."
}
 
       
  - View proxy configuration details for the issuer 
www.abccompany.com in the repository by running the following command:
    
    curl -i -X GET -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy 
    Example
 
    curl -i -X GET -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
 
    See Get the Proxy. 
 
    The following shows an example of the response body:
 
    {
  "proxyhost": "www.proxy.com",
  "proxyport": "80"
}
 
       
  - Remove the proxy for the issuer 
example.com by running the following command:
    
    curl -i -X DELETE -u username:password -H Content-type:application/json http://host:port/wsm-pmrest/v2/trust/{trustdocumentName}/attributerule/{IssuerName}/{Identifier}/proxy 
    Example
 
    curl -i -X DELETE -u Smith:Password -H Content-type:application/json http://myhost:7001/wsm-pmrest/v2/trust/myTrustDocument/attributerule/www.abccompany.com/myidentifier1/proxy
 
    See Delete the Proxy. 
 
    The following shows an example of the response indicating the request succeeded.
 
    {
  "STATUSCODE": "20174",
  "MESSAGE": "Proxy for TokenAttributeRule for issuer \"www.abccompany.com\" and KeyIdentifier \"myidentifier1\" is successfully deleted."
}