Skip to main content

Assign to Organizations

||
Prerequisites

To manage app assignments to other organizations, you must have:

  • the versionID of the app version to assign, and
  • the other organization's Partner Code.

Once an app is uploaded and successfully processed, it's automatically assigned to your developer organization.

Via API

Assign App

POST /app-portal/v1/versions/{versionId}/assignments

{
"type": "SPECIFIC_ORGANISATIONS",
"organisations": [
{ "id": "{{organisationId}}" }
]
}

The response contains all existing assignments including the one you just created.

{
"type": "SPECIFIC_ORGANISATIONS",
"organisations": [{ "id": "XXX" }, { "id": "YYY" }]
}

The organization's administrator can now install the assigned version of your app and publish it.

Unassign an App

caution

When an app version is unassigned, it will stop working for the organization it was unassigned from. It can take several minutes before the unassignment is processed on all servers.

To unassign an app version from an organization:

  1. Ensure you have the versionId of the version you want to unassign.

  2. Retrieve a list of the version's current organization assignments:

    GET /app-portal/v1/versions/{versionId}/assignments

    Response example

    {
    "type": "SPECIFIC_ORGANISATIONS",
    "organisations": [
    {
    "id": "abc-123",
    "assignedBy": "xxx",
    "assignedAt": "2023-05-03T14:55:58.971Z"
    },
    {
    "id": "def-456",
    "assignedBy": "xxx",
    "assignedAt": "2023-05-03T14:55:17.022Z"
    }
    ]
    }
  3. Find the id of the organization that the version should be unassigned from.

  4. Using the id you just identified, you can delete the assignment to that specific organization:

    DELETE /app-portal/v1/versions/{versionId}/assignments/organisations/{organisationId}

    Upon successful deletion, you’ll receive a 204 No Content response with no body.

The unassigned version is no longer accessible to the specified organization.

Via CLI

Assign an App

The apps assign command assigns a specific version of your app to one or more Showpad organizations.

Assign using a partner code

npx showpad apps assign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc

If you run the command without any additional options, a prompt will appear to select the app and version.

  1. Choose the desired app from the provided list.
  Loading apps... done
? select the app to assign (Use arrow keys)
❯ com.showpad.app.testapp.001
com.showpad.app.testapp.002
com.showpad.app.testapp.002
  1. Select the version of the app to be assigned.
  Loading versions... done
? select the version to assign (Use arrow keys)
❯ 1.0.0
1.0.1

Assign with options

npx showpad apps assign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc --partner-code f5053d37-0b7e-11ee-be56-0242ac120002  --app-version-id 01H28FJ5MM5TQQF942P56RHFZ9

Use --partner-code (repeatable) to specify one or more organizations, and --app-version-id to target a specific version.

Unassign an App

The apps unassign command unassigns a previously assigned version of your app from one or more Showpad organizations.

npx showpad apps unassign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc

If you run the command without any additional options, a prompt will appear to select the app and version.

  1. Choose the desired app from the provided list.
  Loading apps... done
? select the app to unassign (Use arrow keys)
❯ com.showpad.app.testapp.001
com.showpad.app.testapp.002
com.showpad.app.testapp.002
  1. Select the version of the app to be unassigned.
  Loading versions... done
? select the version to unassign (Use arrow keys)
❯ 1.0.0
1.0.1

Unassigning with options

npx showpad apps unassign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc --partner-code f5053d37-0b7e-11ee-be56-0242ac120002  --app-version-id 01H28FJ5MM5TQQF942P56RHFZ9

Use --partner-code (repeatable) to specify one or more organizations, and --app-version-id to target a specific version.

Next Steps

Was this page helpful?