- Home
- API Enriched
- Authentication
- web
- Replace service credentials.
Replace service credentials.
const url = 'https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/namespaces/example/service_credentials/example';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"name":"example","namespace":"example","namespace_access":{"namespace_role_map":{}},"user_group_names":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example-corp.console.ves.volterra.io/api/v1/api/production/us-east-1/namespaces/default/api/web/namespaces/example/service_credentials/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "namespace": "example", "namespace_access": { "namespace_role_map": {} }, "user_group_names": [ "example" ] }'Request to replace user_groups and roles in service credentials. Note - for updating expiry use RenewServiceCredentials and to active/inactive service credential use ActivateServiceCredentials API.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Namespace Namespace of the service credential user. Value of namespace is always “system”.
Service Credential name
x-required Name of service credential object.
Request Bodyrequired
Section titled “Request Bodyrequired”Request format for replacing service credentials.
object
Name of service credential object. Required: YES.
Namespace of the service credential user. Value of namespace is always “system”.
object
List of all the roles for the entity in the namespaces Required: YES.
object
List of user_groups to be replaced for this service credentials.
Examplegenerated
{ "name": "example", "namespace": "example", "namespace_access": { "namespace_role_map": {} }, "user_group_names": [ "example" ]}Responses
Section titled “Responses”A successful response.
Response format for the credential’s replace request.
object
Specifies if service credential is active or not.
Specifies the expiration timestamp.
Name of API credential record.
Examplegenerated
{ "active": true, "expiration_timestamp": "2026-04-15T12:00:00Z", "name": "example"}Returned when operation is not authorized.
Examplegenerated
exampleReturned when there is no permission to access resource.
Examplegenerated
exampleReturned when resource is not found.
Examplegenerated
exampleReturned when operation on resource is conflicting with current value.
Examplegenerated
exampleReturned when operation has been rejected as it is happening too frequently.
Examplegenerated
exampleReturned when server encountered an error in processing API.
Examplegenerated
exampleReturned when service is unavailable temporarily.
Examplegenerated
exampleReturned when server timed out processing request.
Examplegenerated
example