-
Hi, I'm trying to learn more about the APIs available in Orchard Core, especially regarding GraphQL. I'm interested in whether it's possible to create, update, or delete a Content Item instance through APIs. I've looked at the documentation, but the details on how it works aren't clear to me. For updating and deleting a Content Items instance, do I need to create my own ApiController, or does Orchard Core, with its dynamic types, already provide a way to handle these operations? Could you suggest how I might create, update, or delete a Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 18 replies
-
Looking at the Orchard Core solution, and going deeper into the issues (not the discussions), I found a useful issue here that is similar to my case. In the end, the module @Skrypt, I mention you because you also replied to the issue I mentioned before. Can I add information about these endpoints in the documentation? Because I think it's a significant omission. Is it appropriate to add this information to the Content Types docs? Thank you |
Beta Was this translation helpful? Give feedback.
-
Using Postman, it's possible to call the Could this issue be related to the user not having the permission at line 43? However, my user has the This is the part at line 43: [Route("{contentItemId}"), HttpGet]
public async Task<IActionResult> Get(string contentItemId)
{
if (!await _authorizationService.AuthorizeAsync(User, Permissions.AccessContentApi))
{
return this.ChallengeOrForbid("Api");
}
[...]
} Any suggestions? |
Beta Was this translation helpful? Give feedback.
-
Could you try Swagger Module https://github.com/OrchardCoreContrib/OrchardCoreContrib.Modules/blob/main/src/OrchardCoreContrib.Apis.Swagger/README.md |
Beta Was this translation helpful? Give feedback.
Looking at the Orchard Core solution, and going deeper into the issues (not the discussions), I found a useful issue here that is similar to my case.
In the end, the module
OrchardCore.Contents
exposes anApiController.cs
with endpoints to create, update, and delete content items created in the "Admin" backoffice using Postman (and the OpenID Connect module for the authentication).@Skrypt, I mention you because you also replied to the issue I mentioned before. Can I add information about these endpoints in the documentation? Because I think it's a significant omission.
Is it appropriate to add this information to the Content Types docs?
Thank you