Upsert Product
curl --request POST \
--url https://api.tensormesh.ai/v1/admin/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": true,
"spec": {}
}
}
'import requests
url = "https://api.tensormesh.ai/v1/admin/products"
payload = { "product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": True,
"spec": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product: {
id: '<string>',
name: '<string>',
requiredGpuNum: 123,
family: '<string>',
isActive: true,
spec: {}
}
})
};
fetch('https://api.tensormesh.ai/v1/admin/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": true,
"spec": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Admin - Products
Upsert Product
POST
https://api.tensormesh.ai
/
v1
/
admin
/
products
Upsert Product
curl --request POST \
--url https://api.tensormesh.ai/v1/admin/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": true,
"spec": {}
}
}
'import requests
url = "https://api.tensormesh.ai/v1/admin/products"
payload = { "product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": True,
"spec": {}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
product: {
id: '<string>',
name: '<string>',
requiredGpuNum: 123,
family: '<string>',
isActive: true,
spec: {}
}
})
};
fetch('https://api.tensormesh.ai/v1/admin/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"product": {
"id": "<string>",
"name": "<string>",
"requiredGpuNum": 123,
"family": "<string>",
"isActive": true,
"spec": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Was this page helpful?
⌘I

