The test operation can only be performed on an succeeded
oauth2
Secret. The test operation performs an exchange and includes the authorization service response in the test_exchange
attribute from the meta
object.
This operation does not update the secret.
PATCH /secrets/:id
curl https://reactor.adobe.io/secrets/:id \
-H "Accept: application/vnd.api+json;revision=1" \
-H "Content-Type: application/vnd.api+json" \
-H "Authorization: Bearer [TOKEN]" \
-H "X-Api-Key: [KEY]" \
-H "X-Gw-Ims-Org-Id: [ORG_ID]" \
-X PATCH \
-d \
'
{
"data": {
"attributes": {
"type_of": "oauth2"
},
"meta": {
"action": "test"
},
"id": "SE6c15a7a64f9041b5985558ed3e19a449",
"type": "secrets"
}
}'
{
"data": {
"id": "SE39fdf431f8ad4600bbc24ea73fcb1154",
"type": "secrets",
"attributes": {
"activated_at": null,
"created_at": "2021-07-14T19:33:25.628Z",
"credentials": {
"authorization_url": "https://athorization_url.test/token/authorize?required_param=value"
"client_id": "test_client_id",
"client_secret": "test_client_secret",
"refresh_offset": 14400,
}
"expires_at": null,
"name": "Example Secret",
"refresh_at": null,
"status": "pending",
"type_of": "oauth2",
"updated_at": "2021-07-14T19:33:25.628Z",
},
"relationships": {
"property": {
"links": {
"related": "https://reactor.adobe.io/secrets/SE39fdf431f8ad4600bbc24ea73fcb1154/property"
},
"data": {
"id": "PR9eff664dc6014217b76939bb78b83976",
"type": "properties"
}
},
"environment": {
"links": {
"related": "https://reactor.adobe.io/secrets/SE39fdf431f8ad4600bbc24ea73fcb1154/environment"
},
"data": {
"id": "EN04cdddbdb6574170bcac9f470f3b8087",
"type": "environments"
},
"meta": {
"stage": "development"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/secrets/SE39fdf431f8ad4600bbc24ea73fcb1154/notes"
}
}
},
"links": {
"self": "https://reactor.adobe.io/secrets/SE39fdf431f8ad4600bbc24ea73fcb1154",
"property": "https://reactor.adobe.io/secrets/SE39fdf431f8ad4600bbc24ea73fcb1154/property"
},
"meta": {
"test_exchange": {
"access_token": "FpIkBn3zxW0fH6EBC4MB",
"expires_in": 36000,
"token_type": "Bearer",
}
}
}
}