AppRequests

View as Markdown

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.

NameTypeDescription
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.

NameTypeDescription
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.

NameTypeDescription
skipNumber

Offset for skipping content in response

limitNumber

Limit on API response to provide content in the list

orderMust be one of ['asc', 'desc', 'ASC', 'DESC']

Specify the order in which the apps should appear in the response, either ascending or descending.

sortMust be one of ['name', 'updated_at', 'created_at']

The order in which apps are sorted.

searchString

String for search by app name

target_uidString

Search based on stack

target_typeMust 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));