Update SSO Redirect Template

POST/zstack/v1/update/sso/redirectTemplate

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "uuid": "35cc6909f0f23e55a209cd552d8bc938",
    "redirectTemplate": "http://zstack.com/userinfoUrl"
  },
  "systemTags": [],
  "userTags": []
}

In the preceding example, the systemTags and userTags fields are optional. They are listed here to show that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X POST -d '{"params":{"uuid":"35cc6909f0f23e55a209cd552d8bc938","redirectTemplate":"http://zstack.com/userinfoUrl"}}' \
http://localhost:8080/zstack/v1/update/sso/redirectTemplate

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
uuidStringbody (enclosed in the params structure)Template UUID. Uniquely identifies the resource. 4.3.0
redirectTemplateStringbody (enclosed in the params structure)Redirect template 4.3.0
systemTags (Optional)ListbodySystem tags 4.3.0
userTags (Optional)ListbodyUser tags 4.3.0

API Response

Response Example

{
  "inventory": {
    "uuid": "43679041066d37b28f676a49851ade69",
    "clientUuid": "3e5541e27b9c320fa4ad0a86777cc5ab",
    "redirectTemplate": "http://zstack.com/code"
  }
}
NameTypeDescriptionStarting Version
successbooleanWhether the update is successful4.3.0
inventorySSORedirectTemplateInventoryFor details, see inventory4.3.0
errorErrorCodeError code. If not null, the operation has failed. This field is null when the operation succeeds. For details, see error4.3.0

inventory

NameTypeDescriptionStarting Version
uuidStringTemplate UUID. Uniquely identifies the resource.4.3.0
nameStringTemplate name4.3.0
descriptionStringDetailed description of the template4.3.0
clientUuidStringUUID of the corresponding SSO client, which is the UUID of the third-party account source4.3.0
redirectTemplateStringRedirect template4.3.0
createDateTimestampCreation time4.3.0
lastOpDateTimestampLast modification time4.3.0

error

NameTypeDescriptionStarting Version
codeStringError code number. The globally unique identifier of the error, for example, SYS.1000 or HOST.1001.0.6
descriptionStringBrief description of the error0.6
detailsStringDetailed information about the error0.6
elaborationStringReserved field. Default is null.0.6
opaqueLinkedHashMapReserved field. Default is null.0.6
causeErrorCodeRoot error. The source error that caused the current error. This field is null if no root error exists.0.6

SDK Examples

Java SDK

UpdateSSORedirectTemplateAction action = new UpdateSSORedirectTemplateAction();
action.uuid = "35cc6909f0f23e55a209cd552d8bc938";
action.redirectTemplate = "http://zstack.com/userinfoUrl";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSSORedirectTemplateAction.Result res = action.call();

Python SDK

UpdateSSORedirectTemplateAction action = UpdateSSORedirectTemplateAction()
action.uuid = "35cc6909f0f23e55a209cd552d8bc938"
action.redirectTemplate = "http://zstack.com/userinfoUrl"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSSORedirectTemplateAction.Result res = action.call()