Skip to main content

Publish data to Search

Important

The Search API is currently in Early Availability status. For more information, see Product lifecycle phases.

Publish data to Search

Description: Use the Publish content events endpoint to send and update resources, content, and user data, in the AppDirect Search repository.

By default, when a user and product are connected to Search, the user has visibility for the associated resources so they can appear in the user's search results.

tip

Understanding Search data structure is key to understanding this endpoint. See the Search data structure and terminology section in Search.

You can update data as follows:

  • Publish new or changed resource, content, and user data to the Search repository.

  • Delete a user from a resource. When a user is deleted from a resource, their visibility for the resource is revoked, so the resource does not appear in the user's search results.

  • Delete content from a resource.

  • Delete a resource from the Search repository.

API reference documentation: Publish content events

Endpoint URL: {base marketplace URL}/api/appwise/v2/data

The {base marketplace URL} is the base URL for the marketplace that hosts the user account.

Request operation: POST

Authentication: Product-scoped OAuth2 authentication is required. See API authentication.

Prerequisites:

When you send the API request, some parameters are always required and others are only required under specific conditions (see Required parameters in this topic for details).

  • The key is assigned and provided by the vendor.

  • To retrieve the identifier parameter value:

    The identifier parameter value identifies a user who has visibility for a resource (the resource appears in query results for the user). It is also known as the accountName, and is constructed as follows: {user_handle}@{user_uuid}@{company_uuid}. If you do not have the user's AccountName, use one of the following sources:

    • If the response from the Create user connection request is available, refer to it for the accountName.

    • If the response from the Create user connection request is not available, use the endpoints that appear in the following table to retrieve the values that you need to construct the accountName:

Endpoint sources for required request parameter values:

Required request parameterEndpoint for retrievalResponse property that contains the value
[userToConnect object] handlen/a—assigned and provided by the vendor
[userToConnect object] userid—the user's UUIDList all usersuuid
[userToConnect object] companyid—the company's UUIDRead user membershipsCompanyAccountV2.uuid

 

Required parameters in requests to add or change data:

The request parameters that are optionally required are dependent on several factors, such as, the action (addition/change or delete) and the data being acted upon (the user, resource, or content).

  • key—Unique key that identifies the data that is new or changed. Provided by the vendor. Always required.
  • [Action object] text—If [Action object] delete is false, text is required. See Action.
  • [Action object] verb—If [Action object] delete is false, text is required. See Action.
  • [ContentEventActor object] identifier—The accountName of the application user who added or changed the resource. Format: {user_handle}@{user_uuid}@{company_uuid}. Required for resource updates made by a user. Not required for content updates or system-generated updates.
  • [Changes object] fields—The fields that were added or changed. Required for resource changes and additions ([ContentEventType object] is ResourceCreated or ResourceUpdated). Not required for content updates ([ContentEventType object] is ResourceContentUpdated). Must not be submitted for deletions (when [Action object] delete is true).
  • [ContentEventField object] name—Unique name for the field that was added or changed. Required for additions and changes. Must not be submitted for deletions (when [Action object] delete is true).
  • [ContentEventField object] value—Field value. The new or change field value. Required for additions or changes. Must not be submitted for deletions (when action.delete is true).
  • [ContentEventUser object] identifier—Identifies an application user who has visibility for a resource (it appears in query results for the user). Resources can be visible to more than one user. Value: The user's AccountName. Format: {user_handle}@{user_uuid}@{company_uuid}. Required to create resources.
  • [Content object] url—URL that supplies content that augments a resource. For example, a PDF. Required to for content additions and changes.

Additional required parameters for delete requests:

  • [ContentEventUser object] delete—To delete a user from a resource, must be true. The resource will no longer be visible to the user (will not appear in query results).
  • [Content object] delete—To delete content from a resource, must be true. Required for content deletions.
  • [Action object] delete—To delete a resource from the Search repository, must be true. Required to delete a resource.

JSON examples:

For request and response JSON examples, see Publish content events in the reference documentation.

Was this page helpful?