AppRequests
AppRequests
The AppRequests class creates, deletes, or retrieves the app requests made by the user.
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').appRequests();delete
The delete method deletes an app request of an app in target_uid.
| Name | Type | Description |
|---|---|---|
| requestUID (required) | String | The ID of the request to be deleted |
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').appRequests().delete('request_uid`)
.then((response) => console.log(response));create
The create method creates an app request.
| Name | Type | Description |
|---|---|---|
| appUid (required) | String | The UID for the app for request |
| targetUid (required) | String | The UID of the target, on which the app will be installed |
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').appRequests().create({ appUid: 'app_uid', targetUid: 'target_uid' })
.then((response) => console.log(response));findAll
The findAll method retrieves the requests of all apps in an organization.
| Name | Type | Description |
|---|---|---|
| skip | Number | Offset for skipping content in response |
| limit | Number | Limit on API response to provide content in the list |
| order | Must be one of ['asc', 'desc', 'ASC', 'DESC'] | Specify the order in which the apps should appear in the response, either ascending or descending. |
| sort | Must be one of ['name', 'updated_at', 'created_at'] | The order in which apps are sorted. |
| search | String | String for search by app name |
| target_uid | String | Search based on stack |
| target_type | Must be one of ['stack','organization'] | Specify whether the app you are looking for is a stack app or an organization app |
Example:
import * as contentstack from '@contentstack/marketplace-sdk'
const client = contentstack.client({ authtoken: 'TOKEN'});
client.marketplace('organization_uid').appRequests().findAll({ skip: 10, limit: 10, order: 'asc' })
.then((response) => console.log(response));