Update Credentials

With this method, you change the credentials needed for accessing data provided by the SAP IoT services for SAP BTP for the Cloud Foundry Environment layer

You use this method to change the credentials needed to access the sensor data provided by the SAP IoT services for SAP BTP for the Cloud Foundry Environment layer. This is useful to adapt the service to a changed situation with regards to the credentials in effect. For example, a company-wide security policy may require that the credentials must be changed after a fixed period of time to protect the system against unauthorized access. Such changes in the underlying layer must then be reflected by calling this method.

Request

URI: /v1/credentials

HTTP Method: PUT

Permissions: none.

Request Headers

Header Required Values
Authorization Yes JWT (JSON Web Token)
If-Match Yes Check if cached version matches server version of the credentials

Request Parameters

Parameter Required Data Type Description Parameter Type
user Yes string User ID for logging on to the SAP IoT services for SAP BTP layer. Request body
password Yes string Password for logging on to the SAP IoT services for SAP BTP layer. Request body
host Yes string Landscape-specific ID string of the SAP IoT services for SAP BTP service instance to connect to. Request body
instanceId No string Instance ID for accessing SAP IoT services for SAP BTP service version 4.28.0 or above Request body
iotTenantId No string Tenant for accessing SAP IoT services for SAP BTP service version 4.28.0 or above, to support tenant-specific enhancements Request body

Request Example

/v1/credentials
{
	"user": "root",
	"password": "pass2",
	"host": "kafkatest-sandbox.canary.cp.iot.sap",
	"instanceId": "kafkatest-sandbox",
	"iotTenantId": "1450145528"
}

Payload

For POST, PUT, and GET, only media type JSON is supported. The JSON for these methods has the following structure:

{ 
    "user"        : { "type": "string", "maxLength": 256, "required": "true" },
    "password"    : { "type": "string", "maxLength": 256, "required": "true" },
    "host"        : { "type": "string", "maxLength": 128, "required": "true" },
    "instanceId"  : { "type": "string", "maxLength": 55, "required": "false" },
    "iotTenantId" : { "type": "string", "maxLength": 55, "required": "false" }
}

Response

Response Headers

Header Description
ETag Entity tag of the updated credentials

Response Status and Error Codes

Code Description
200 Credentials updated successfully