Got an error { ret: { rtnCode: 50010003, rtnDesc: 'param error' } }
Tried with lang as ar_AE as well as ara_AE.
This error code 50010003 will come when you will provide any incorrect parameters . Please identify and check it.
For details please refer to: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-comment-returncode-0000001116028252
POST https://connect-api.cloud.huawei.com/api/reviews/v1/manage/dev/reviews
Content-Type: application/json
client_id: ***
Authorization: Bearer ***
requestId: xxxxxxx
{
"lang": "ara_AE",
"appId": "300148173",
"reviewId": "9f43c56228854d66a65921938199c0ce",
"devReplyContent": "Reply content......",
"countryCode": "AE"
}
For Details , please refer to: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-References/agcapi-com-reviewreply-0000001162548117
Related
I want to implement Password Autofill but I do not get it working. It fails with the following error:
Error Domain=NSOSStatusErrorDomain Code=-25293 ""beezleapp.com" failed to approve "N4EV3W64CV.com.beezleapp.beezle"" UserInfo={numberOfErrorsDeep=0, NSDescription="beezleapp.com" failed to approve "N4EV3W64CV.com.beezleapp.beezle"}
For this code:
SecAddSharedWebCredential(
"beezleapp.com" as CFString,
emailPw.email as CFString,
pw
)
This are my associated domains:
Bundle identifier:
Team ID:
This is my AASA file:
{
"applinks": {
"details": [
{
"appID": "N4EV3W64CV.com.beezleapp.beezle",
"paths": ["*"]
}
]
},
"webcredentials":{
"apps":[
"N4EV3W64CV.com.beezleapp.beezle"
]
},
"appclips":{
}
}
It is available at:
$ curl https://beezleapp.com/.well-known/apple-app-site-association
$ curl https://beezleapp.com/apple-app-site-association
What am I missing?
Turned out it was a DNS caching issue on the device side. I turned on Associated Domains Development in Settings -> Developer. Then it worked instantly.
I have a Groovy script which is run in the Jenkins script console. The script uses the JFrog Rest API to run some queries. One of which returns: status code: 404, reason phrase: Not Found
CURL:
$ curl -X GET -H "X-JFrog-Art-Api:APIKey" https://OU.jfrog.io/OU/api/storage/test-repository/docker-log-gen/1.12/manifest.json?properties
{
"properties" : { ... },
"uri" : "https://OU.jfrog.io/artifactory/api/storage/test-repository/docker-log-gen/1.12/manifest.json"
}
WGET
$ wget --header="X-JFrog-Art-Api:APIKey" https://OU.jfrog.io/OU/api/storage/test-repository/docker-log-gen/1.12/manifest.json?properties
--2020-01-14 13:12:16-- https://OU.jfrog.io/OU/api/storage/test-repository/docker-log-gen/1.12/manifest.json?properties
HTTP request sent, awaiting response... 200 OK
Jenkins Groovy
def restClient = new RESTClient('https://OU.jfrog.io')
restClient.headers['X-JFrog-Art-Api'] = 'APIKey'
println(restClient.get(path: '/OU/api/storage/test-repository/docker-log-gen/1.12/manifest.json?properties', requestContentType: 'text/plain') )
groovyx.net.http.HttpResponseException: status code: 404, reason phrase: Not Found
Other rest calls (api/docker) are made prior to this one in the script and return successfully. I am unable to identify a cause for this response, as shown the command-line calls return the expected JSON.
Please help.
The part after the first question mark is not the URI path component.
println(restClient.get(path: '/OU/api/storage/test-repository/docker-log-gen/1.12/manifest.json', query: ['properties': ''] , requestContentType: 'text/plain').data.text )
{
"properties" : { ... },
"uri" : "https://OU.jfrog.io/artifactory/api/storage/test-repository/docker-log-gen/1.12/manifest.json"
}
I deployed API Manager 2.1.0 and setup the api-import-export-2.1.0 war file described here. After importing my API endpoint by uploading a zip file the status=CREATED.
To actually publish the API I am calling the Publisher's change-lifecycle API but I am getting this exception:
TID: [-1234] [] [2017-07-06 11:11:57,289] ERROR
{org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper}
- An Unknown exception has been captured by global exception mapper.
{org.wso2.carbon.apimgt.rest.api.util.exception.GlobalThrowableMapper}
java.lang.NoSuchMethodError:
org.wso2.carbon.apimgt.api.APIProvider.changeLifeCycleStatus(Lorg/wso2/carbon/apimgt/api/model/APIIdentifier;Ljava/lang/String;)Z
Any ideas on why?
I can get an access token (scope apim:api_view) and call this
:9443/api/am/publisher/v0.10/apis
to list the api's just fine.
I get a different acces_token (for scope: apim:api_publish) and then call
:9443/api/am/publisher/v0.10/apis/change-lifecycle
but get the above Exception. Here's the example:
[root#localhost] ./publish.sh
View APIs (token dc0c1497-6c27-3a10-87d7-b2abc7190da5 scope: apim:api_view)
curl -k -s -H "Authorization: Bearer dc0c1497-6c27-3a10-87d7-b2abc7190da5" https://gw-node:9443/api/am/publisher/v0.10/apis
{
"count": 1,
"next": "",
"previous": "",
"list": [
{
"id": "d214f784-ee16-4067-9588-0898a948bb17",
"name": "Health",
"description": "health check",
"context": "/api",
"version": "v1",
"provider": "admin",
"status": "CREATED"
}
] }
Publish API (token b9a31369-8ea3-3bf2-ba3c-7f2a4883de7d scope: apim:api_publish)
curl -k -H "Authorization: Bearer b9a31369-8ea3-3bf2-ba3c-7f2a4883de7d" -X POST https://gw-node:9443/api/am/publisher/v0.10/apis/change-lifecycle?apiId=d214f784-ee16-4067-9588-0898a948bb17&action=Publish
{
"code":500,
"message":"Internal server error",
"description":"The server encountered an internal error. Please contact administrator.",
"moreInfo":"",
"error":[]
}
Issue resolved. In apim 2.1 the publisher & store API versions changed.
In apim 2.0 I was using:
:9443/api/am/publisher/v0.10/apis
:9443/api/am/store/v0.10/apis
but in apim 2.1 they are:
:9443/api/am/publisher/v0.11/apis
:9443/api/am/store/v0.11/apis
I can't seem to be able to post data using a TableController via postman.
I receive the following error:
{"message":"An error has occurred.","exceptionMessage":"Multiple actions were found that match the request: \r\nPostPerson on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetDomainManager on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetContext on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetContext on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController","exceptionType":"System.InvalidOperationException","stackTrace":" at System.Web.Http.Controllers.ApiControllerActionSelector.ActionSelectorCacheItem.SelectAction(HttpControllerContext controllerContext)\r\n at System.Web.Http.Controllers.ApiControllerActionSelector.SelectAction(HttpControllerContext controllerContext)\r\n at System.Web.Http.ApiController.ExecuteAsync(HttpControllerContext controllerContext, CancellationToken cancellationToken)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}
Looks like the server can't find the route. However all other actions/verbs work just fine (Patch, delete, get).
IN postman this is the code:
POST /tables/person HTTP/1.1
Host: localhost:43689
ZUMO-API-VERSION: 2.0.0
Content-Type: application/json
Cache-Control: no-cache
Postman-Token: 62bb9475-2b24-024a-b434-c9ddec0bcd9c
{
"deleted": false,
"id": "81FEF95A-2B61-4CE6-B9F7-FEBD572DADD1",
"avatar": "",
"notes": null,
"lastName": "Trumpet",
"middleName": "Ignacio",
"firstName": "Donald",
"userId": "81FEF95A-2B61-4CE6-B9F7-FEBD572DA876"
}
Any help is appreciated.
{"message":"An error has occurred.","exceptionMessage":"Multiple actions were found that match the request: \r\nPostPerson on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetDomainManager on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetContext on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController\r\nSetContext on type CEVault.Backend.NetStandard.Controllers.Mobile.PersonController","exceptionType":"System.InvalidOperationException",
According to your error message, I assumed that there are some actions (PostPerson, SetDomainManager,SetContext) in your PersonController.cs which could both match your posted request.
Per my understanding, if you have some internal methods which are used to handle your business logic, you could mark them as protected or private instead of public. Or you could leverage RouteAttribute (e.g. [Route("tables/TodoItem")]) to mark your actions for attribute-based routing. When using RouteAttribute, you need to enable it by adding the following code in the ConfigureMobileApp method of your Startup.MobileApp.cs:
config.MapHttpAttributeRoutes();
For more details, you could follow Adrian Hall's blog.
I'm trying to use the REST API by Barracuda ADC and/or WAF and, while it works when I use cURL (from the documentation):
Request:
$ curl
-X POST \
-H "Content-Type:application/json" \
-d '{"username": "admin", "password": "admin"}' \ http://10.11.19.104:8000/restapi/v2/login
Response:
{"token":"eyJldCI6IjEzODAyMzE3NTciLCJwYXNzd29yZCI6ImY3NzY2ZTFmNTgwMzgyNmE1YTAzZWZlMzcy\nYzgzOTMyIiwidXNlciI6ImFkbWluIn0=\n"}
Then we should use that token to execute commands on the API, something like:
$ curl
-X GET \
-H "Content-Type:application/json" \
-u 'eyJldCI6IjEzODAyMzE3NTciLCJwYXNzd29yZCI6ImY3NzY2ZTFmNTgwMzgyNmE1YTAzZWZlMzcy\nYzgzOTMyIiwidXNlciI6ImFkbWluIn0=\n': \
http://10.11.19.104:8000/restapi/v2/virtual_service_groups
And it'll give me a response listing (in this case) my virtual service groups, and it works with cURL.
Now, when I try to use ansible to do the same things, the first step to authenticate goes successfully (I can even use the generated token with cURL and it accepts it), but the second step to run the commands with the generated token always gives me 401 error (Invalid credentials):
- name: login into the load balancer
uri:
url: "{{ barracuda_url }}/login"
method: POST
body_format: json
body:
username: "{{ barracuda_user }}"
password: "{{ barracuda_pass }}"
headers:
Content-Type: application/json
return_content: yes
force_basic_auth: yes
register: login
tags: login, debug
- debug: msg="{{ login.json.token }}"
tags: debug
- name: get
uri:
url: "{{ barracuda_url }}/virtual_service_groups"
method: GET
body_format: json
user: "{{ login.json.token }}:"
headers:
Content-Type: application/json
return_content: yes
force_basic_auth: yes
register: response
Output of my playbook:
TASK [loadbalancer : login into the load balancer] *****************************
ok: [localhost]
TASK [loadbalancer : debug] ****************************************************
ok: [localhost] => {
"msg": "eyJldCI9IjE0ODQ2MDcxNTAiXCJwYXNzd29yZCI6IjRmM2TlYWMwN2ExNmUxYWFhNGEwNTU5NTMw\nZGQ3ZmM3IiwiaXNlciI6IndpYSJ9\n"
}
TASK [loadbalancer : get] ******************************************************
fatal: [localhost]: FAILED! => {"changed": false, "connection": "close", "content": "{\"error\":{\"msg\":\"Please log in to get valid token\",\"status\":401,\"type\":\"Invalid Credentials\"}}", "content_type": "application/json; charset=utf8", "date": "Mon, 16 Jan 2017 22:32:30 GMT", "failed": true, "json": {"error": {"msg": "Please log in to get valid token", "status": 401, "type": "Invalid Credentials"}}, "msg": "Status code was not [200]: HTTP Error 401: ", "redirected": false, "server": "BarracudaHTTP 4.0", "status": 401, "transfer_encoding": "chunked", "url": "http://10.11.19.104:8000/restapi/v2/virtual_service_groups"}
Remove the colon from "{{ login.json.token }}:" in user argument. Use:
user: "{{ login.json.token }}"
The colon is not a part of a username, but a curl syntax (used in your example to avoid an interactive password prompt):
-u, --user <user:password>
[ ]
If you simply specify the user name, curl will prompt for a password.