Import TrustDocument Name Configurations Method

Use the POST method to import trusted issuer configurations, including issuer names, distinguished name (DN) lists, and token attribute rules.

REST Request

POST /idaas/webservice/admin/v1/trustdocument/import

Request Body

Media Types: application/xml

The request body contains the details of the import request, in XML format. You must create a trusted issuers document, as described in "POST TrustDocument Name Method", and pass it using the oratrust:name element. For example:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<oratrust:TokenIssuerTrust xmlns:oratrust="http://xmlns.oracle.com/wsm/security/trust" oratrust:name="trustdocument">
    <oratrust:Issuers>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="saml.hok">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="saml.sv">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="jwt">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
    </oratrust:Issuers>
    <oratrust:TokenAttributeRules/>
</oratrust:TokenIssuerTrust>

Response Body

Media Types: application/json

The response body returns the status of the import operation, including:

Element Description
"ERROR_CODE" If "STATUS" is set to "Failed", provides the error code.
"ERROR_MSG" If "STATUS" is set to "Failed", provides the contents of the error message.
"Result" Details of the operation results.
"STATUS" Status of operation. For example, "Succeeded" or "Failed".

cURL Example

The following example shows how to view all certificates for an alias by submitting a POST request on the REST resource using cURL.

curl -i -X POST -u username:password --data @import.xml -H Content-Type:application/xml -H Accept:application/json http://myhost:7001/idaas/platform/admin/v1/trustdocument/import

Example of Request Body

The following shows an example of the request body in JSON format.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<oratrust:TokenIssuerTrust xmlns:oratrust="http://xmlns.oracle.com/wsm/security/trust" oratrust:name="test">
    <oratrust:Issuers>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="saml.hok">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="saml.sv">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
        <oratrust:Issuer oratrust:name="www.oracle.com" oratrust:tokentype="jwt">
            <oratrust:TrustedKeys/>
        </oratrust:Issuer>
    </oratrust:Issuers>
    <oratrust:TokenAttributeRules/>
</oratrust:TokenIssuerTrust>