Zum Hauptinhalt springen

Patch Extension

PATCH/v2/contributors/{contributorId}/extensions/{extensionId}
API-Version
v2
Request-Methode
PATCH
Operation-ID
extension-patch-extension

Request​

  • contributorIdstringrequired
  • extensionIdstring (uuid)required

Responses​

Format
application/json
Beschreibung

The extension has been patched.

  • assetsArray von objectrequired
    • Array[

      The following assets are the media that are associated with the extension and will be shown in extension details page.

      • *object

        The following assets are the media that are associated with the extension and will be shown in extension details page.

        • assetTypestring (einer von: image, video)required
        • fileNamestringdeprecated
        • idstring (uuid)required

          The asset ID and reference ID to its file. Retrieve the file with this id on `/v2/files/{id}

        • indexintegerrequired

          The index of the asset. Does not have to be successive. Can be used to order the assets.

      ]
  • backendComponentsobjectdeprecated
    • extensionAddedToContextobjectdeprecated
      • urlstring (≥ 1 Zeichen)required
    • extensionInstanceRemovedFromContextobjectdeprecated
      • urlstring (≥ 1 Zeichen)required
    • extensionInstanceSecretRotatedobjectdeprecated
      • urlstring (≥ 1 Zeichen)required
    • extensionInstanceUpdatedobjectdeprecated
      • urlstring (≥ 1 Zeichen)required
  • blockedbooleandeprecated
  • contextstring (einer von: project, customer)
  • contributorIdstringrequired
  • createdAtstring (date-time)
  • deletionDeadlinestring (date-time)
  • deprecationobject

    The Extension is deprecated by the contributor and will expire at the given date.

    • deprecatedAtstring (date-time)required
    • notestring
    • successorIdstring (uuid)

      The ID of the successor extension.

  • descriptionstring
  • detailedDescriptionsobject

    A detailed description of the capabilities of the extension.

    • deobjectrequired

      Language specific descriptions in various formats.

      • markdownstring (≥ 1 Zeichen)required
      • plainstring (≥ 1 Zeichen)
    • enobject

      Language specific descriptions in various formats.

      • markdownstring (≥ 1 Zeichen)required
      • plainstring (≥ 1 Zeichen)
  • disabledbooleandeprecated
  • externalFrontendsArray von object
    • Array[
      • *object
        • namestringrequired
        • urlstringrequired
      ]
  • frontendComponentsArray von objectdeprecated
    • Array[
      • *object
        • namestringrequired
        • urlstringrequired
      ]
  • frontendFragmentsobject
    • *
  • functionalbooleanrequired
  • idstring (uuid)required
  • isDeletionScheduledboolean
  • logoRefIdstring (uuid)

    This is the FileId of the Logo. Retrieve the file with this id on /v2/files/{logoRefId}.

  • namestringrequired
  • pricingeine von 1 Alternativen
    • AlternativeArray von object

      A price plan with (multiple) variants, including different prices for different included service descriptions

      • Array[
        • *object
          • deletionDeadlinestring (date-time)
          • descriptionstring
          • isBookingStoppedbooleanrequired

            If a variant is no longer bookable the existing extension instances will not be removed but no new ones can be created.

          • isDeletionScheduledbooleanrequired
          • keystringrequired
          • namestring
          • priceInCentsintegerrequired

            The monthly price in Euro Cents before tax.

        ]
  • pricingDetailsobject

    The details section of the price plan. It informs if choosing different variants as a upgrade or downgrade is possible.

    • isDowngradeAllowedbooleanrequired
    • isUpgradeAllowedbooleanrequired
  • publishedbooleanrequired
  • publishedAtstring (date-time)

    Date of the first publishing.

  • requestedChangesobject
    • contextstring (einer von: project, customer)
    • purgeScopesboolean
    • purgeWebhookUrlsboolean
    • scopesArray von string
      • Array[
        • *string
        ]
    • webhookUrlseine von 2 Alternativen
      • Alternativeobject
        • extensionAddedToContextobjectrequired
          • urlstring (≥ 1 Zeichen)required
        • extensionInstanceRemovedFromContextobjectrequired
          • urlstring (≥ 1 Zeichen)required
        • extensionInstanceSecretRotatedobjectrequired
          • urlstring (≥ 1 Zeichen)required
        • extensionInstanceUpdatedobjectrequired
          • urlstring (≥ 1 Zeichen)required
      • Alternativeobject
    • scopesArray von string
      • Array[
        • *string
        ]
    • secretsArray von objectrequired
      • Array[
        • *object
          • secretIdstring (uuid)required
          • usableUntilstring (date-time)
        ]
    • statestring (einer von: enabled, blocked, disabled)deprecated

      deprecated

    • statisticsobjectrequired
      • amountOfInstancesinteger (≥ 0)

        The amount of instances for this extension. Accurate for the Contributor. Publicly rounded to the next lower hundred.

    • subTitleobject

      A few words to promote your Extension.

      • destring (≤ 40 Zeichen)required
      • enstring (≤ 40 Zeichen)
    • support
    • tagsArray von string
      • Array[
        • *string
        ]
    • verificationRequestedbooleanrequired
    • verifiedbooleanrequired
    • webhookUrlsobject
      • extensionAddedToContextobjectrequired
        • urlstring (≥ 1 Zeichen)required
      • extensionInstanceRemovedFromContextobjectrequired
        • urlstring (≥ 1 Zeichen)required
      • extensionInstanceSecretRotatedobjectrequired
        • urlstring (≥ 1 Zeichen)required
      • extensionInstanceUpdatedobjectrequired
        • urlstring (≥ 1 Zeichen)required
    Content-Type: application/json

    {
    "assets": [
    {
    "assetType": "image",
    "id": "f0f86186-0a5a-45b2-aa33-502777496347",
    "index": 1
    }
    ],
    "context": "project",
    "contributorId": "string",
    "createdAt": "1985-10-26T01:21:00.000Z",
    "deletionDeadline": "1985-10-26T01:21:00.000Z",
    "deprecation": {
    "deprecatedAt": "1985-10-26T01:21:00.000Z",
    "note": "This extension is no longer actively maintained. Please Use the successor extension instead.",
    "successorId": "f0f86186-0a5a-45b2-aa33-502777496347"
    },
    "description": "string",
    "detailedDescriptions": {
    "de": {
    "markdown": "string",
    "plain": "string"
    },
    "en": {
    "markdown": "string",
    "plain": "string"
    }
    },
    "externalFrontends": [
    {
    "name": "string",
    "url": "string"
    }
    ],
    "frontendFragments": {
    "string": null
    },
    "functional": true,
    "id": "f0f86186-0a5a-45b2-aa33-502777496347",
    "isDeletionScheduled": true,
    "logoRefId": "f0f86186-0a5a-45b2-aa33-502777496347",
    "name": "string",
    "pricing": [
    {
    "deletionDeadline": "1985-10-26T01:21:00.000Z",
    "description": "string",
    "isBookingStopped": true,
    "isDeletionScheduled": true,
    "key": "string",
    "name": "string",
    "priceInCents": 123
    }
    ],
    "pricingDetails": {
    "isDowngradeAllowed": true,
    "isUpgradeAllowed": true
    },
    "published": true,
    "publishedAt": "1985-10-26T01:21:00.000Z",
    "requestedChanges": {
    "context": "project",
    "purgeScopes": true,
    "purgeWebhookUrls": true,
    "scopes": [
    "string"
    ],
    "webhookUrls": {
    "extensionAddedToContext": {
    "url": "string"
    },
    "extensionInstanceRemovedFromContext": {
    "url": "string"
    },
    "extensionInstanceSecretRotated": {
    "url": "string"
    },
    "extensionInstanceUpdated": {
    "url": "string"
    }
    }
    },
    "scopes": [
    "string"
    ],
    "secrets": [
    {
    "secretId": "f0f86186-0a5a-45b2-aa33-502777496347",
    "usableUntil": "1985-10-26T01:21:00.000Z"
    }
    ],
    "statistics": {
    "amountOfInstances": 42
    },
    "subTitle": {
    "de": "Ping deine App an",
    "en": "Ping your app"
    },
    "support": null,
    "tags": [
    "string"
    ],
    "verificationRequested": true,
    "verified": true,
    "webhookUrls": {
    "extensionAddedToContext": {
    "url": "string"
    },
    "extensionInstanceRemovedFromContext": {
    "url": "string"
    },
    "extensionInstanceSecretRotated": {
    "url": "string"
    },
    "extensionInstanceUpdated": {
    "url": "string"
    }
    }
    }
    {
    "properties": {
    "assets": {
    "items": {
    "description": "The following assets are the media that are associated with the extension and will be shown in extension details page.",
    "properties": {
    "assetType": {
    "enum": [
    "image",
    "video"
    ],
    "example": "image",
    "type": "string"
    },
    "fileName": {
    "deprecated": true,
    "example": "myFile.png",
    "type": "string"
    },
    "id": {
    "description": "The asset ID and reference ID to its file. Retrieve the file with this id on `/v2/files/{id}",
    "format": "uuid",
    "type": "string"
    },
    "index": {
    "description": "The index of the asset. Does not have to be successive. Can be used to order the assets.",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "id",
    "index",
    "assetType"
    ],
    "type": "object"
    },
    "type": "array"
    },
    "backendComponents": {
    "deprecated": true,
    "properties": {
    "extensionAddedToContext": {
    "deprecated": true,
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceRemovedFromContext": {
    "deprecated": true,
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceSecretRotated": {
    "deprecated": true,
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceUpdated": {
    "deprecated": true,
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    }
    },
    "type": "object"
    },
    "blocked": {
    "deprecated": true,
    "type": "boolean"
    },
    "context": {
    "enum": [
    "project",
    "customer"
    ],
    "type": "string"
    },
    "contributorId": {
    "type": "string"
    },
    "createdAt": {
    "format": "date-time",
    "type": "string"
    },
    "deletionDeadline": {
    "format": "date-time",
    "type": "string"
    },
    "deprecation": {
    "description": "The Extension is deprecated by the contributor and will expire at the given date.",
    "properties": {
    "deprecatedAt": {
    "format": "date-time",
    "type": "string"
    },
    "note": {
    "example": "This extension is no longer actively maintained. Please Use the successor extension instead.",
    "type": "string"
    },
    "successorId": {
    "description": "The ID of the successor extension.",
    "format": "uuid",
    "type": "string"
    }
    },
    "required": [
    "deprecatedAt"
    ],
    "type": "object"
    },
    "description": {
    "type": "string"
    },
    "detailedDescriptions": {
    "description": "A detailed description of the capabilities of the extension.",
    "properties": {
    "de": {
    "description": "Language specific descriptions in various formats.",
    "properties": {
    "markdown": {
    "minLength": 1,
    "type": "string"
    },
    "plain": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "markdown"
    ],
    "type": "object"
    },
    "en": {
    "description": "Language specific descriptions in various formats.",
    "properties": {
    "markdown": {
    "minLength": 1,
    "type": "string"
    },
    "plain": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "markdown"
    ],
    "type": "object"
    }
    },
    "required": [
    "de"
    ],
    "type": "object"
    },
    "disabled": {
    "deprecated": true,
    "type": "boolean"
    },
    "externalFrontends": {
    "items": {
    "properties": {
    "name": {
    "type": "string"
    },
    "url": {
    "type": "string"
    }
    },
    "required": [
    "name",
    "url"
    ],
    "type": "object"
    },
    "type": "array"
    },
    "frontendComponents": {
    "deprecated": true,
    "items": {
    "properties": {
    "name": {
    "type": "string"
    },
    "url": {
    "type": "string"
    }
    },
    "required": [
    "name",
    "url"
    ],
    "type": "object"
    },
    "type": "array"
    },
    "frontendFragments": {
    "additionalProperties": {
    "allOf": [
    {
    "properties": {
    "additionalProperties": {
    "additionalProperties": {
    "type": "string"
    },
    "type": "object"
    }
    },
    "type": "object"
    },
    {
    "oneOf": [
    {
    "properties": {
    "url": {
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    }
    ]
    }
    ]
    },
    "type": "object"
    },
    "functional": {
    "type": "boolean"
    },
    "id": {
    "format": "uuid",
    "type": "string"
    },
    "isDeletionScheduled": {
    "type": "boolean"
    },
    "logoRefId": {
    "description": "This is the FileId of the Logo. Retrieve the file with this id on `/v2/files/{logoRefId}`.",
    "format": "uuid",
    "type": "string"
    },
    "name": {
    "type": "string"
    },
    "pricing": {
    "oneOf": [
    {
    "description": "A price plan with (multiple) variants, including different prices for different included service descriptions",
    "items": {
    "properties": {
    "deletionDeadline": {
    "format": "date-time",
    "type": "string"
    },
    "description": {
    "type": "string"
    },
    "isBookingStopped": {
    "description": "If a variant is no longer bookable the existing extension instances will not be removed but no new ones can be created.",
    "type": "boolean"
    },
    "isDeletionScheduled": {
    "type": "boolean"
    },
    "key": {
    "type": "string"
    },
    "name": {
    "type": "string"
    },
    "priceInCents": {
    "description": "The monthly price in Euro Cents before tax.",
    "type": "integer"
    }
    },
    "required": [
    "key",
    "priceInCents",
    "isBookingStopped",
    "isDeletionScheduled"
    ],
    "type": "object"
    },
    "type": "array"
    }
    ]
    },
    "pricingDetails": {
    "description": "The details section of the price plan. It informs if choosing different variants as a upgrade or downgrade is possible.",
    "properties": {
    "isDowngradeAllowed": {
    "type": "boolean"
    },
    "isUpgradeAllowed": {
    "type": "boolean"
    }
    },
    "required": [
    "isUpgradeAllowed",
    "isDowngradeAllowed"
    ],
    "type": "object"
    },
    "published": {
    "type": "boolean"
    },
    "publishedAt": {
    "description": "Date of the first publishing.",
    "format": "date-time",
    "type": "string"
    },
    "requestedChanges": {
    "additionalProperties": false,
    "properties": {
    "context": {
    "enum": [
    "project",
    "customer"
    ],
    "type": "string"
    },
    "purgeScopes": {
    "type": "boolean"
    },
    "purgeWebhookUrls": {
    "type": "boolean"
    },
    "scopes": {
    "items": {
    "type": "string"
    },
    "type": "array"
    },
    "webhookUrls": {
    "oneOf": [
    {
    "properties": {
    "extensionAddedToContext": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceRemovedFromContext": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceSecretRotated": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceUpdated": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    }
    },
    "required": [
    "extensionAddedToContext",
    "extensionInstanceUpdated",
    "extensionInstanceSecretRotated",
    "extensionInstanceRemovedFromContext"
    ],
    "type": "object"
    },
    {
    "additionalProperties": false,
    "properties": {},
    "type": "object"
    }
    ]
    }
    },
    "type": "object"
    },
    "scopes": {
    "items": {
    "type": "string"
    },
    "type": "array"
    },
    "secrets": {
    "items": {
    "properties": {
    "secretId": {
    "format": "uuid",
    "type": "string"
    },
    "usableUntil": {
    "format": "date-time",
    "type": "string"
    }
    },
    "required": [
    "secretId"
    ],
    "type": "object"
    },
    "type": "array"
    },
    "state": {
    "deprecated": true,
    "description": "deprecated",
    "enum": [
    "enabled",
    "blocked",
    "disabled"
    ],
    "type": "string"
    },
    "statistics": {
    "properties": {
    "amountOfInstances": {
    "description": "The amount of instances for this extension. Accurate for the Contributor. Publicly rounded to the next lower hundred.",
    "example": 42,
    "minimum": 0,
    "type": "integer"
    }
    },
    "type": "object"
    },
    "subTitle": {
    "description": "A few words to promote your Extension.",
    "properties": {
    "de": {
    "example": "Ping deine App an",
    "maxLength": 40,
    "type": "string"
    },
    "en": {
    "example": "Ping your app",
    "maxLength": 40,
    "type": "string"
    }
    },
    "required": [
    "de"
    ],
    "type": "object"
    },
    "support": {
    "allOf": [
    {
    "properties": {
    "email": {
    "example": "a.lovelace@example.com",
    "format": "email",
    "type": "string"
    },
    "phone": {
    "type": "string"
    }
    },
    "required": [
    "email"
    ],
    "type": "object"
    },
    {
    "properties": {
    "inherited": {
    "description": "Whether the support information is inherited from the contributor.",
    "type": "boolean"
    }
    },
    "required": [
    "inherited"
    ],
    "type": "object"
    }
    ]
    },
    "tags": {
    "items": {
    "type": "string"
    },
    "minItems": 0,
    "type": "array"
    },
    "verificationRequested": {
    "type": "boolean"
    },
    "verified": {
    "type": "boolean"
    },
    "webhookUrls": {
    "properties": {
    "extensionAddedToContext": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceRemovedFromContext": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceSecretRotated": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    },
    "extensionInstanceUpdated": {
    "properties": {
    "url": {
    "minLength": 1,
    "type": "string"
    }
    },
    "required": [
    "url"
    ],
    "type": "object"
    }
    },
    "required": [
    "extensionAddedToContext",
    "extensionInstanceUpdated",
    "extensionInstanceSecretRotated",
    "extensionInstanceRemovedFromContext"
    ],
    "type": "object"
    }
    },
    "required": [
    "id",
    "contributorId",
    "name",
    "statistics",
    "assets",
    "published",
    "verified",
    "verificationRequested",
    "functional",
    "secrets"
    ],
    "type": "object"
    }

    Nutzungsbeispiele​

    $ curl \
    --fail \
    --location \
    -X PATCH \
    -d '{"assets":["f0f86186-0a5a-45b2-aa33-502777496347"],"deprecation":{"deprecatedAt":"1985-10-26T01:21:00.000Z","note":"This extension is no longer actively maintained. Please Use the successor extension instead.","successorId":"f0f86186-0a5a-45b2-aa33-502777496347"},"description":"string","detailedDescriptions":null,"externalFrontends":[{"name":"string","url":"string"}],"frontendFragments":{"string":null},"name":"string","scopes":["string"],"subTitle":{"de":"Ping deine App an","en":"Ping your app"},"support":{"email":"a.lovelace@example.com","phone":"string"},"tags":["string"],"webhookUrls":null}' \
    -H "Authorization: Bearer $MITTWALD_API_TOKEN" \
    -H 'Content-Type: application/json' \
    https://api.mittwald.de/v2/contributors/string/extensions/f0f86186-0a5a-45b2-aa33-502777496347
    import { MittwaldAPIV2Client } from "@mittwald/api-client";
    import { assertStatus } from "@mittwald/api-client-commons";

    const client = MittwaldAPIClient.newWithToken(process.env.MITTWALD_API_TOKEN);
    const response = await client.marketplace.extensionPatchExtension({
    "contributorId": "string",
    "extensionId": "f0f86186-0a5a-45b2-aa33-502777496347",
    "data": {
    "assets": [
    "f0f86186-0a5a-45b2-aa33-502777496347"
    ],
    "deprecation": {
    "deprecatedAt": "1985-10-26T01:21:00.000Z",
    "note": "This extension is no longer actively maintained. Please Use the successor extension instead.",
    "successorId": "f0f86186-0a5a-45b2-aa33-502777496347"
    },
    "description": "string",
    "detailedDescriptions": null,
    "externalFrontends": [
    {
    "name": "string",
    "url": "string"
    }
    ],
    "frontendFragments": {
    "string": null
    },
    "name": "string",
    "scopes": [
    "string"
    ],
    "subTitle": {
    "de": "Ping deine App an",
    "en": "Ping your app"
    },
    "support": {
    "email": "a.lovelace@example.com",
    "phone": "string"
    },
    "tags": [
    "string"
    ],
    "webhookUrls": null
    }
    });

    assertStatus(response, 200);

    use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionPatchExtension\ExtensionPatchExtensionRequest;
    use \Mittwald\ApiClient\Generated\V2\Clients\Marketplace\ExtensionPatchExtension\ExtensionPatchExtensionRequestBody;

    $client = MittwaldAPIClient::newWithToken(getenv('MITTWALD_API_TOKEN'));

    // TODO: Please consult the properties and constructor signature of
    // ExtensionPatchExtensionRequestBody to learn how to construct a valid instance
    $body = new ExtensionPatchExtensionRequestBody(/* TODO: ... */);

    $request = (new ExtensionPatchExtensionRequest(
    contributorId: "string",
    extensionId: "f0f86186-0a5a-45b2-aa33-502777496347",
    body: $body
    ));
    $response = $client->marketplace()->extensionPatchExtension($request);

    var_dump($response->getBody();

    Auf dieser Seite