I am trying to integrate XRAY with webdriver IO , mocha using the guide below
https://docs.getxray.app/display/XRAYCLOUD/Testing+web+applications+using+Mocha+and+WebdriverIO#tab-API
The below -
curl -H "Content-Type: application/json" -X POST --data '{ "client_id": "CLIENTID","client_secret": "CLIENTSECRET" }' https://xray.cloud.xpand-it.com/api/v1/authenticate
needs client Id and client secret which is not available for our JIRA implementation.
so , I only have username and password , how do i use it to achieve above ?
Thanks,
Mahima.
If you have a Jira username and password is what you have available, then you're most probably using Xray on Jira server/datacenter and not Xray on Jira Cloud.
Therefore, the tutorial you should look at it is this one: https://docs.getxray.app/display/XRAY/Testing+using+WebDriverIO+and+Cucumber+in+JavaScript
In terms of request, it is simpler as you don't need to perform that initial authentication request.
Related
I am doing automation to get opening tickets details so i am executing web service call in FreshService ticketing tool.
Below is my web service call using CURL and GET
curl -X GET -H 'Content-Type: application/json' -v -i 'https://support.XXXXXXX.com/helpdesk/tickets/9725.json?-u=ASDDDECDFF%3AX%20'
When i am executing only getting below response in body.
{
"require_login":True
}
But my output joson file visible after opening that url in browse i can see json file, so i execute below vbsctipt to send HTTP request for read the JSON file but same ""Require_login":True" coming.
Dim o
Set o = CreateObject("MSXML2.XMLHTTP")
o.open "GET", "https://support.XXXXXXX.com/helpdesk/tickets/9723.json", False
o.send
msgbox o.responseText
So my expectation to get JSON file in body part of web service response or through vbscript get JSON file store locally.
Appreciate any other light wight tool or easy approach. More about Fresh service API details https://api.freshservice.com/#introduction
After i encoded my authentication key with base64 and addd Authorization as header and its working now.
Update Web service URL,
curl -X GET -H 'Content-Type: application/json' -H 'Authorization: Basic XXXXXYYYYYZZZ' -v -i 'https://support.XXXXX.com/helpdesk/tickets.json'
How can I update rpccorsdomain value with my private node already mining?
Note
I have already setup it before to point to a url --rpccorsdomain "http://mywebsite.com" and need to update it to different value
You can restart the RPC API using either the console or through a curl command.
In the console, you can issue an admin.stopRPC() and then restart it passing in the new cors value with admin.startRPC(host, port, newCorsList, apis).
If you prefer using curl:
curl -X POST --data '{"method": "admin_stopWS"}' nodeHostName:nodePortNumber
curl -X POST --data '{"method": "admin_startWS", "params": [host, port, cors, apis]}' nodeHostName:nodePortNumber
The full list of available management APIs can be found here.
Alternatively, you can just stop the node and restart it passing in the new cors list via command line options.
I am currently trying to update the user permissions on a project with the function PATCH: project / users (v2) for several services (BIM Docs, Field, Glue, Plan and Schedule) but for other services that Docs I have an error telling me that the services are invalid.
Code documentation here.
When I put only the permissions for project administration and Docs, it works.
However, i want to use the other services. So, when I set permissions for Docs, the rights for others are removed.
After several searches, I can't find a way to perform this command in cURL.
Here is the content:
curl -H "Content-Type: application/json"
-H "x-user-id: %user_admin_id%"
-H "Authorization: Bearer %TOKEN%"
-X PATCH https://developer.api.autodesk.com/hq/v2/accounts/:account_id/projects/:project_id/users/:user_id
-d '{
"services":
{"document_management":{"access_level":"user"},
"field_management:{"access_level":"user"}
},
"company_id":"%company_id%",
"industry_roles":["0b74b631-0a08-49ad-8f44-ada57d7de051"]
}'
Here the error :
"error":[{"message":"Invalid services
[\"field_management\"]","code":2000}]
I already tried field instead field_management.
Any solutions ?
Thanks.
You can not set permission through API, yet.
You can set a service to a project:
https://developer.autodesk.com/en/docs/bim360/v1/reference/http/projects-POST/
services-type parameter.
You also need to have a license to those sub services.
I need to generate a Json response for a POST made with parameters in form data, not in Json.
Example:
My request:
curl -X POST -H "Accept: application/json" -H "Content-Type:
multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
-F "firstName=Manolete" -F "lastName=Manolón" -F "address=villa arriba" -F "city=meryville" -F "telephone=666666666" -F
"homepage=alguna.homepage.es" -F "email=alguno#hotmail.com" -F
"birthday=1314595427866" "http://localhost:8080/PetClinicRoo/owners"
Current request:
curl -X POST -H "Accept: application/json" -d '{firstName: "Manolete",
lastName:"Manolón", address:"villa arriba", city: "Meryville",
telephone:"66666666", homepage:"alguna.homepage.es",
email:"alguno#hotmail.com", birthDay: 1314596527943, }'
"http://localhost:8080/PetClinicRoo/owners"
I could handwrite the code but this implies getting out of spring roo management all the application web tier, and further modifications wouldn't be automatically made.
You can push-in the controller method and you modify it as needed, Spring Roo management will work.
We have several options:
1.- Use spring roo and then pushing in the methods
Generate all the web tier using spring roo
Pushing-in all the post methods
Modify the response
Inconvenients: once you push-in the methods, spring roo doesn’t manage them, so further modifications woldn’t be made automatically
2.-Handwrite the web tier.
Use spring ro to generate entities
Handwrite the web layer
Inconvenients: implies more work than the previous option.
3.- Extend Spring Roo in order to generate the method automatically.
I think this is our best option because he have a lot of entities.
I'm super new to developer BOX and I would like to create an app only user in my BOX account. I found out this link which guides me through the process. BUT, I'm not able to find out ho to proceed with the following things:
1) How to request an enterprise access token using the JWT
2) How to use the enterprise access token to make a request for a new app user.
I'm super sorry if this question is stupid or trivial. I'm super new to this area and I really hope I get some help as I would love to work more in this field.
This page on the Box documentation site walks through how to create an Enterprise access token.
As you mentioned once you generate the Enterprise access token, you can then create a new App User using the Users endpoint. Here's an example in cURL for this.
curl https://api.box.com/2.0/users \
-H "Authorization: Bearer REPLACE_WITH_YOUR_ENTERPRISE_ACCESS_TOKEN" \
-d '{"name": "Example Name", "is_platform_access_only": true}' \
-X POST