Punt voor App-configuraties

WARNING
De uitvoering van de /app_configurations Het eindpunt is in flits aangezien de eigenschappen worden toegevoegd, verwijderd, en herwerkt.

Met toepassingsconfiguraties kunnen referenties worden opgeslagen en opgehaald voor later gebruik. De /app_configurations kunt u toepassingsconfiguraties programmatisch beheren binnen uw ervaringstoepassing.

Aan de slag

Het eindpunt dat in deze handleiding wordt gebruikt, maakt deel uit van de Reactor-API. Controleer voordat je doorgaat de gids Aan de slag voor belangrijke informatie over hoe te voor authentiek te verklaren aan API.

Een lijst met toepassingsconfiguraties ophalen list

API-indeling

GET /companies/{COMPANY_ID}/app_configurations
Parameter
Beschrijving
COMPANY_ID
De id van de bedrijf die eigenaar is van de toepassingsconfiguraties.
NOTE
Met behulp van queryparameters kunnen de weergegeven toepassingsconfiguraties worden gefilterd op basis van de volgende kenmerken:
  • app_id
  • created_at
  • key_type
  • messaging_service
  • name
  • platform
  • updated_at
filterreacties

Verzoek

curl -X GET \
  https://reactor.adobe.io/companies/COdb0cd64ad4524440be94b8496416ec7d/app_configurations \
  -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'

Antwoord

Een geslaagde reactie retourneert een lijst met toepassingsconfiguraties.

{
  "data": [
    {
      "id": "AC40c339ab80d24c958b90d67b698602eb",
      "type": "app_configurations",
      "attributes": {
        "created_at": "2020-12-14T17:31:10.626Z",
        "updated_at": "2020-12-14T17:31:10.626Z",
        "app_id": "com.adobe.test_app",
        "name": "Kessel Apns App",
        "platform": "mobile",
        "messaging_service": "apns",
        "key_type": "p8_file"
      },
      "relationships": {
        "company": {
          "links": {
            "related": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb/company"
          },
          "data": {
            "id": "CO2bf094214ffd4785bb4bcf88c952a7c1",
            "type": "companies"
          }
        }
      },
      "links": {
        "company": "https://reactor.adobe.io/companies/CO2bf094214ffd4785bb4bcf88c952a7c1",
        "self": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb"
      }
    }
  ],
  "meta": {
    "pagination": {
      "current_page": 1,
      "next_page": null,
      "prev_page": null,
      "total_pages": 1,
      "total_count": 1
    }
  }
}

Een toepassingsconfiguratie opzoeken lookup

U kunt een toepassingsconfiguratie opzoeken door zijn identiteitskaart in de weg van een verzoek van de GET te verstrekken.

API-indeling

GET /app_configurations/{APP_CONFIGURATION_ID}
Parameter
Beschrijving
APP_CONFIGURATION_ID
De id van de toepassingsconfiguratie die u wilt opzoeken.

Verzoek

curl -X GET \
  https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb \
  -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'

Antwoord

Een succesvol antwoord retourneert de details van de toepassingsconfiguratie.

{
  "data": {
    "id": "AC40c339ab80d24c958b90d67b698602eb",
    "type": "app_configurations",
    "attributes": {
      "created_at": "2020-12-14T17:31:10.626Z",
      "updated_at": "2020-12-14T17:31:10.626Z",
      "app_id": "com.adobe.test_app",
      "name": "Kessel Apns App",
      "platform": "mobile",
      "messaging_service": "apns",
      "key_type": "p8_file"
    },
    "relationships": {
      "company": {
        "links": {
          "related": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb/company"
        },
        "data": {
          "id": "CO2bf094214ffd4785bb4bcf88c952a7c1",
          "type": "companies"
        }
      }
    },
    "links": {
      "company": "https://reactor.adobe.io/companies/CO2bf094214ffd4785bb4bcf88c952a7c1",
      "self": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb"
    }
  }
}

Een toepassingsconfiguratie maken create

U kunt een nieuwe toepassingsconfiguratie tot stand brengen door een verzoek van de POST te doen.

API-indeling

POST /companies/{COMPANY_ID}/app_configurations
Parameter
Beschrijving
COMPANY_ID
De id van de bedrijf dat u de toepassingsconfiguratie onder definieert.

Verzoek

curl -X POST \
  https://reactor.adobe.io/companies \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.api+json;revision=1' \
  -d '{
        "data": {
          "attributes": {
            "name": "Kessel Apns App",
            "app_id": "com.adobe.test_app",
            "platform": "mobile",
            "messaging_service": "apns",
            "key_type": "p8_file",
            "push_credential": {
              "bundleId": "com.adobe.test_app",
              "keyId": "{KEY_ID}",
              "p8": "{SECRET}",
              "teamId": "{TEAM_ID}"
            }
          },
          "type": "app_configurations"
        }
      }'
