I am trying to use curl and private app API and have successed to access to my shop but got an error message to modify current product using curl in PHP. Below is the code I used
(I put xml file as input.xml which included modify detail and tried sku using product i.d)
Is there any where keep modifying more than 250 product on one click?
//php
curl -v -X PUT -d #input.xml -H 'Content-Type: application/xml'(<-- this is line 2)
'https://myapikey:mypassword#myshopdomain/admin/products/product_id.xml'
// and i got this error message
"Parse error: syntax error, unexpected T_STRING in /home/content/s/o/n/song2660/html/curltest.php on line 2"
Related
It apears that either the documentation of scrapyd is wrong or that there is a bug. I want to retrieve the list of spiders from a deployed project. the docs tell me to do it this way:
curl http://localhost:6800/listspiders.json?project=myproject
So in my environment it looks like this:
merlin#192-143-0-9 spider2 % curl http://localhost:6800/listspiders.json?project=crawler
zsh: no matches found: http://localhost:6800/listspiders.json?project=crawler
So the command seems not to be recognised. Lets check the project availability:
merlin#192-143-0-9 spider2 % curl http://localhost:6800/listprojects.json
{"node_name": "192-143-0-9.ip.airmobile.co.za", "status": "ok", "projects": ["crawler"]}
Looks OK to me.
Checking the docs again, the other API calls take a parameter not as a GET but in a different way:
curl http://localhost:6800/schedule.json -d project=myproject -d spider=somespider
Applying this to listspiders:
merlin#192-143-0-9 spider2 % curl http://localhost:6800/listspiders.json -d project=crawler
{"node_name": "192-143-0-9.ip.airmobile.co.za", "status": "error", "message": "Expected one of [b'HEAD', b'object', b'GET']"}
Missing the GET parameter. So it looks like we are runnning in circles.
How can one retrieve a list of spiders or version (listversion) with scrapyd?
Maybe the url needs to be wrapped in double-quotes, Try
curl "http://localhost:6800/listspiders.json?project=crawler"
I'm new in tensorflow and window
I send curl to my tensorflow server on Linux and it was worked on OSX.
curl -d '{"instances":[{"image":{"b64":"'"$(base64 ./test_input.png)"'"}}]}' -X POST http://localhost:8501/v1/models/ocr:predict
returns
{
"predictions": [[44032, 44172]
]
}%
But curl is not working on Windows 10 and I don't know why
This is error message
curl: (3) [globbing] unmatched close brace/bracket in column 19
{ "error": "JSON Parse error: Invalid value. at offset: 0" }
Have you tried to add escape character for the nested double quotation as below? Windows and Macos is pretty different.
curl -d '{"instances":[{"image":{"b64":"'\"$(base64 ./test_input.png)\"'"}}]}' -X POST http://localhost:8501/v1/models/ocr:predict
It turns out that you need to use different quotation marks for Windows. Try
curl -d "{\"instances\": ...}" -X POST ...
I have tried to get source maps working with react native and sentry but I keep getting this type of output with no meaningful line numbers:
i#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:
[Filtered]#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:
[Filtered]#file:///var/containers/Bundle/Application/G4535-H056800I/AppName.app/main.jsbundle:59:1255
[native code]
I did the following to create and upload the source maps for my release:
1. Create map/bundle artifacts
curl http://127.0.0.1:8081/index.ios.map -o index.ios.map
curl http://127.0.0.1:8081/index.ios.bundle -o index.ios.bundle
2. Edit last link in index.ios.bundle to point to map
WAS: `//# sourceMappingURL=/index.ios.map`
NOW: `//# sourceMappingURL=index.ios.map`
3. Create Release on Sentry
curl https://app.getsentry.com/api/0/projects/appname/releases/ -u "username": -X POST -d '{"version": "version_num"}' -H 'Content-Type: application/json'
4. POST artifacts to Sentry release
curl https://app.getsentry.com/api/0/projects/appname/releases/version_num/files/ -u "username": -X POST -F file=#index.ios.bundle
curl https://app.getsentry.com/api/0/projects/appname/releases/version_num/files/ -u "username": -X POST -F file=#index.ios.map
Have I missed something? Been playing around with this for some time and can't get it to work. Any help would be much appreciated! Thanks
I am trying to use a curl command to query for all my projects within my workspace. When I specify a page size, ex. 100, the result only returns 19 projects instead of my total number of projects which is over 50. Why is my curl command not abiding by the page size parameter?
Browser REST Client - This returns all projects correctly.
https://rally1.rallydev.com/slm/webservice/v2.0/project?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1234567890&query=&start=1&pagesize=100
Curl command - I only get 19 projects, and the result json said "pagesize=20" even though my curl command query said pagesize=100
% curl -u 'user#company.com:' https://rally1.rallydev.com/slm/webservice/v2.0/project?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1234567890&query=&start=1&pagesize=100
Try a different URL. Instead of
https://rally1.rallydev.com/slm/webservice/v2.0/project?workspace=https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1111&query=&start=1&pagesize=100
try:
https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1111/Projects?&pagesize=100"
Here is a curl command:
curl -v -u user#co.com:secret "https://rally1.rallydev.com/slm/webservice/v2.0/workspace/1111/Projects?&pagesize=200" | python -m json.tool > /home/user/curloutput
the purpose of this part:
| python -m json.tool > /home/user/curloutput
was to prettify the json response and to save it to a file to make it easier to examine.
pagesize=200 worked. There are 24 projects in this workspace. The same command, without pagesize=200, returned 19 projects, but URL that includes pagesize=200 returned all 24.
I have the following curl command:
curl -k -u sandboxer:sandboxer -D- -X POST -H "Content-Type: application/json" --data
'{"jql":"project = BNAP AND resolution = null AND status != Resolved AND status != Rejected",
"maxResults":2 ,
"fields":["KEY","versions","description","status","resolution"]}'
https://127.0.0.1/rest/api/latest/search 1> newtest
I recieve a JSON object with meta-data,
{"expand":"schema,names"
,"startAt":0
,"maxResults":2
,"total":74
...
All I am intersted in is what follows, issues. I could take care of this in my application, but I am wondering if there is a way I could just tell JIRA 'Don't send me meta-data'. Is there?
Use the Speakeasy plugin to create a custom request/response as a Jira extension:
Speakeasy plugin
Installing Speakeasy
Developing Speakeasy Extensions