Skip to main content

Questions tagged [plugin-elementapi]

Plugin that makes it easy to create a JSON API for your elements, from Pixel & Tonic.

2 votes
1 answer
187 views

Extremely not a PHP developer here but trying to set up a simple API with Element API. I've got the basics working to filter my entry results based off of a query URL parameter: use craft\elements\...
kmgdev's user avatar
  • 1,221
1 vote
1 answer
106 views

I'm trying to move a large batch of users from a Craft 3 to a separate Craft 4 websites (only some selected data should be migrated). Element API + FeedMe looks like the right solution for that, as ...
Romain P.'s user avatar
  • 1,927
0 votes
1 answer
82 views

I have few entry ids from a plugin(donkeytail), and are arranged in an array, I need to loop through that array and get title, slug, etc of each entry. $entry->pins = ["106","122&...
Prashant sharma's user avatar
0 votes
0 answers
67 views

I am trying to get the element-api to output a valid geojson collection. The way the keys are set in the returned data make me think it isnt possible. To produce a valid string of json i am having ...
joomkit's user avatar
  • 2,082
0 votes
0 answers
100 views

I have an endpoint for searching entries via the element api. 'api/searchtherest.json' => function () { $section_handle = 'openFunding'; $criteria = [ '...
joomkit's user avatar
  • 2,082
1 vote
1 answer
86 views

I have the element api pulling back 1300 entries. One of the fields is storing geojson data and I had to change the type from text to mediumtext to accommodate some of the data stored. When I moved ...
joomkit's user avatar
  • 2,082
1 vote
0 answers
143 views

I'm creating a lazy load/infinite scroll based on the tutorial but I want it to grab entries that are in categories. It doesn't seem to be doing anything with it at all though. It's returning the list ...
Alyssa Tyler's user avatar
1 vote
0 answers
127 views

My problem is the following: I have a website with products which contains ratings. I have an element-api endpoint to get the products. I want to sort the products based on the average rating or the ...
Mathies Gielen's user avatar
1 vote
1 answer
1k views

I'm using the Element API Plugin to create an API, with which I want to get entries related to one category, but dynamically with the category set in the Url. What I have so far in the config/element-...
Malte's user avatar
  • 215
2 votes
1 answer
215 views

I've seen similar questions but none seem to help. I have two sections named jobs and jobDescriptions. I'm using the entries field to pull in a description field from the jobDescriptions section to ...
lanceb's user avatar
  • 23
1 vote
2 answers
209 views

I'm attempting to fetch SEO meta for entries inside of an element API, roughly following the advice in Element API integration Below is the exact code in my element-api.php: <?php use craft\...
cmal's user avatar
  • 815
2 votes
2 answers
585 views

I am using the Element API to search for entries that match a search query: either the title OR the excerpt should contain the query term. The entry is very simple and has these fields: -title -...
Wouter's user avatar
  • 33
1 vote
1 answer
435 views

Element API, query entries where relationship field ':empty:' AND the same relationship field with specified entry ID. Can't seem to figure out how to do this without performing two separate queries ...
Bransin's user avatar
  • 117
1 vote
1 answer
74 views

I need a few small bits of data from Craft in a PHP file. It’s a really small task, so I don’t want to delve into writing plugins or anything hardcore. It seemed to me the simplest way to approach it ...
mitrol's user avatar
  • 423
2 votes
1 answer
326 views

I need to get the currentSite in Element API. How can this be achieved? Is it as a slug in the endpoint URL? or as a Query param? Here is the current code: <?php use craft\elements\Entry; use ...
nfq's user avatar
  • 23

15 30 50 per page
1
2 3 4 5
16