Eigenschap
Beschrijving
platform
Het platform waarop de toepassing wordt uitgevoerd (web of mobiel). Dit bepaalt welke overseinendiensten beschikbaar zijn.
messaging_service
De berichtenservice die aan de app is gekoppeld, zoals APN's (Apple Push Notification service) en Firebase Cloud Messaging (FCM). Hiermee bepaalt u welke sleuteltypen kunnen worden gebruikt.
key_type
Vertegenwoordigt het protocol dat een duw-dienst verkoper steunt en bepaalt het formaat van push_credential object. Aangezien de protocollen voor overseinendiensten evolueren, nieuw key_type waarden worden gecreeerd om de bijgewerkte protocollen te steunen.
push_credential
De eigenlijke credentiewaarde, die in rust wordt gecodeerd. Dit veld wordt gewoonlijk niet gedecodeerd of opgenomen in API-reacties. Alleen bepaalde Adobe-services kunnen een antwoord krijgen met een gedecodeerde pushreferentie.

Antwoord

Een geslaagde reactie retourneert de details van de nieuwe toepassingsconfiguratie.

{
  "data": {
    "id": "AC40c339ab80d24c958b90d67b698602eb",
    "type": "app_configurations",
    "attributes": {
      "created_at": "2020-12-14T17:31:10.626Z",
      "updated_at": "2020-12-14T17:31:10.626Z",
      "app_id": "com.adobe.test_app",
      "name": "Kessel Apns App",
      "platform": "mobile",
      "messaging_service": "apns",
      "key_type": "p8_file"
    },
    "relationships": {
      "company": {
        "links": {
          "related": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb/company"
        },
        "data": {
          "id": "CO2bf094214ffd4785bb4bcf88c952a7c1",
          "type": "companies"
        }
      }
    },
    "links": {
      "company": "https://reactor.adobe.io/companies/CO2bf094214ffd4785bb4bcf88c952a7c1",
      "self": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb"
    }
  }
}

Toepassingsconfiguratie bijwerken

U kunt een toepassingsconfiguratie bijwerken door zijn identiteitskaart in de weg van een PATCH verzoek te omvatten.

API-indeling

PATCH /app_configurations/{APP_CONFIGURATION_ID}
Parameter
Beschrijving
APP_CONFIGURATION_ID
De id van de toepassingsconfiguratie die u wilt bijwerken.

Verzoek

De volgende aanvraag werkt de app_id voor een bestaande toepassingsconfiguratie.

curl -X PATCH \
  https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb \
  -H 'Authorization: Bearer {ACCESS_TOKEN}' \
  -H 'x-api-key: {API_KEY}' \
  -H 'x-gw-ims-org-id: {ORG_ID}' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/vnd.api+json;revision=1' \
  -d '{
        "data": {
          "attributes": {
            "app_id": "com.adobe.test_app_2"
          },
          "id": "AC40c339ab80d24c958b90d67b698602eb",
          "type": "app_configurations"
        }
      }'
Eigenschap
Beschrijving
attributes

Een object waarvan de eigenschappen de kenmerken vertegenwoordigen die voor de toepassingsconfiguratie moeten worden bijgewerkt. Elke sleutel vertegenwoordigt het specifieke attribuut van de toepassingsconfiguratie dat moet worden bijgewerkt, samen met de overeenkomstige waarde het zou moeten worden bijgewerkt aan.

De volgende kenmerken kunnen worden bijgewerkt voor toepassingsconfiguraties:

  • app_id
  • key_type
  • messaging_service
  • name
  • platform
  • push_credential
id
De id van de toepassingsconfiguratie die u wilt bijwerken. Dit moet overeenkomen met de {APP_CONFIGURATION_ID} waarde opgegeven in het aanvraagpad.
type
Het type resource dat wordt bijgewerkt. Voor dit eindpunt, moet de waarde zijn app_configurations.

Antwoord

Een succesvol antwoord retourneert de details van de bijgewerkte toepassingsconfiguratie.

{
  "data": {
    "id": "AC40c339ab80d24c958b90d67b698602eb",
    "type": "app_configurations",
    "attributes": {
      "created_at": "2020-12-14T17:31:10.626Z",
      "updated_at": "2020-12-14T17:31:21.787Z",
      "app_id": "com.adobe.test_app_2",
      "name": "Kessel Apns App",
      "platform": "mobile",
      "messaging_service": "apns",
      "key_type": "p8_file"
    },
    "relationships": {
      "company": {
        "links": {
          "related": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb/company"
        },
        "data": {
          "id": "CO2bf094214ffd4785bb4bcf88c952a7c1",
          "type": "companies"
        }
      }
    },
    "links": {
      "company": "https://reactor.adobe.io/companies/CO2bf094214ffd4785bb4bcf88c952a7c1",
      "self": "https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb"
    }
  }
}

Een toepassingsconfiguratie verwijderen

U kunt een toepassingsconfiguratie schrappen door zijn identiteitskaart in de weg van een verzoek van de DELETE op te nemen.

API-indeling

DELETE /app_configurations/{APP_CONFIGURATION_ID}
Parameter
Beschrijving
APP_CONFIGURATION_ID
De id van de toepassingsconfiguratie die u wilt verwijderen.

Verzoek

curl -X DELETE \
  https://reactor.adobe.io/app_configurations/AC40c339ab80d24c958b90d67b698602eb \
  -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'

Antwoord

Een geslaagde reactie retourneert HTTP-status 204 (Geen inhoud) zonder responsiehoofdtekst om aan te geven dat de toepassingsconfiguratie is verwijderd.

recommendation-more-help
12b4e4a9-5028-4d88-8ce6-64a580811743