Update an podio item field results in empty value - api

I am using Postman software to test update field of an item in Podio. The field is 'consomme-en-jh'. The value is updated in Podio with an empty value. Do I forget a key value in the body or another thing?[]

Looks like you are trying to use this api method: https://developers.podio.com/doc/items/update-item-field-values-22367
Please read docs on how to use it and follow cUrl example.
It's hard to tell from your screenshot, but verify:
Url should be like:
https://api.podio.com/item/<item-id>/value/<field-id>
Method is
PUT
Body is new value (and it depends on your field type, value
might be very different)

Related

Referencing input value by name in HTMX

I've started looking into using HTMX recently and I've ran accross a problem that I can't figure out. Essentially I have a select element which I use to make an http POST whenever the user makes a selection. In order to make that post however, I need to provide a token which is stored in the input about the select. Is there a way for me to reference in HTMX syntax the input from above using it's name "csrfmiddlewaretoken"?
So I figured out what my trouble was. In order for me to expand the payload of the hx-post request, what I needed to do was include the HTML elements that I wanted the contents of in the hx-post request. To do that you can use the hx-include attribute on the request emiting element, which references other elements by name and takes their value in the payload as a {name: value} pair.
<select name="sample_select" hx-post="link" hx-include="[name='csrfmiddlewaretoken']" hx-trigger="changed">...
The example select above would issue an HTTP Post request when the value of the select element would be changed. The request payload would then be
{
sample_select: selected_value;
csrfmiddlewaretoken: value
}
Keep in mind that if you have multiple elements on the same page with the same name, when you reference the name in the hx-include attribute then the HTMX library will take all the values from all the elements in the payload. I have not found a way to reference a specific element, or the closest one yet but if you know of a way please share.

Why I only getting id's back in response? IGDB api

I already read the documentation and I think I am making the simplest request in the correct way, but it always returns only the IDs, instead of all the fields of the games
Documentation example: Documentation Example
The request header is fine. I know this because I can get the expected request if fields = * as querystring
this is my request:
You have to provide the fields you want inside the body.
Like this:
fields age_ratings,aggregated_rating,aggregated_rating_count,alternative_names,artworks,bundles,category,checksum,collection,cover,created_at,dlcs,expansions,external_games,first_release_date,follows,franchise,franchises,game_engines,game_modes,genres,hypes,involved_companies,keywords,multiplayer_modes,name,parent_game,platforms,player_perspectives,rating,rating_count,release_dates,screenshots,similar_games,slug,standalone_expansions,status,storyline,summary,tags,themes,total_rating,total_rating_count,updated_at,url,version_parent,version_title,videos,websites;"

I want to pass the header value in methods

Scenario : I need to verify the logs response on server on the basis of Tracking-Id.
I had passed the tracking-id using 'header.js' file, here i define metod which get the unique UUID for every request and passed in header.
Now I need that header value to passed in some method to get logs only for specific Tracking-Id
Is there any way to achieve this in karate?
Yes, you can use karate.set('someVarName', uuidValue) in JS and then back in the feature you will be able to: * print someVarName.
EDIT: please see this commit for an example: link

Can we send multiple Properties in Json of Analytics(IBM MobileFirst)

I was asked for a usecase where I have to filter ActionEvents on type of Page that action is being is being called from.
Example
use case: I have a login page and I have to capture analytics of its events
Can I do something like this
String json = {"PageLevel":"LoginPage","ActionLevel":"LoginButton"};
WLAnalytics analytics=new WLAnalytics();
analytics.log(message, new JSONObject(json));
Will this work... can we create custom chart with first property being ActionLevel and filter it as per PageLevel.
No this will not work. Custom analytics can only be logged in key value pairs i.e. you cannot send two key value pairs in one JSON object. This is a good idea though, I recommend you submit an RFE.
Submit a Feature Request

YouTrack rest api - Get fields metadata

I want to create issues with the youtrack rest api,
Currently I'm using:
PUT /rest/issue?{project}&{summary}&{description}&{attachments}&{permittedGroup}
but I want to set other fields (priority, type, subsystem...)
How do I get a list of available fields from the api? and the fields metadata(is mandatory, field type...)?
And after that, How do I set the value of these fields?
I found this in the docs:
https://confluence.jetbrains.com/display/YTD6/Apply+Command+to+an+Issue
but it looks too complex for setting a field.
Issue can be created with following method and fields set only https://confluence.jetbrains.com/display/YTD6/Create+New+Issue . So as you mentioned, it's
PUT /rest/issue?{project}&{summary}&{description}&{attachments}&{permittedGroup}
It's assumed, other fields can be updated within next call. ApplyCommand (https://confluence.jetbrains.com/display/YTD6/Apply+Command+to+an+Issue)method is pretty good example of such a method.
If you need to know all available fields in the projects, here is the method https://confluence.jetbrains.com/display/YTD6/GET+Project+Custom+Fields.
Meta can be called with the following https://confluence.jetbrains.com/display/YTD6/GET+Project+Custom+Field. As you can see, details are available on per field basis.