Expand my Community achievements bar.

SOLVED

Unable to update custom schema using API

Avatar

Level 3
Request: 
 
[{
"op": "add",
"path": "/allOf/-",
"value": {
}
},
{
"op": "add",
"path": "/allOf/-",
"value": {
}
}
]
 
Respose:
 
{
"title": "Resource not found",
"status": 404,
"report": {
"registryRequestId": "fb25cbe5-cead-4fa9-8ec7-44a140e4e451",
"timestamp": "07-09-2024 03:08:20",
"detailed-message": "The requested schemas resource {{SCHEMA_ID}} with version 1.50.1 is not found."
},
"detail": "The requested schemas resource {{SCHEMA_ID}} with version 1.50.1 is not found."
}
1 Accepted Solution

Avatar

Correct answer by
Level 5

@Indra it seems as if you are trying to use the {{schema_id}} as a variable. You need to remove it from the headers section and only have it defined within the params. If using as a variable, see the documentation here:
Store and reuse values using variables | Postman Learning Center

 

You can also try to manually add the schema id in the params with the actual value just to see if that works, prior to adding the variable.

View solution in original post

6 Replies

Avatar

Level 5

Hi @Indra 

Are you inputting the Schema ID itself into the parameters of the PATCH request? The error message is referencing {{schema_id}} and not the specific Schema ID that you provided above. Could you provide some more context? Thanks!

 

https://developer.adobe.com/experience-platform-apis/references/schema-registry/#operation/patchSche...

 

David

Avatar

Level 5

Hi @Indra 

Ok so that is the problem. You need to add the schema ID into the parameters, and not the headers. Let me know if that works.

David

Avatar

Correct answer by
Level 5

@Indra it seems as if you are trying to use the {{schema_id}} as a variable. You need to remove it from the headers section and only have it defined within the params. If using as a variable, see the documentation here:
Store and reuse values using variables | Postman Learning Center

 

You can also try to manually add the schema id in the params with the actual value just to see if that works, prior to adding the variable.

Avatar

Level 3

Removed in Header and added in params 

SCHEMA ID :_adobequaptrsd.schemas.7567f6029e5ee4a77faf20dea2718677d7448af37a7XXXXXX

Successfully updated.

Request:

[{
"op": "add",
"path": "/allOf/-",
"value": {
}
},
{
"op": "add",
"path": "/allOf/-",
"value": {
}
}
]
 
Response:
{
"meta:altId": "_adobequaptrsd.schemas.7567f6029e5ee4a77faf20dea2718677d7448af3XXXXX",
"meta:resourceType": "schemas",
"version": "1.1",
"title": "Indra Luma CRM Schema Indra",
"type": "object",
"description": "Schema for CRM data of Luma Retail ",
"allOf": [
{
"type": "object",
"meta:xdmType": "object"
},
{
"type": "object",
"meta:xdmType": "object"
},
{
"type": "object",
"meta:xdmType": "object"
}
],
"refs": [
],
"imsOrg": "0XXXXXXXC40A495CD7@AdobeOrg",
"additionalInfo": {
"numberOfIdentities": 0,
"numberOfRelationShips": 0,
"classTitle": "XDM Individual Profile",
"behavior": "Record",
"hasRelationShip": false,
"profileEnabled": false
},
"meta:extensible": false,
"meta:abstract": false,
"meta:extends": [
],
"meta:xdmType": "object",
"meta:registryMetadata": {
"repo:createdDate": 1720495111007,
"repo:lastModifiedDate": 1720573766960,
"xdm:createdClientId": "ccfff59b397c4a40a86caa9158a47cca",
"xdm:lastModifiedClientId": "ccfff59b397cXXXXXXXXX",
"xdm:createdUserId": "4FFF1E40664AA86F0A495FC8@techacct.adobe.com",
"xdm:lastModifiedUserId": "4FFF1E40664AA86F0A495FC8@techacct.adobe.com",
"eTag": "057df4d51fe35671b750d21f2620d7c930d2240b349226392e6d7a63923b25b1",
"meta:globalLibVersion": "1.50.1"
},
"meta:containerId": "17429b70-10d5-41bb-829b-7010d5e1bbe0",
"meta:sandboxId": "17429b70-10d5-41bb-829b-7010d5e1bbe0",
"meta:sandboxType": "development",
"meta:tenantNamespace": "_adobequXXXX",
"meta:descriptorStatus": {
"result": []
}
}