Point d’entrée des composants de règle
Dans les balises de collecte de données, les règles contrôlent le comportement des ressources dans une bibliothèque déployée. Les Composants de règle sont les éléments individuels qui constituent une règle. Si l’on compare une règle à une recette, un composant de règle correspond alors à l’un des ingrédients. Le point d’entrée /rule_components
de l’API Reactor vous permet de gérer les composants de règle par programme.
Les composants de règle possèdent trois types de base :
Un composant de règle appartient à une règle exactement. Une règle peut (et doit) contenir de nombreux composants de règle.
Un composant de règle est fourni par une extension exactement. Les extensions peuvent fournir de nombreux types de composants de règle.
Prise en main
Le point d’entrée utilisé dans ce guide fait partie de lʼAPI Reactor. Avant de poursuivre, consultez le guide de prise en main pour obtenir des informations importantes sur la façon de s’authentifier auprès de l’API.
Récupération d’une liste de composants de règle list
Vous pouvez récupérer une liste de composants de règle appartenant à une règle en incluant l’identifiant de la règle dans le chemin d’accès d’une requête GET.
Format d’API
GET /rules/{RULE_ID}/rule_components
RULE_ID
id
de la règle dont vous souhaitez répertorier les composants.created_at
dirty
enabled
name
negate
origin_id
published
published_at
revision_number
updated_at
Requête
curl -X GET \
https://reactor.adobe.io/rules/RL14dc6a8c37b14b619ddb2b3ba489a1f51/rule_components \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
Réponse
Une réponse réussie renvoie une liste de composants de règle pour la règle spécifiée.
{
"data": [
{
"id": "RC45944086902c4828b6e14ffbb40017f4",
"type": "rule_components",
"attributes": {
"created_at": "2020-12-14T17:54:34.976Z",
"delegate_descriptor_id": "kessel-test::events::click",
"deleted_at": null,
"dirty": true,
"name": "My Example Click Event",
"negate": false,
"order": 0,
"rule_order": 50.0,
"timeout": 2000,
"delay_next": true,
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:54:34.976Z",
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
},
"relationships": {
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"updated_with_extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/updated_with_extension"
},
"data": {
"id": "EX6312cea676de47ad9f70b42f7c0fbf02",
"type": "extensions"
}
},
"extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/extension"
},
"data": {
"id": "EXbfd099788024423ebdd49cf06b52e50a",
"type": "extensions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/notes"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/origin"
},
"data": {
"id": "RC45944086902c4828b6e14ffbb40017f4",
"type": "rule_components"
}
},
"rule component": {
"links": {
"related": "https://reactor.adobe.io/properties/PRb1090b7443e948ac91650964b490e622"
},
"data": {
"id": "PRb1090b7443e948ac91650964b490e622",
"type": "properties"
}
},
"rules": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/rules"
}
}
},
"links": {
"extension": "https://reactor.adobe.io/extensions/EXbfd099788024423ebdd49cf06b52e50a",
"origin": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4",
"rules": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4/rules",
"self": "https://reactor.adobe.io/rule_components/RC45944086902c4828b6e14ffbb40017f4"
},
"meta": {
"latest_revision_number": 0
}
}
],
"meta": {
"pagination": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 1
}
}
}
Recherche d’un composant de règle lookup
Vous pouvez rechercher un composant de règle en fournissant son identifiant dans le chemin d’accès d’une requête GET.
Format d’API
GET /rule_components/{RULE_COMPONENT_ID}
RULE_COMPONENT_ID
id
du composant de règle que vous souhaitez rechercher.Requête
curl -X GET \
https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
Réponse
Une réponse réussie renvoie les détails du composant de règle.
{
"data": {
"id": "RC7be169fcfd534ffc82acc7bffdc50128",
"type": "rule_components",
"attributes": {
"created_at": "2020-12-14T17:54:18.551Z",
"delegate_descriptor_id": "kessel-test::events::click",
"deleted_at": null,
"dirty": true,
"name": "My Example Click Event",
"negate": false,
"order": 0,
"rule_order": 50.0,
"timeout": 2000,
"delay_next": true,
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:54:18.551Z",
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
},
"relationships": {
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"updated_with_extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/updated_with_extension"
},
"data": {
"id": "EXa11e168f2ff2485197a493095269f964",
"type": "extensions"
}
},
"extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/extension"
},
"data": {
"id": "EXa76eb16dd86849318b743494e75c33a1",
"type": "extensions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/notes"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/origin"
},
"data": {
"id": "RC7be169fcfd534ffc82acc7bffdc50128",
"type": "rule_components"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/properties/PR00a35a74381443dc994e6b30b7152106"
},
"data": {
"id": "PR00a35a74381443dc994e6b30b7152106",
"type": "properties"
}
},
"rules": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/rules"
}
}
},
"links": {
"extension": "https://reactor.adobe.io/extensions/EXa76eb16dd86849318b743494e75c33a1",
"origin": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128",
"rules": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128/rules",
"self": "https://reactor.adobe.io/rule_components/RC7be169fcfd534ffc82acc7bffdc50128"
},
"meta": {
"latest_revision_number": 0
}
}
}
Création d’un composant de règle create
Vous pouvez créer un composant de règle en effectuant une requête POST.
Format d’API
POST /properties/{PROPERTY_ID}/rule_components
PROPERTY_ID
id
de la propriété sous laquelle vous définissez le composant de règle.Requête
La requête suivante crée un composant de règle. Dans la payload, la propriété relationships
associe le composant à une ou plusieurs règles spécifiques et à une extension existante. Pour plus d’informations, consultez le guide sur la relation.
curl -X POST \
https://reactor.adobe.io/properties/PR97596432a82549ceb8e2a5d9df05c0e1/rule_components \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"attributes": {
"delegate_descriptor_id": "kessel-test::events::click",
"name": "My Example Click Event",
"delay_next": true,
"order": 0,
"rule_order": 50.0,
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}",
"timeout": 2000
},
"relationships": {
"extension": {
"data": {
"id": "EX31b8c49f134b4307924d71a64204099e",
"type": "extensions"
}
},
"rules": {
"data": [
{
"id": "RLf7b4f416b2e04ae1ba857ae681fee5bc",
"type": "rules"
}
]
}
},
"type": "rule_components"
}
}'
attributes.delegate_descriptor_id
Pour plus d’informations, consultez le guide sur les ID de descripteur de délégué.
attributes.name
attributes.delay_next
attributes.order
attributes.rule_order
attributes.settings
attributes.timeout
relationships
Objet qui établit les relations nécessaires pour le composant de règle. Deux relations doivent être établies :
extension
: l’extension qui définit ce composant de règle. Il doit s’agir de la même extension que celle du package d’extension indiqué pardelegate_descriptor_id
.rules
: règle sous laquelle ce composant est défini.
Pour plus d’informations générales sur les relations, consultez le guide sur les relations.
type
rule_components
.Réponse
Une réponse réussie renvoie les détails du composant de règle nouvellement créé.
{
"data": {
"id": "RC78c44af3cf7644e5927fc0ad61e88940",
"type": "rule_components",
"attributes": {
"created_at": "2020-12-14T17:54:00.232Z",
"delegate_descriptor_id": "kessel-test::events::click",
"deleted_at": null,
"dirty": true,
"name": "My Example Click Event",
"negate": false,
"order": 0,
"rule_order": 50.0,
"timeout": 2000,
"delay_next": true,
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:54:00.232Z",
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
},
"relationships": {
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"updated_with_extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/updated_with_extension"
},
"data": {
"id": "EX0019a115a74f401fa0b9bb8f57a0196b",
"type": "extensions"
}
},
"extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/extension"
},
"data": {
"id": "EX31b8c49f134b4307924d71a64204099e",
"type": "extensions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/notes"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/origin"
},
"data": {
"id": "RC78c44af3cf7644e5927fc0ad61e88940",
"type": "rule_components"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/properties/PR97596432a82549ceb8e2a5d9df05c0e1"
},
"data": {
"id": "PR97596432a82549ceb8e2a5d9df05c0e1",
"type": "properties"
}
},
"rules": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/rules"
}
}
},
"links": {
"extension": "https://reactor.adobe.io/extensions/EX31b8c49f134b4307924d71a64204099e",
"origin": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940",
"rules": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940/rules",
"self": "https://reactor.adobe.io/rule_components/RC78c44af3cf7644e5927fc0ad61e88940"
},
"meta": {
"latest_revision_number": 0
}
}
}
Mise à jour d’un composant de règle update
Vous pouvez mettre à jour un composant de règle en incluant son identifiant dans le chemin d’accès d’une requête PATCH.
updated_at
de la règle parente.Format d’API
PATCH /rule_components/{RULE_COMPONENT_ID}
RULE_COMPONENT_ID
id
du composant de règle que vous souhaitez mettre à jour.Requête
La requête suivante met à jour les attributs order
et settings
pour un composant de règle existant.
curl -X PATCH \
https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'Content-Type: application/json' \
-d '{
"data": {
"attributes": {
"order": 1,
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":false}"
},
"type": "rule_components",
"id": "RC9af052ee231346f28d1e44865ab62c04"
}
}'
attributes
Objet dont les composants de règle représentent les attributs à mettre à jour pour le composant de règle. Les attributs suivants peuvent être mis à jour pour un composant de règle :
delay_next
delegate_descriptor_id
name
order
rule_order
settings
timeout
id
id
du composant de règle que vous souhaitez mettre à jour. Cela doit correspondre à la valeur {RULE_COMPONENT_ID}
fournie dans le chemin d’accès de la requête.type
rule_components
.Réponse
Une réponse réussie renvoie les détails du composant de règle mis à jour.
{
"data": {
"id": "RC9af052ee231346f28d1e44865ab62c04",
"type": "rule_components",
"attributes": {
"created_at": "2020-12-14T17:54:50.887Z",
"delegate_descriptor_id": "kessel-test::events::click",
"deleted_at": null,
"dirty": true,
"name": "My Example Click Event",
"negate": false,
"order": 1,
"rule_order": 50.0,
"timeout": 2000,
"delay_next": true,
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:54:52.553Z",
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":false}"
},
"relationships": {
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"updated_with_extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/updated_with_extension"
},
"data": {
"id": "EX468796dd09d743858f17d4c5ca52f3e0",
"type": "extensions"
}
},
"extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/extension"
},
"data": {
"id": "EXcedb08a8265c488e8bb98b46245b2486",
"type": "extensions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/notes"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/origin"
},
"data": {
"id": "RC9af052ee231346f28d1e44865ab62c04",
"type": "rule_components"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/properties/PR986402dc07834fbeb4789c56060dbf41"
},
"data": {
"id": "PR986402dc07834fbeb4789c56060dbf41",
"type": "properties"
}
},
"rules": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/rules"
}
}
},
"links": {
"extension": "https://reactor.adobe.io/extensions/EXcedb08a8265c488e8bb98b46245b2486",
"origin": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04",
"rules": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/rules",
"self": "https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04"
},
"meta": {
"latest_revision_number": 0
}
}
}
Suppression dʼun composant de règle
Vous pouvez supprimer un composant de règle en incluant son identifiant dans le chemin dʼaccès dʼune requête DELETE.
Format d’API
DELETE /rule_components/{RULE_COMPONENT_ID}
RULE_COMPONENT_ID
id
du composant de règle que vous souhaitez supprimer.Requête
curl -X DELETE \
https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}'
Réponse
Une réponse réussie renvoie un état HTTP 204 (No Content) sans corps de réponse, indiquant que le composant de règle a été supprimé.
Gestion des notes dʼun composant de règle notes
Les composants de règle sont des ressources « inscriptibles », ce qui signifie que vous pouvez créer et récupérer des notes textuelles sur chaque ressource individuelle. Pour plus dʼinformations sur la gestion des notes pour les composants de règle et dʼautres ressources compatibles, consultez le guide de point du point dʼentrée des notes.
Récupération des ressources associées pour un composant de règle related
Les appels suivants montrent comment récupérer les ressources associées pour un composant de règle. Lorsque vous recherchez un composant de règle, ces relations sont répertoriées sous le composant de règle relationships
.
Pour plus dʼinformations sur les relations dans lʼAPI Reactor, consultez le guide des relations.
Liste des règles associées pour un composant de règle rules
Vous pouvez répertorier les règles utilisant un composant de règle spécifique en ajoutant /rules
au chemin dʼaccès dʼune demande de recherche.
Format d’API
GET /rule_components/{RULE_COMPONENT_ID}/rules
{RULE_COMPONENT_ID}
id
du composant de règle dont vous souhaitez répertorier les règles.Requête
curl -X GET \
https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/rules \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
Réponse
Une réponse réussie renvoie une liste des règles qui utilisent le composant de règle spécifié.
{
"data": [
{
"id": "RLf1baa571748941db88f54de8efd119aa",
"type": "rules",
"attributes": {
"created_at": "2020-12-14T17:58:36.072Z",
"deleted_at": null,
"dirty": true,
"enabled": true,
"name": "Example Rule",
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:58:37.452Z",
"review_status": "unsubmitted"
},
"relationships": {
"libraries": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/libraries"
}
},
"revisions": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/revisions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/notes"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/property"
},
"data": {
"id": "PR966c4a501e1a43a48cb55e104b4de935",
"type": "properties"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/origin"
},
"data": {
"id": "RLf1baa571748941db88f54de8efd119aa",
"type": "rules"
}
},
"rule_components": {
"links": {
"related": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/rule_components"
}
}
},
"links": {
"property": "https://reactor.adobe.io/properties/PR966c4a501e1a43a48cb55e104b4de935",
"origin": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa",
"self": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa",
"rule_components": "https://reactor.adobe.io/rules/RLf1baa571748941db88f54de8efd119aa/rule_components"
},
"meta": {
"latest_revision_number": 0
}
}
]
}
Recherche de lʼextension associée à un composant de règle extension
Vous pouvez rechercher lʼextension qui fournit un composant de règle en ajoutant /extension
au chemin dʼaccès dʼune demande de recherche.
Format d’API
GET /rule_components/{RULE_COMPONENT_ID}/extension
{RULE_COMPONENT_ID}
id
du composant de règle dont vous souhaitez rechercher lʼextension.Requête
curl -X GET \
https://reactor.adobe.io/rule_components/RC9af052ee231346f28d1e44865ab62c04/extension \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
Réponse
Une réponse réussie renvoie les détails de l’extension du composant de règle spécifié.
{
"data": {
"id": "EX5644c3eed97d46b39cb2279ea11dde29",
"type": "extensions",
"attributes": {
"created_at": "2020-12-14T17:55:22.634Z",
"deleted_at": null,
"dirty": false,
"enabled": true,
"name": "kessel-test",
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:55:22.634Z",
"delegate_descriptor_id": null,
"display_name": "Kessel Test",
"review_status": "unsubmitted",
"version": "1.2.0",
"settings": "{}"
},
"relationships": {
"libraries": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/libraries"
}
},
"revisions": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/revisions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/notes"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/property"
},
"data": {
"id": "PRcdb3d12504ce48ecbfa4fbbe5b80b6dd",
"type": "properties"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/origin"
},
"data": {
"id": "EX5644c3eed97d46b39cb2279ea11dde29",
"type": "extensions"
}
},
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"extension_package": {
"links": {
"related": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29/extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
}
},
"links": {
"property": "https://reactor.adobe.io/properties/PRcdb3d12504ce48ecbfa4fbbe5b80b6dd",
"origin": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29",
"self": "https://reactor.adobe.io/extensions/EX5644c3eed97d46b39cb2279ea11dde29",
"extension_package": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a",
"latest_extension_package": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a"
},
"meta": {
"latest_revision_number": 1
}
}
}
Recherche de lʼorigine associée dʼun composant de règle origin
Vous pouvez rechercher lʼorigine (révision précédente) dʼun composant de règle en ajoutant /origin
au chemin dʼaccès dʼune demande de recherche.
Format d’API
GET /rule_components/{RULE_COMPONENT_ID}/origin
{RULE_COMPONENT_ID}
id
du composant de règle dont vous souhaitez rechercher lʼorigine.Requête
curl -X GET \
https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/origin \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H "Content-Type: application/vnd.api+json" \
-H 'Accept: application/vnd.api+json;revision=1'
Réponse
Une réponse réussie renvoie les détails de l’origine du composant de règle spécifié.
{
"data": {
"id": "RC3d0805fde85d42db8988090bc074bb44",
"type": "rule_components",
"attributes": {
"created_at": "2020-12-14T17:55:40.016Z",
"delegate_descriptor_id": "kessel-test::events::click",
"deleted_at": null,
"dirty": false,
"name": "My Example Click Event",
"negate": false,
"order": 0,
"rule_order": 50.0,
"timeout": 2000,
"delay_next": true,
"published": false,
"published_at": null,
"revision_number": 0,
"updated_at": "2020-12-14T17:55:40.016Z",
"settings": "{\"elementSelector\":\".accordion\",\"bubbleFireIfChildFired\":true}"
},
"relationships": {
"updated_with_extension_package": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/updated_with_extension_package"
},
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages"
}
},
"updated_with_extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/updated_with_extension"
},
"data": {
"id": "EXb713fc209ce344c996bdeb377685e2c4",
"type": "extensions"
}
},
"extension": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/extension"
},
"data": {
"id": "EXd6e1dce006b2412f874301e24d58ce24",
"type": "extensions"
}
},
"notes": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/notes"
}
},
"origin": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/origin"
},
"data": {
"id": "RC3d0805fde85d42db8988090bc074bb44",
"type": "rule_components"
}
},
"property": {
"links": {
"related": "https://reactor.adobe.io/properties/PR89c66a560ec44928889b439333255efe"
},
"data": {
"id": "PR89c66a560ec44928889b439333255efe",
"type": "properties"
}
},
"rules": {
"links": {
"related": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/rules"
}
}
},
"links": {
"extension": "https://reactor.adobe.io/extensions/EXd6e1dce006b2412f874301e24d58ce24",
"origin": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44",
"rules": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44/rules",
"self": "https://reactor.adobe.io/rule_components/RC3d0805fde85d42db8988090bc074bb44"
},
"meta": {
"latest_revision_number": 1
}
}
}