Multiple Values in QraphQL request for coustom API in Liferay - rest

[
I have created a custom API and I need to get data from GraphQL but I am getting an error of 500 "Internal Server error".
API has a get method and I need to add multiple string values or JSON in the request body.
I have attached a screenshot of GraphQL.
]
1

Related

Purview API - 412 error when doing GET request?

I have a AWS Lambda Pipeline that makes API calls to the Purview API and has been working fine until yesterday.
The error occasionally I get is as below:
{'requestId': 'xxxxxx-xxxx-xxxx-xxxxxx', 'errorCode': 'PreConditionCheckFailed', 'errorMessage': 'Pre-condition check failed. Please fetch latest data from Catalog service and update again. Conflict object ID: xxxxx-xxxxx-xxxx-xxxxxxx'}
Some additional info:
From some googling, I understand that this might be an error that is described to only pop up from any other API requests other than GET, so not sure why I'm getting this here when I'm only using GET requests
the API endpoint is: https://learn.microsoft.com/en-us/rest/api/purview/catalogdataplane/entity/get-by-guid
the API call returns the error when I try to use a GUID for a table's column. But, in the error, the 'conflict object ID' is the GUID for the table
I rescanned data sources and assets, replaced collections in Purview but still get the same error
Anyone have any ideas why?

keycloak - does keycloak have any endpoint to get list of user paginated

I am trying to get list of user paginated
I tried work with this endpoint
GET /admin/realms/{realm}/users
but the response contain all the user.
Endpoint GET /admin/realms/{realm}/users supports pagination (look at method source code)
Just add query params first & max to your request. For example:
/auth/admin/realms/<your realm>/users?briefRepresentation=true&first=0&max=5
P.S. Total records count will be returned in response headers

API requester generation using z/OS Connect build toolkit

While we generate API requester artifacts using zconbt commandline tool and the API specification file the zconbt is not generating copybooks for multiple error responses. Suppose in the API swagger file we have defined response schema for HTTP codes 200, 400, 500 where the response schema definition is different for each of these responses. Now if we generate the copybooks using zconbt the zconbt ignores the response schema for 400 and 500 and generates the response copybook structure for 200 code only. Now when we invoke this API from MF and get a response with status code 400 and response message as per defined in the swagger for 400 then zcee is not able to transform and send the message back to the MF in a proper copybook variable. This is because the response schema for 400 was already ignored by zconbt in the first place.
So my question is do we have a work around to handle this type of scenario where we need to have all the error response schema available via cobol copybooks for handling the the error responses as well.
As you have said the API Requester functionality in z/OS Connect EE only provides JSON to COBOL transformation for the success case on an API call.
If the API call completes with something other than the success case, then the response information is returned as-is in the BAQ-RESPONSE-API structure.
Based on the example in the Knowledge Center you could process these responses as follows:
WHEN BAQ-ERROR-IN-API
EVALUATE BAQ-STATUS-CODE
WHEN 400
DISPLAY "Invalid Pet ID"
WHEN 500
DISPLAY "No pet found with ID "
WHEN OTHER
DISPLAY "API returned error "
BAQ-STATUS-CODE
END-EVALUATE
The JSON response is available in the BAQ-STATUS-MESSAGE field and could be parsed using the JSON support in COBOL or PL/I if required.

Google analitycs API. Get data by xmla

Whether there is a possibility of obtaining data and metadata via xmla?
I want to connect to xmla server via olap4j and visualize data from google.
Google analytics v3 returns Json not xml. No way to change that.
If successful, this request returns a response body with the JSON
structure defined below. If the output parameter is set to dataTable
then the request returns a response body with the JSON (Data Table)
structure defined below.

postman usage - how to input parameters

My rest service method demands an input parameter. I want to see data structure via postman. How can I add arguments in postman app? I get the error:
HTTP Status 500 - The bean encountered a non-application exception;
nested exception is: The server encountered an internal error that
prevented it from fulfilling this request.
Suppose that you are doing a POST, or a PUT, you want to add your data in XML or JSON or plaintext to the request.
You need to set the URL, and the right HTTP method. Once you choose, suppose POST, you can edit the data to be sent. I choose the raw input type and write inside it what I want to send to the server.
You may get 500 as server error due to error in the logic of the offered service, try to encapsulate your entity and send agin the request..