-
Notifications
You must be signed in to change notification settings - Fork 28
Implemented WebApi Requests
This page will list all implemented WebApi requests.
The base for the to-be-implemented requests are the MSDN references for actions and functions.
At this point of time, the following requests are implemented and can be executed:
##CalculateRollupField Calculates the value of a rollup attribute. ##CalculateTotalTimeIncident Calculates the total time, in minutes, that you used while you worked on an incident (case). ##CheckIncomingEmail Check whether the incoming email message is relevant to the Microsoft Dynamics 365 system. ##CheckPromoteEmail Contains the data that is needed to check whether the incoming email message should be promoted to the Microsoft Dynamics 365 system. ##DownloadReportDefinition Downloads a report definition. ##ExpandCalendar Converts the calendar rules to an array of available time blocks for the specified period. ##ExportFieldTranslation Exports localizable fields values to a compressed file. ##FetchXmlToQueryExpression Converts a query in FetchXML to a QueryExpression. ##FindParentResourceGroup Finds a parent resource group (scheduling group) for the specified resource groups (scheduling groups). ##GetAllTimeZonesWithDisplayName Retrieves all the time zone definitions for the specified locale and to return only the display name attribute. ##GetDefaultPriceLevel Retrieves the default price level (price list) for the current user based on the user’s territory relationship with the price level. ##GetDistinctValuesImportFile Retrieves distinct values from the parse table for a column in the source file that contains list values. ##GetHeaderColumnsImportFile Retrieves the source-file column headings; or retrieve the system-generated column headings if the source file does not contain column headings. ##GetQuantityDecimal Gets the quantity decimal value of a product for the specified entity in the target. ##GetReportHistoryLimit Retrieves the history limit for a report. ##GetTimeZoneCodeByLocalizedName Retrieves the time zone code for the specified localized time zone name. ##GetValidManyToMany Retrieves a list of all the entities that can participate in a Many-to-Many entity relationship. ##GetValidReferencedEntities Retrieves a list of entity logical names that are valid as the primary entity (one) from the specified entity in a one-to-many relationship. ##GetValidReferencingEntities Retrieves the set of entities that are valid as the related entity (many) to the specified entity in a one-to-many relationship. ##IncrementKnowledgeArticleViewCount Increments the per day view count of a knowledge article record. ##InitializeFrom Initializes a new record from an existing record. ##IsComponentCustomizable Determines whether a solution component is customizable. ##IsDataEncryptionActive Determines whether data encryption is currently running (active or inactive). ##IsValidStateTransition Validates the state transition. ##QueryMultipleSchedules Searches multiple resources for available time block that matches the specified parameters. ##QuerySchedule Searches the specified resource for an available time block that matches the specified parameters. ##RetrieveAbsoluteAndSiteCollectionUrl Retrieves the absolute URL and the site collection URL for a SharePoint location record in Microsoft Dynamics 365. ##RetrieveActivePath TODO: RetrieveActivePath Function Description (No Joke, MS description) ##RetrieveAllChildUsersSystemUser Retrieves the collection of users that report to the specified system user (user). ##RetrieveAllEntities Retrieves metadata information about all the entities. ##RetrieveApplicationRibbon Retrieve the data that defines the content and behavior of the application ribbon. ##RetrieveAuditPartitionList Retrieves the list of database partitions that are used to store audited history data. ##RetrieveAvailableLanguages Retrieves the list of language packs that are installed and enabled on the server. ##RetrieveBusinessHierarchyBusinessUnit Retrieves all business units from the business unit hierarchy. ##RetrieveByGroupResource Retrieves all resources that are related to the specified resource group ##RetrieveByResourceResourceGroup Retrieves the resource groups (scheduling groups) that contain the specified resource. ##RetrieveByResourcesService Retrieve the collection of services that are related to the specified set of resources. ##RetrieveByTopIncidentProductKbArticle Retrieves the top-ten articles about a specified product from the knowledge base of articles for the organization ##RetrieveByTopIncidentSubjectKbArticle Retrieves the top-ten articles about a specified subject from the knowledge base of articles for your organization. ##RetrieveCurrentOrganization Retrieve information about the current organization. ##RetrieveDataEncryptionKey Retrieves the data encryption key value. ##RetrieveDependenciesForDelete Retrieves a collection of dependency records that describe any solution components that would prevent a solution component from being deleted. ##RetrieveDependenciesForUninstall Retrieves a list of the solution component dependencies that can prevent you from uninstalling a managed solution. ##RetrieveDependentComponents Retrieves a list dependencies for solution components that directly depend on a solution component. ##RetrieveDeploymentLicenseType Retrieves the type of license for a deployment of Microsoft Dynamics 365. ##RetrieveDeprovisionedLanguages Retrieves a list of language packs that are installed on the server that have been disabled. ##RetrieveDuplicates Detects and retrieves duplicates for a specified record. ##RetrieveEntityChanges Retrieve the changes for an entity. ##RetrieveEntityRibbon Retrieves ribbon definitions for an entity. ##RetrieveExchangeAppointments Retrieves the appointments for the current user for a specific date range from the exchange web service. ##RetrieveExchangeRate Retrieves the exchange rate. ##RetrieveFilteredForms Retrieves the entity forms that are available for a specified user. ##RetrieveFormattedImportJobResults Retrieves the formatted results from an import job. ##RetrieveInstalledLanguagePacks Retrieves the list of language packs that are installed on the server. ##RetrieveInstalledLanguagePackVersion Retrieves the version of an installed language pack. ##RetrieveLicenseInfo Retrieves the number of used and available licenses for a deployment of Microsoft Dynamics 365. ##RetrieveLocLabels Retrieves localized labels for a limited set of entity attributes.
###Example
var viewId = "31089fd8-596a-47be-9c9c-3ff82c7a8f8c";
var request = WebApiClient.Requests.RetrieveLocLabelsRequest
.with({
urlParams: {
EntityMoniker: "{'@odata.id':'savedqueries(" + viewId + ")'}",
AttributeName: "'name'",
IncludeUnpublished: true
}
});
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##RetrieveMailboxTrackingFolders Retrieves folder-level tracking rules for a mailbox. ##RetrieveMembersBulkOperation Retrieves the members of a bulk operation. ##RetrieveMissingComponents Retrieves a list of missing components in the target organization. ##RetrieveMissingDependencies Retrieves any required solution components that are not included in the solution. ##RetrieveOrganizationResources Retrieves the resources that are used by an organization. ##RetrieveParentGroupsResourceGroup Retrieves the collection of the parent resource groups of the specified resource group (scheduling group). ##RetrieveParsedDataImportFile Retrieves the data from the parse table. ##RetrievePersonalWall Retrieves pages of posts, including comments for each post, for all records that the calling user is following. ##RetrievePrincipalAccess Retrieves the access rights of the specified security principal (team or user) to the specified record. ##RetrievePrincipalAttributePrivileges Retrieves all the secured attribute privileges a user or team has through direct or indirect (through team membership) associations with the FieldSecurityProfile entity. ##RetrievePrincipalSyncAttributeMappings For internal use only. ##RetrievePrivilegeSet Retrieves the set of privileges defined in the system. ##RetrieveProcessInstances TODO: RetrieveProcessInstances Function Description (By MS) ##RetrieveProductProperties Retrieve all the property instances (dynamic property instances) for a product added to an opportunity, quote, order, or invoice. ##RetrieveProvisionedLanguagePackVersion Retrieves the version of a provisioned language pack. ##RetrieveProvisionedLanguages Retrieves the list of provisioned languages. ##RetrieveRecordWall Retrieves pages of posts, including comments for each post, for a specified record. ##RetrieveRequiredComponents Retrieves a collection of solution components that are required for a solution component. ##RetrieveRolePrivilegesRole Retrieves the privileges that are assigned to the specified role. ##RetrieveSubGroupsResourceGroup Retrieves the collection of child resource groups from the specified resource group. ##RetrieveTeamPrivileges Retrieves the privileges for a team. ##RetrieveTimestamp Retrieves a time stamp for the metadata. ##RetrieveUnpublishedMultiple Retrieves a collection of unpublished organization-owned records that satisfy the specified query criteria. ##RetrieveUserPrivileges Retrieves the privileges a system user (user) has through his or her roles in the specified business unit. ##RetrieveUserQueues Retrieves all private queues of a specified user and optionally all public queues. ##RetrieveVersion Retrieves the version number of the Microsoft Dynamics 365 Server. ##Rollup Retrieves all the entity records that are related to the specified record. ##Search Searches for available time slots that fulfill the specified appointment request. ##SearchByBodyKbArticle Searches for knowledge base articles that contain the specified body text. ##SearchByKeywordsKbArticle Searches for knowledge base articles that contain the specified keywords. ##SearchByTitleKbArticle Searches for knowledge base articles that contain the specified title. ##ValidateRecurrenceRule Validates a rule for a recurring appointment. ##WhoAmI Retrieves the system user ID for the currently logged on user or the user under whose context the code is running.
###Example
var request = WebApiClient.Requests.WhoAmIRequest;
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##AddItemCampaign Adds an item to a campaign. ##AddItemCampaignActivity Adds an item to a campaign activity. ##AddListMembersList Adds members to a list. ##AddMemberList Adds a member to a list (marketing list). ##AddMembersTeam Adds members to a team. ##AddPrincipalToQueue Adds the specified principal to the list of queue members. ##AddPrivilegesRole Adds a set of existing privileges to an existing role. ##AddRecurrence Adds recurrence information to an existing appointment. ##AddSolutionComponent Adds a solution component to an unmanaged solution. ##AddToQueue Moves an entity record from a source queue to a destination queue.
var request = WebApiClient.Requests.AddToQueueRequest
.with({
entityId: "56ae8258-4878-e511-80d4-00155d2a68d1",
payload: {
Target: {
activityid: "59ae8258-4878-e511-80d4-00155d2a68d1",
"@odata.type": "Microsoft.Dynamics.CRM.letter"
}
}
});
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##AddUserToRecordTeam Adds a user to the auto created access team for the specified record. ##ApplyRecordCreationAndUpdateRule Applies record creation and update rules to activities in 365 created as a result of the integration with external applications. ##ApplyRoutingRule Applies the active routing rule to an incident. ##AutoMapEntity Generates a new set of attribute mappings based on the metadata. ##Book Schedules or "books" an appointment, recurring appointment, or service appointment (service activity). ##BulkDelete Submits a bulk delete job that deletes selected records in bulk. This job runs asynchronously in the background without blocking other activities. ##BulkDetectDuplicates Submits an asynchronous system job that detects and logs multiple duplicate records. ##CalculateActualValueOpportunity Calculates the value of an opportunity that is in the "Won" state. ##CalculatePrice Calculates price in an opportunity, quote, order, and invoice. ##CanBeReferenced Checks whether the specified entity can be the primary entity (one) in a one-to-many relationship. ##CanBeReferencing Checkes whether an entity can be the referencing entity in a one-to-many relationship. ##CancelContract Cancels a contract. ##CancelSalesOrder Cancels a sales order. ##CanManyToMany Checks whether an entity can participate in a many-to-many relationship. ##CloneAsPatch Creates a solution patch from a managed or unmanaged solution. ##CloneAsSolution Creates a new copy of an unmanged solution that contains the original solution plus all of its patches. ##CloneContract Copies an existing contract and its line items. ##CloneMobileOfflineProfile For internal use only. ##CloneProduct Copies an existing product family, product, or bundle under the same parent record. ##CloseIncident Closes an incident (case). ##CloseQuote Closes a quote. ##CompoundUpdateDuplicateDetectionRule Updates a duplicate rule (duplicate detection rule) and its related duplicate rule conditions. ##ConvertOwnerTeamToAccessTeam Converts a team of type owner to a team of type access. ##ConvertProductToKit Converts a product to a kit. ##ConvertQuoteToSalesOrder Converts a quote to a sales order. ##ConvertSalesOrderToInvoice Converts a sales order to an invoice. ##CopyCampaign Copies a campaign. ##CopyCampaignResponse Creates a copy of a campaign response ##CopyDynamicListToStatic Creates a static list from the specified dynamic list and add the members that satisfy the dynamic list query criteria to the static list. ##CopyMembersList Copies the members from the source list to the target list without creating duplicates. ##CopySystemForm Creates a new entity form that is based on an existing entity form. ##CreateActivitiesList Creates a quick campaign to distribute an activity to members of a list (marketing list). ##CreateCustomerRelationships Creates a new customer lookup attribute, and optionally, to add it to a specified unmanaged solution. ##CreateException Creates an exception for the recurring appointment instance. ##CreateInstance Creates future unexpanded instances for the recurring appointment master. ##CreateKnowledgeArticleTranslation Creates translation of a knowledge article instance. ##CreateKnowledgeArticleVersion Creates a major or minor version of a knowledge article instance. ##CreateWorkflowFromTemplate Creates a workflow (process) from a workflow template. ##DeleteAndPromote Replaces managed solution (A) plus all of its patches with managed solution (B) that is the clone of (A) and all of its patches. ##DeleteAuditData Deletes all audit data records up until a specified end date. ##DeleteOpenInstances Deletes instances of a recurring appointment master that have an “Open” state. ##DeleteOptionValue Deletes an option value in a global or local option set. ##DeliverIncomingEmail Creates an email activity record from an incoming email message. ##DeliverPromoteEmail Creates an email activity record from the specified email message ##DeprovisionLanguage Deprovisions a language. ##DistributeCampaignActivity Creates a bulk operation that distributes a campaign activity. ##ExecuteWorkflow Executes a workflow. ##ExportMappingsImportMap Exports a data map as an XML formatted data. ##ExportSolution Exports a solution. ##ExportTranslation Exports all translations for a specific solution to a compressed file. ##FulfillSalesOrder Fulfills a sales order. ##FullTextSearchKnowledgeArticle Performs a full-text search on knowledge articles in Dynamics 365 using the specified search text. ##GenerateInvoiceFromOpportunity Generates an invoice from an opportunity. ##GenerateQuoteFromOpportunity Generates a quote from an opportunity. ##GenerateSalesOrderFromOpportunity Generates a sales order (order) from an opportunity. ##GenerateSocialProfile Returns an existing social profile record if one exists, otherwise generates a new one and returns it. ##GetInvoiceProductsFromOpportunity Retrieves the products from an opportunity and copy them to the invoice. ##GetQuoteProductsFromOpportunity Retrieves the products from an opportunity and copy them to the quote. ##GetSalesOrderProductsFromOpportunity Retrieves the products from an opportunity and copy them to the sales order. ##GetTrackingTokenEmail Returns a tracking token that can then be passed as a parameter to the SendEmailRequest message. ##ImportFieldTranslation Imports translations from a compressed file. ##ImportMappingsImportMap Imports the XML representation of a data map and create an import map (data map) based on this data. ##ImportRecordsImport Submits an asynchronous job that uploads the transformed data into Microsoft Dynamics 365. ##ImportSolution Imports a solution. ##ImportTranslation Imports translations from a compressed file. ##InsertOptionValue Inserts a new option value for a global or local option set. ##InsertStatusValue Inserts a new option into a StatusAttributeMetadata attribute. ##InstallSampleData Installs the sample data. ##InstantiateFilters Instantiates a set of filters for Dynamics 365 for Outlook for the specified user. ##InstantiateTemplate Creates an email message from a template (email template). ##LockInvoicePricing Locks the total price of products and services that are specified in the invoice. ##LockSalesOrderPricing Locks the total price of products and services that are specified in the sales order (order). ##LoseOpportunity Sets the state of an opportunity to Lost. ##Merge Merges the information from two entity records of the same type. ##OrderOption Sets the order for an option set. ##ParseImport Submits an asynchronous job that parses all import files that are associated with the specified import (data import). ##PickFromQueue Assigns a queue item to a user and optionally remove the queue item from the queue. ##ProcessInboundEmail Processes the email responses from a marketing campaign. ##PropagateByExpression Creates a quick campaign to distribute an activity to accounts, contacts, or leads that are selected by a query. ##ProvisionLanguage Provisions a new language. ##PublishAllXml Publishes all changes to solution components. ##PublishDuplicateRule Submits an asynchronous job to publish a duplicate rule. ##PublishProductHierarchy Publishes a product family record and all its child records. ##PublishTheme Publishes a theme and set it as the current theme. ##PublishXml Publishes specified solution components.
var xml = "<importexportxml><entities><entity>account</entity></entities></importexportxml>";
var request = WebApiClient.Requests.PublishXmlRequest
.with({
payload: {
ParameterXml: xml
}
});
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##QualifyLead Qualifies a lead and create account, contact, and opportunity records that are linked to the originating lead record. ##QualifyMemberList Qualifies the specified list and either override the list members or remove them according to the specified option. ##QueryExpressionToFetchXml Converts a QueryExpression query to its equivalent FetchXML query ##ReassignObjectsOwner Reassigns all records that are owned by the security principal (user or team) to another security principal (user or team). ##ReassignObjectsSystemUser Reassigns all records that are owned by a specified user to another security principal (user or team). ##Recalculate Recalculate system-computed values for rollup fields in the goal hierarchy. ##ReleaseToQueue Assigns a queue item back to the queue owner so others can pick it. ##RemoveFromQueue Removes a queue item from a queue. ##RemoveMembersTeam Removes members from a team. ##RemoveParent Removes the parent for a system user (user) record. ##RemovePrivilegeRole Removes a privilege from an existing role. ##RemoveSolutionComponent Removes a component from an unmanaged solution. ##RemoveUserFromRecordTeam Removes a user from the auto created access team for the specified record. ##RenewContract Renews a contract and create the contract details for a new contract. ##RenewEntitlement Renews an entitlement. ##ReplacePrivilegesRole Replaces the privilege set of an existing role. ##Reschedule Reschedules an appointment, recurring appointment, or service appointment (service activity). ##ResetUserFilters Resets the offline data filters for the calling user to the default filters for the organization. ##RevertProduct Reverts changes done to properties of a product family, product, or bundle record, and set it back to its last published (active) state. ##ReviseQuote Sets the state of a quote to Draft. ##RevokeAccess Replaces the access rights on the target record for the specified security principal (user or team). ##RouteTo Routes a queue item to a queue, a user, or a team. ##SendBulkMail Sends bulk email messages. ##SendEmail Sends an e-mail message.
###Example
// Execute from console when on a draft email form
var request = WebApiClient.Requests.SendEmailRequest
.with({
entityId: frames[0].Xrm.Page.data.entity.getId(),
payload: {
IssueSend: true
}
});
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##SendEmailFromTemplate Sends an e-mail message to a recipient using an e-mail template. ##SendFax Sends a fax. ##SendTemplate Sends a bulk email message that is created from a template. ##SetBusinessEquipment Assigns equipment (facility/equipment) to a specific business unit. ##SetBusinessSystemUser Moves a system user (user) to a different business unit. ##SetDataEncryptionKey Sets or restore the data encryption key. ##SetFeatureStatus TODO: SetFeatureStatus Action Description (Obviously no description yet) ##SetLocLabels Sets localized labels for a limited set of entity attributes.
var viewId = "31089fd8-596a-47be-9c9c-3ff82c7a8f8c";
var request = WebApiClient.Requests.SetLocLabelsRequest
.with({
payload: {
Labels: [],
EntityMoniker: {
"@odata.type": "Microsoft.Dynamics.CRM.savedquery",
savedqueryid: viewId
},
AttributeName: "name"
}
});
WebApiClient.Execute(request)
.then(function(response){
// Process response
})
.catch(function(error) {
// Handle error
});
##SetParentSystemUser Sets a new parent system user (user) for the specified user. ##SetProcess Sets the process that associates with a given target entity. The user can set to another business process or specify null to clear out the current process. ##SetReportRelated Links an instance of a report entity to related entities. ##TransformImport Submits an asynchronous job that transforms the parsed data. ##TriggerServiceEndpointCheck Validates the configuration of a Microsoft Azure Service Bus solution’s service endpoint. ##UninstallSampleData Uninstalls the sample data. ##UnlockInvoicePricing Unlocks pricing for an invoice. ##UnlockSalesOrderPricing Unlocks pricing for a sales order (order). ##UnpublishDuplicateRule Submits an asynchronous job to unpublish a duplicate rule. ##UpdateFeatureConfig TODO: UpdateFeatureConfig Action Description (Missing) ##UpdateOptionValue Updates an option value in a global or local option set. ##UpdateProductProperties Updates values of the property instances (dynamic property instances) for a product added to an opportunity, quote, order, or invoice. ##UpdateSolutionComponent Updates a component in an unmanaged solution. ##UpdateStateValue Updates an option set value in for a StateAttributeMetadata attribute. ##Validate Verifies that an appointment or service appointment (service activity) has valid available resources for the activity, duration, and site, as appropriate. ##ValidateSavedQuery Validates a saved query. ##WinOpportunity Sets the state of an opportunity to Won. ##WinQuote Sets the state of a quote to Won.