Assign to Organizations
To manage app assignments to other organizations, you must have:
- the
versionIDof 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
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:
-
Ensure you have the
versionIdof the version you want to unassign. -
Retrieve a list of the version's current organization assignments:
GET /app-portal/v1/versions/{versionId}/assignmentsResponse 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"
}
]
} -
Find the
idof the organization that the version should be unassigned from. -
Using the
idyou 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 Contentresponse 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
- npm
- yarn
npx showpad apps assign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc
yarn 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.
- 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
- 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
- npm
- yarn
npx showpad apps assign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc --partner-code f5053d37-0b7e-11ee-be56-0242ac120002 --app-version-id 01H28FJ5MM5TQQF942P56RHFZ9
yarn 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.
- npm
- yarn
npx showpad apps unassign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc
yarn 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.
- 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
- 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
- npm
- yarn
npx showpad apps unassign --partner-code 718b2b4d-8eb3-4bc6-91b9-49c4cd28f8bc --partner-code f5053d37-0b7e-11ee-be56-0242ac120002 --app-version-id 01H28FJ5MM5TQQF942P56RHFZ9
yarn 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
- Install and Manage Apps - guide for organization administrators installing your app
Was this page helpful?