L’implementazione dell’endpoint /extension_packages
è in continua evoluzione, di pari passo con l’aggiunta, la rimozione e la rielaborazione delle varie funzioni.
Un pacchetto di estensione rappresenta un’estensione creata da uno sviluppatore di estensioni. Un pacchetto di estensione definisce funzionalità aggiuntive che possono essere rese disponibili agli utenti di tag. Nella maggior parte dei casi queste funzionalità si presentano sotto forma di componenti regola (eventi, condizioni e azioni) e di elementi dati, ma possono anche includere moduli principali e moduli condivisi.
I pacchetti di estensione vengono visualizzati nel catalogo delle estensioni nell’interfaccia utente di Data Collection e nell’interfaccia utente di Adobe Experience Platform per consentire agli utenti di eseguire l’installazione. L’aggiunta di un pacchetto di estensione a una proprietà viene eseguita creando un’estensione con un collegamento al pacchetto di estensione.
Un pacchetto di estensione appartiene all’azienda dello sviluppatore che lo ha creato.
L’endpoint utilizzato in questa guida fa parte dell’API di Reactor. Prima di continuare, consulta la guida introduttiva per informazioni importanti su come eseguire l’autenticazione nell’API.
Oltre a capire come effettuare chiamate all’API di Reactor, è anche importante comprendere come viene status
e availability
gli attributi influiscono sulle azioni che è possibile eseguire su di esso. Queste sono spiegate nelle sezioni seguenti.
I pacchetti di estensione hanno tre stati potenziali: pending
, succeeded
, e failed
.
Stato | Descrizione |
---|---|
pending |
Quando viene creato un pacchetto di estensione, i relativi status è impostato su pending . Questo indica che il sistema ha ricevuto le informazioni per il pacchetto di estensione e che inizierà l’elaborazione. Pacchetti di estensione con lo stato pending non sono disponibili per l’uso. |
succeeded |
Lo stato di un pacchetto di estensione si aggiorna su succeeded se l’elaborazione viene completata correttamente. |
failed |
Lo stato di un pacchetto di estensione si aggiorna su failed se l’elaborazione non viene completata correttamente. Un pacchetto di estensione con lo stato failed può essere aggiornato fino a quando l’elaborazione non riesce. Pacchetti di estensione con lo stato failed non sono disponibili per l’uso. |
Esistono livelli di disponibilità per un pacchetto di estensione: development
, private
, e public
.
Disponibilità | Descrizione |
---|---|
development |
Un pacchetto di estensione in development è visibile e disponibile solo per l’azienda che lo possiede. Inoltre, può essere utilizzato solo su proprietà configurate per lo sviluppo di estensioni. |
private |
A private il pacchetto di estensione è visibile solo all’azienda che lo possiede e può essere installato solo sulle proprietà di cui è proprietaria l’azienda. |
public |
A public il pacchetto di estensione è visibile e disponibile per tutte le società e proprietà. |
Quando viene creato un pacchetto di estensione, availability
è impostato su development
. Al termine del test, puoi effettuare la transizione del pacchetto di estensione in private
o public
.
Per recuperare un elenco di pacchetti di estensione, effettua una richiesta GET a /extension_packages
.
Formato API
GET /extension_packages
Utilizzando i parametri di query, i pacchetti di estensione elencati possono essere filtrati in base ai seguenti attributi:
archive
created_at
name
stage
token
updated_at
Richiesta
curl -X GET \
https://reactor.adobe.io/extension_packages \
-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'
Risposta
In caso di esito positivo, la risposta restituisce un elenco di pacchetti di estensione.
{
"data": [
{
"id": "EP6860e2485de2413ea9b295d6f5321ad3",
"type": "extension_packages",
"attributes": {
"actions": [
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "development",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP6860e2485de2413ea9b295d6f5321ad3",
"conditions": [
],
"configuration": null,
"created_at": "2020-11-09T17:58:32.694Z",
"data_elements": [
],
"description": "Provides nothing.",
"discontinued": false,
"display_name": "Kessel Template Test",
"events": [
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "test-1604944710",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:58:35.754Z",
"version": "1.0.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP6860e2485de2413ea9b295d6f5321ad3"
}
},
{
"id": "EP1b173c8316954e0986e5a405b4e715e3",
"type": "extension_packages",
"attributes": {
"actions": [
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "development",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP1b173c8316954e0986e5a405b4e715e3",
"conditions": [
],
"configuration": null,
"created_at": "2020-11-09T17:58:34.632Z",
"data_elements": [
],
"description": "Provides nothing.",
"discontinued": false,
"display_name": "Kessel Template Test",
"events": [
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "test-1604944712",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:58:36.655Z",
"version": "1.0.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP1b173c8316954e0986e5a405b4e715e3"
}
},
{
"id": "EPb8eca81769a64af3892af5202a57ce15",
"type": "extension_packages",
"attributes": {
"actions": [
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "development",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EPb8eca81769a64af3892af5202a57ce15",
"conditions": [
],
"configuration": null,
"created_at": "2020-11-09T18:32:29.271Z",
"data_elements": [
],
"description": "Provides nothing.",
"discontinued": false,
"display_name": "Kessel Template Test",
"events": [
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "test-1604946740",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T18:32:43.710Z",
"version": "1.0.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EPb8eca81769a64af3892af5202a57ce15"
}
}
],
"meta": {
"pagination": {
"current_page": 1,
"next_page": null,
"prev_page": null,
"total_pages": 1,
"total_count": 3
}
}
}
Per cercare un pacchetto di estensione, devi fornire il relativo ID nel percorso di una richiesta GET.
Formato API
GET /extension_packages/{EXTENSION_PACKAGE_ID}
Parametro | Descrizione |
---|---|
EXTENSION_PACKAGE_ID |
id del pacchetto di estensione che desideri cercare. |
Richiesta
curl -X GET \
https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a \
-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'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli del pacchetto di estensione, incluse le relative risorse delegate come actions
, conditions
, data_elements
ecc. La risposta di esempio seguente è stata troncata per motivi di spazio.
{
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages",
"attributes": {
"actions": [
{
"id": "kessel-test::actions::custom-code",
"name": "custom-code",
"schema": {
"type": "object",
"oneOf": [
{
"required": [
"language",
"source"
],
"properties": {
"global": {
"type": "boolean"
},
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"javascript"
]
}
},
"additionalProperties": false
},
{
"required": [
"language",
"source"
],
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"html"
]
}
},
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-04/schema#"
},
"libPath": "src/lib/actions/customCode.js",
"viewPath": "actions/customCode.html",
"displayName": "Custom Code"
}
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "private",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP75db2452065b44e2b8a38ca883ce369a",
"conditions": [
{
"id": "kessel-test::conditions::browser",
"name": "browser",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"browsers"
],
"properties": {
"browsers": {
"type": "array",
"items": {
"enum": [
"Chrome",
"Firefox",
"IE",
"Edge",
"Safari",
"Mobile Safari"
],
"type": "string"
}
}
},
"additionalProperties": false
},
"libPath": "src/lib/conditions/browser.js",
"viewPath": "conditions/browser.html",
"displayName": "Browser",
"categoryName": "Technology"
}
],
"configuration": null,
"created_at": "2020-11-09T17:51:59.433Z",
"data_elements": [
{
"id": "kessel-test::dataElements::cookie",
"name": "cookie",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"libPath": "src/lib/dataElements/cookie.js",
"viewPath": "dataElements/cookie.html",
"displayName": "Cookie"
}
],
"description": "Provides default event, condition, and data element types available to all tags users.",
"discontinued": false,
"display_name": "Kessel Test",
"events": [
{
"id": "kessel-test::events::blur",
"name": "blur",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"bubbleStop": {
"type": "boolean"
},
"elementSelector": {
"type": "string",
"minLength": 1
},
"elementProperties": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string"
},
"valueIsRegex": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"bubbleFireIfParent": {
"type": "boolean"
},
"bubbleFireIfChildFired": {
"type": "boolean"
}
},
"additionalProperties": false
},
"libPath": "src/lib/events/blur.js",
"viewPath": "events/blur.html",
"displayName": "Blur",
"categoryName": "Form"
}
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "kessel-test",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:54:01.487Z",
"version": "1.2.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a"
}
}
}
I pacchetti di estensione vengono creati utilizzando uno strumento di scaffolding Node.js e salvati sul computer locale prima di essere inviati all’API di Reactor. Per ulteriori informazioni sulla configurazione di un pacchetto di estensione, consulta la guida introduttiva allo sviluppo di estensioni.
Dopo aver creato il file del pacchetto di estensione, puoi inviarlo all’API di Reactor tramite una richiesta POST.
Formato API
POST /extension_packages
Richiesta
La seguente richiesta crea un nuovo pacchetto di estensione. Il percorso locale del file del pacchetto che viene caricato è indicato come dati del modulo (package
) e pertanto questo endpoint richiede un’intestazione Content-Type
con valore multipart/form-data
.
curl -X POST \
https://reactor.adobe.io/extension_packages \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'Content-Type: multipart/form-data' \
-F 'package=@"/Users/temp/extension-package.zip"'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli del pacchetto di estensione appena creato.
{
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages",
"attributes": {
"actions": [
{
"id": "kessel-test::actions::custom-code",
"name": "custom-code",
"schema": {
"type": "object",
"oneOf": [
{
"required": [
"language",
"source"
],
"properties": {
"global": {
"type": "boolean"
},
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"javascript"
]
}
},
"additionalProperties": false
},
{
"required": [
"language",
"source"
],
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"html"
]
}
},
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-04/schema#"
},
"libPath": "src/lib/actions/customCode.js",
"viewPath": "actions/customCode.html",
"displayName": "Custom Code"
}
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "private",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP75db2452065b44e2b8a38ca883ce369a",
"conditions": [
{
"id": "kessel-test::conditions::browser",
"name": "browser",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"browsers"
],
"properties": {
"browsers": {
"type": "array",
"items": {
"enum": [
"Chrome",
"Firefox",
"IE",
"Edge",
"Safari",
"Mobile Safari"
],
"type": "string"
}
}
},
"additionalProperties": false
},
"libPath": "src/lib/conditions/browser.js",
"viewPath": "conditions/browser.html",
"displayName": "Browser",
"categoryName": "Technology"
}
],
"configuration": null,
"created_at": "2020-11-09T17:51:59.433Z",
"data_elements": [
{
"id": "kessel-test::dataElements::cookie",
"name": "cookie",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"libPath": "src/lib/dataElements/cookie.js",
"viewPath": "dataElements/cookie.html",
"displayName": "Cookie"
}
],
"description": "Provides default event, condition, and data element types available to all tags users.",
"discontinued": false,
"display_name": "Kessel Test",
"events": [
{
"id": "kessel-test::events::blur",
"name": "blur",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"bubbleStop": {
"type": "boolean"
},
"elementSelector": {
"type": "string",
"minLength": 1
},
"elementProperties": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string"
},
"valueIsRegex": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"bubbleFireIfParent": {
"type": "boolean"
},
"bubbleFireIfChildFired": {
"type": "boolean"
}
},
"additionalProperties": false
},
"libPath": "src/lib/events/blur.js",
"viewPath": "events/blur.html",
"displayName": "Blur",
"categoryName": "Form"
}
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "kessel-test",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:54:01.487Z",
"version": "1.2.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a"
}
}
}
Per aggiornare un pacchetto di estensione, devi includere il relativo ID nel percorso di una richiesta PATCH.
Formato API
PATCH /extension_packages/{EXTENSION_PACKAGE_ID}
Parametro | Descrizione |
---|---|
EXTENSION_PACKAGE_ID |
id del pacchetto di estensione che desideri aggiornare. |
Richiesta
Come per la creazione di un pacchetto di estensione, è necessario caricare tramite dati modulo una versione locale del pacchetto aggiornato.
curl -X PATCH \
https://reactor.adobe.io/extension_packages/EP10bb503178694d73bc0cd84387b82172 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'Content-Type: multipart/form-data' \
-F 'package=@"/Users/temp/extension-package.zip"'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli del pacchetto di estensione aggiornato.
{
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages",
"attributes": {
"actions": [
{
"id": "kessel-test::actions::custom-code",
"name": "custom-code",
"schema": {
"type": "object",
"oneOf": [
{
"required": [
"language",
"source"
],
"properties": {
"global": {
"type": "boolean"
},
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"javascript"
]
}
},
"additionalProperties": false
},
{
"required": [
"language",
"source"
],
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"html"
]
}
},
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-04/schema#"
},
"libPath": "src/lib/actions/customCode.js",
"viewPath": "actions/customCode.html",
"displayName": "Custom Code"
}
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "private",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP75db2452065b44e2b8a38ca883ce369a",
"conditions": [
{
"id": "kessel-test::conditions::browser",
"name": "browser",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"browsers"
],
"properties": {
"browsers": {
"type": "array",
"items": {
"enum": [
"Chrome",
"Firefox",
"IE",
"Edge",
"Safari",
"Mobile Safari"
],
"type": "string"
}
}
},
"additionalProperties": false
},
"libPath": "src/lib/conditions/browser.js",
"viewPath": "conditions/browser.html",
"displayName": "Browser",
"categoryName": "Technology"
}
],
"configuration": null,
"created_at": "2020-11-09T17:51:59.433Z",
"data_elements": [
{
"id": "kessel-test::dataElements::cookie",
"name": "cookie",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"libPath": "src/lib/dataElements/cookie.js",
"viewPath": "dataElements/cookie.html",
"displayName": "Cookie"
}
],
"description": "Provides default event, condition, and data element types available to all tags users.",
"discontinued": false,
"display_name": "Kessel Test",
"events": [
{
"id": "kessel-test::events::blur",
"name": "blur",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"bubbleStop": {
"type": "boolean"
},
"elementSelector": {
"type": "string",
"minLength": 1
},
"elementProperties": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string"
},
"valueIsRegex": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"bubbleFireIfParent": {
"type": "boolean"
},
"bubbleFireIfChildFired": {
"type": "boolean"
}
},
"additionalProperties": false
},
"libPath": "src/lib/events/blur.js",
"viewPath": "events/blur.html",
"displayName": "Blur",
"categoryName": "Form"
}
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "kessel-test",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:54:01.487Z",
"version": "1.2.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a"
}
}
}
Una volta completato il test del pacchetto di estensione, puoi rilasciarlo privatamente. Questo lo rende disponibile alle proprietà della tua azienda.
Dopo averlo rilasciato privatamente, puoi iniziare il processo di rilascio pubblico compilando il modulo di richiesta di rilascio pubblico.
Formato API
PATCH /extension_packages/{EXTENSION_PACKAGE_ID}
Parametro | Descrizione |
---|---|
EXTENSION_PACKAGE_ID |
id del pacchetto di estensione che desideri rilasciare privatamente. |
Richiesta
Per ottenere una versione privata, si deve fornire una action
con valore release_private
nella sezione meta
dei dati della richiesta.
curl -X PATCH \
https://reactor.adobe.io/extension_packages/EP10bb503178694d73bc0cd84387b82172 \
-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' \
-d '{
"data": {
"meta": {
"action": "release_private"
},
"id": "EP27e9323eb585411fae6086fc78a3b70b",
"type": "extension_packages"
}
}'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli del pacchetto di estensione.
{
"data": {
"id": "EP75db2452065b44e2b8a38ca883ce369a",
"type": "extension_packages",
"attributes": {
"actions": [
{
"id": "kessel-test::actions::custom-code",
"name": "custom-code",
"schema": {
"type": "object",
"oneOf": [
{
"required": [
"language",
"source"
],
"properties": {
"global": {
"type": "boolean"
},
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"javascript"
]
}
},
"additionalProperties": false
},
{
"required": [
"language",
"source"
],
"properties": {
"source": {
"type": "string",
"minLength": 1
},
"language": {
"enum": [
"html"
]
}
},
"additionalProperties": false
}
],
"$schema": "http://json-schema.org/draft-04/schema#"
},
"libPath": "src/lib/actions/customCode.js",
"viewPath": "actions/customCode.html",
"displayName": "Custom Code"
}
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "private",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP75db2452065b44e2b8a38ca883ce369a",
"conditions": [
{
"id": "kessel-test::conditions::browser",
"name": "browser",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"browsers"
],
"properties": {
"browsers": {
"type": "array",
"items": {
"enum": [
"Chrome",
"Firefox",
"IE",
"Edge",
"Safari",
"Mobile Safari"
],
"type": "string"
}
}
},
"additionalProperties": false
},
"libPath": "src/lib/conditions/browser.js",
"viewPath": "conditions/browser.html",
"displayName": "Browser",
"categoryName": "Technology"
}
],
"configuration": null,
"created_at": "2020-11-09T17:51:59.433Z",
"data_elements": [
{
"id": "kessel-test::dataElements::cookie",
"name": "cookie",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"libPath": "src/lib/dataElements/cookie.js",
"viewPath": "dataElements/cookie.html",
"displayName": "Cookie"
}
],
"description": "Provides default event, condition, and data element types available to all tags users.",
"discontinued": false,
"display_name": "Kessel Test",
"events": [
{
"id": "kessel-test::events::blur",
"name": "blur",
"schema": {
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema#",
"properties": {
"bubbleStop": {
"type": "boolean"
},
"elementSelector": {
"type": "string",
"minLength": 1
},
"elementProperties": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"value": {
"type": "string"
},
"valueIsRegex": {
"type": "boolean"
}
},
"additionalProperties": false
}
},
"bubbleFireIfParent": {
"type": "boolean"
},
"bubbleFireIfChildFired": {
"type": "boolean"
}
},
"additionalProperties": false
},
"libPath": "src/lib/events/blur.js",
"viewPath": "events/blur.html",
"displayName": "Blur",
"categoryName": "Form"
}
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "kessel-test",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-11-09T17:54:01.487Z",
"version": "1.2.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP75db2452065b44e2b8a38ca883ce369a"
}
}
}
Per dismettere un pacchetto di estensione, si imposta il relativo attributo discontinued
su true
tramite una richiesta PATCH.
Formato API
PATCH /extension_packages/{EXTENSION_PACKAGE_ID}
Parametro | Descrizione |
---|---|
EXTENSION_PACKAGE_ID |
id del pacchetto di estensione che desideri dismettere. |
Richiesta
Per ottenere una versione privata, si deve fornire una action
con valore release_private
nella sezione meta
dei dati della richiesta.
curl -X PATCH \
https://reactor.adobe.io/extension_packages/EP10bb503178694d73bc0cd84387b82172 \
-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' \
-d '{
"data": {
"attributes": {
"discontinued": true
},
"id": "EP5705a5d99aba406692e0ac666fcab160",
"type": "extension_packages"
}
}'
Risposta
In caso di esito positivo, la risposta restituisce i dettagli del pacchetto di estensione.
{
"data": {
"id": "EP5705a5d99aba406692e0ac666fcab160",
"type": "extension_packages",
"attributes": {
"actions": [
],
"author": {
"url": "http://adobe.com",
"name": "Adobe Systems",
"email": "reactor@adobe.com"
},
"availability": "private",
"cdn_path": "https://assets.adobedtm.com/staging/extensions/EP5705a5d99aba406692e0ac666fcab160",
"conditions": [
],
"configuration": null,
"created_at": "2020-12-14T17:39:36.932Z",
"data_elements": [
],
"description": "Provides nothing.",
"discontinued": true,
"display_name": "Kessel Template Test",
"events": [
],
"exchange_url": null,
"hosted_lib_files": null,
"icon_path": "resources/icons/core.svg",
"main": null,
"name": "test-1607967575",
"owner_org_id": "08364A825824E04F0A494115@AdobeOrg",
"resources": null,
"shared_modules": null,
"status": "succeeded",
"platform": "web",
"updated_at": "2020-12-14T17:39:43.883Z",
"version": "1.0.0",
"view_base_path": "dist/"
},
"links": {
"self": "https://reactor.adobe.io/extension_packages/EP5705a5d99aba406692e0ac666fcab160"
}
}
}
Per elencare le versioni di un pacchetto di estensione, si aggiunge /versions
al percorso di una richiesta di ricerca.
Formato API
GET /extension_packages/{EXTENSION_PACKAGE_ID}/versions
Parametro | Descrizione |
---|---|
EXTENSION_PACKAGE_ID |
id del pacchetto di estensione di cui desideri elencare le versioni. |
Richiesta
curl -X GET \
https://reactor.adobe.io/extension_packages/EP10bb503178694d73bc0cd84387b82172/versions \
-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'
Risposta
In caso di esito positivo, la risposta restituisce un array delle versioni precedenti del pacchetto di estensione. Una risposta di esempio è stata omessa per motivo di spazio.