Update component.
ROLES: COMPONENT_WRITE,COMPONENT_ADMIN USER: true SERVICE ACCOUNT: true
curl --request PUT \
--url https://api.revoengine.com/api/v1/component/{componentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '{
"version": 123
}'const options = {
method: 'PUT',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version: 123})
};
fetch('https://api.revoengine.com/api/v1/component/{componentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/component/{componentId}"
payload = { "version": 123 }
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Headers
Path Parameters
Body
Current component version for optimistic concurrency; fetch the component before updating and send the version returned by the API.
Display name. For CODE_JS_LIB and CODE_TS_LIB, it must be a JavaScript identifier (letters/underscore first, then letters/digits/underscore). An active, non-deleted library cannot be renamed to the name of another active, non-deleted library of either library type; inactive libraries may share a name.
1 - 60Replacement category. Pass null to clear it.
32Replacement description. Pass null to clear it.
Replacement component metadata object. Values may use any JSON type. Maximum 16 KiB and 64 top-level keys. Top-level keys starting with "__" are reserved for backend use.
Response
OK.
curl --request PUT \
--url https://api.revoengine.com/api/v1/component/{componentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '{
"version": 123
}'const options = {
method: 'PUT',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({version: 123})
};
fetch('https://api.revoengine.com/api/v1/component/{componentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/component/{componentId}"
payload = { "version": 123 }
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
