Can we apply DULE labels to attributes in Schema via API ? | Adobe Higher Education
Skip to main content
Indra-2
Community Advisor
Community Advisor
October 21, 2024
解決済み

Can we apply DULE labels to attributes in Schema via API ?

  • October 21, 2024
  • 3 の返信
  • 934 ビュー

Hi Everyone,

 

I’m exploring whether it’s possible to apply DULE labels to attributes in a schema via API.

 

I know we can Create/Update/Delete labels using the Policy Service APIs, but is there an option to apply these labels when creating/updating a schema via API?

 

Any guidance would be appreciated!

 

Thanks!

このトピックへの返信は締め切られました。
ベストアンサー Tof_Jossic

@indra-2 wait for others to chime in but from these 2 documents below, it looks like the APIs only allow you to add data usage labels to datasets:

https://experienceleague.adobe.com/en/docs/experience-platform/data-governance/api/labels

https://experienceleague.adobe.com/en/docs/experience-platform/data-governance/labels/dataset-api#apply 

3 の返信

Tof_Jossic
Adobe Employee
Adobe Employee
October 21, 2024

@indra-2 wait for others to chime in but from these 2 documents below, it looks like the APIs only allow you to add data usage labels to datasets:

https://experienceleague.adobe.com/en/docs/experience-platform/data-governance/api/labels

https://experienceleague.adobe.com/en/docs/experience-platform/data-governance/labels/dataset-api#apply 

AtulChavan
Community Advisor
Community Advisor
October 21, 2024

Hi @indra-2 .
All I tried is simply to lookup a fieldgroup that has a field to which label is applied via fieldgroup lookup api and no where it reflects/denotes in property that field has any label associated. Schema lookup also didn't help as it just specifies fieldgroup ids your schema is created with. I think label framework doesn't tie labels to schema as their metadata.

So, to my knowledge I don't see any way while creating or performing any patch request you can assign/alter labels via API to schema. 

E.g:
"properties": {
    "OS": {
    "required": [],
    "type": "string",
    "title": "OS",
    "meta:xdmType": "string"

    "label" : "C11"  // I dont see any such property exists else this would have been a way for you.
    }
}

Level 2
October 28, 2024

@indra-2, you can use schema registry API.

 

Example: 

POST https://platform.adobe.io/data/foundation/schemaregistry/tenant/descriptors

Body: 

{
"@type": "xdm:descriptorLabel",
"xdm:sourceSchema": "{{schemaID}}",
"xdm:sourceVersion": 1,
"xdm:sourceProperty": "/pathOfField/FromSchema/WhereYouWantToApplyLabel",
"xdm:labels": [
"core/I2",
"core/S2"
]
}