I'm trying to set a request destination name and address.
I'm using following request:
PATCH /requests/{request_id} with end_address and end_nickname:
{
"end_latitude": -29.951063378432128,
"end_longitude": -90.07152712622717,
"end_nickname": "Tristan Testing",
"end_address": "Tristan Testing"
}
It returns: 204 No Content, so expecting no error.
Then, if I get latest destination details:
"destination": {
"latitude": -29.9510633784,
"eta": 8034,
"longitude": -90.0715271262
}
Destination coordinates are updated fine, but nickname and address not set anywhere.
How can I solve this issue? Thanks.
Ends up the issue is only for sandbox, as in name and address for pickup and destination are not exposed on sandbox, accoding to Uber API documentation.
Related
I am trying to write a bash script to disable/enable a pipeline in Azure Devops.
I just need to perform a PUT request as per the documentation.
But first I need to run a GET in the same endpoint to get json, then modified it and send back using PUT.
The GET request works fine
Get request
https://{{coreServer}}/{{organization}}/{{project}}/_apis/build/definitions/453?api-version={{api-version}}
Response status code 200
...
"id": 453,
...
"type": "build",
"queueStatus": "disabled",
"revision": 8,
...
The PUT request URL:
https://{{coreServer}}/{{organization}}/{{project}}/_apis/build/definitions/453?api-version={{api-version}}
The PUT body
...
"id": 453,
...
"type": "build",
"queueStatus": "enabled",
"revision": 9,
...
Response from PUT:
"$id": "1",
"innerException": null,
"message": "Build pipeline 453 was not found.",
"typeName": "Microsoft.TeamFoundation.Build.WebApi.DefinitionNotFoundException, Microsoft.TeamFoundation.Build2.WebApi",
"typeKey": "DefinitionNotFoundException",
"errorCode": 0,
"eventId": 3000
}
The token to connect has the correct scope and permission.
How is possible to find the correct resource on GET but not on PUT?
What I am missing?
By checking your API, you are using Definitions-Get to get json, and using Definitions-Update to change the "queueStatus".
Tested on my side, it works well. In common, you could use the response from GET API as requested body of PUT API. You could follow my steps and have a check on your side.
I am using GET to get the target pipeline definition. Basic OAuth.
Using PUT to disable the queueStatus with the json body from above GET API
Updates an existing build definition. In order for this operation to succeed, the value of the "Revision" property of the request body must match the existing build definition's. It is recommended that you obtain the existing build definition by using GET, modify the build definition as necessary, and then submit the modified definition with PUT.
From your GET API, the revision is 8. Do not modify the revision to 9, just change the "queueStatus" and keep the same revision 8 as GET json to make sure the revision is matched.
Modify your PUT body as below:
...
"id": 453,
...
"type": "build",
"queueStatus": "enabled",
"revision": 8,
...
I developed a side-by-side app using Java + SAP Cloud SDK (Neo). The app adds records to a custom business object.
The app was working fine when I concluded development in February. Now, I need to do some additional improvements, but I can add records anymore.
I am getting the error SCBO_AUTHORIZATION/000 - You are not authorized to create XXXXXXX instance.
I assigned CBO to a business role, the custom communication scenario along with communication arrangement is in place. I tested already the service (metadata) and the user is not locked.
HereĀ“s the error sent back from the backend:
2020 05 27 19:36:55#+00#ERROR#com.sap.cloud.extensibility.services.CockpitServiceImp##PHENRIQUE#https-jsse-nio-8041-exec-8#na#fzrl99axqb#csccapplication2#web#fzrl99axqb#na#na#na#na#Error building up cockpit. com.sap.cloud.sdk.s4hana.datamodel.odata.helper.ODataVdmErrorResultHandler$ErpODataException: The endpoint responded with HTTP error code 400.
You're not authorized to create CSCCOCKPIT instance.
Full error message:
{
"error": {
"code": "SCBO_AUTHORIZATION/000",
"message": {
"lang": "en",
"value": "You\\u0027re not authorized to create CSCCOCKPIT instance."
},
"innererror": {
"application": {
"component_id": "BC-ESI-ESF-GW",
"service_namespace": "/SAP/",
"service_id": "YY1_CSCCOCKPIT_CDS",
"service_version": "0001"
},
"transactionid": "338BDCAE69170270E005EC3E361F2498",
"timestamp": "20200527193655.5607910",
"Error_Resolution": {
"SAP_Transaction": "For backend administrators: use ADT feed reader \\"SAP Gateway Error Log\\" or run transaction /IWFND/ERROR_LOG on SAP Gateway hub system and search for entries with the timestamp above for more details",
"SAP_Note": "See SAP Note 1797736 for error analysis (https://service.sap.com/sap/support/notes/1797736)"
},
"errordetails": [
{
"code": "SCBO_AUTHORIZATION/000",
"message": "You\\u0027re not authorized to create CSCCOCKPIT instance.",
"propertyref": "",
"severity": "error",
"transition": true,
"target": ""
}
]
}
}
}
Could someone give a clue on where could the issue be?
BR,
Pietro
The error happened because all the fields in the custom business object in S/4Hana Cloud were set as "read-only".
I am trying to pull the committer's email address from the payload but the payload is showing some default value like
"noreply#server_ip"
I am trying to parse the committer's email address from the payload but the payload is delivering like this below :
"author": {
"name": "XYZ",
"email": "XYZ#abc.com",
"username": "xyz"
},
"committer": {
"name": "GitHub Enterprise",
"email": "noreply#server_ip"
The jenkins pipeline is showing like this
"fullName":"noreply"},"authorEmail":"noreply#server_ip"
My code is
authemail = parsedJson.changeSets.items.authorEmail[0]
Not able to understand is there a problem in Jenkins or Github settings ?
Any help/advice is appreciated.
My code is
authemail = parsedJson.changeSets.items.authorEmail[0]
"author": {
"name": "XYZ",
"email": "XYZ#abc.com",
"username": "xyz"
},
"committer": {
"name": "GitHub Enterprise",
"email": "noreply#server_ip"
The GitHub server,for that account, might have set a noreply email address.
If you'd like to keep your personal email address private, you can use a GitHub-provided no-reply email address as your commit email address.
To use your noreply email address for commits you push from the command line, use that email address when you set your commit email address in Git.
To use your noreply address for web-based Git operations, set your commit email address on GitHub and choose to Keep my email address private.
I am trying to do follow the ibm tutorial for object detection (https://cloud-annotations.github.io/training/object-detection/wml/) and i have a problem when I try to connect to the machine. Here are the credentials
{
"apikey": "kIlCEVrah4Yi2Jexs4f6ryxtXK_UmlRRYbEHFDZPj3-U",
"iam_apikey_description": "Auto generated apikey during resource-key operation for
Instance - crn:v1:bluemix:public:pm-20:eu-
gb:a/ba2f381a117d49a8898e3b9d244488cc:07c9e765-ab56-4303-a02d-ff487a394db0::",
"iam_apikey_name": "auto-generated-apikey-0cb1a7b2-7037-45d8-9221-73116bf42f7b",
"iam_role_crn": "crn:v1:bluemix:public:iam::::serviceRole:Writer",
"iam_serviceid_crn": "crn:v1:bluemix:public:iam-
identity::a/ba2f381a117d49a8898e3b9d244488cc::serviceid:ServiceId-
6f725bc1-f6d1-4a62-a7da-d8701494ad1e",
"instance_id": "07c9e765-ab56-4303-a02d-ff487a394dba",
"password": "0fda17b6-5b97-4cf3-ba69-ed355555b45a",
"url": "https://eu-gb.ml.cloud.ibm.com",
"username": "0cb1a7b2-7037-45d8-9221-73116bf42f7a"
}
and when i paste the username / password and instance_id i get the next error:
Status code: 404, body: {"trace":2894125269067430410,"errors":
[{"code":"not_found","message":"User with given credentials not found.","target":
{"type":"field","name":"token"},"moreInfo":null}]}
Any help would be awesome! Thank you!
If you are following the instructions in the link you provided, then you are have most likely taken the wrong instance_id or not specified the url in the connection.
Your service credentials are showing https://eu-gb.ml.cloud.ibm.com which will be running on the UK hosted servers, which I am guessing will not be the default.
I am attempting to POST a file to my Pivotal Tracker instance as specified by the excellent documentation found here.
I continue to get an "uploaded: False" back from the server.
- My token and project id are correct since I can POST new stories etc..
- My file is in place and accessible by the user running this command
fakeuser#fakehost:~/jobs/fakeproject/builds/51$ curl -X POST -H "X-TrackerToken: <mytoken>" -F file=#"/var/lib/jenkins/jobs/changelog.xml" https://www.pivotaltracker.com/services/v5/projects/<projid>/uploads
{
"kind": "file_attachment",
"filename": "changelog.xml",
"created_at": "2013-11-12T14:05:21Z",
"size": 128,
"id": 11111111,
"big_url": "#",
"content_type": "application/xml",
"thumbnail_url": "#",
"uploader_id": 112121212,
"thumbnailable": false,
"download_url": "/file_attachments/1212121212/download",
"uploaded": false
}
I got an email back from Pivotal Labs with an answer to this question. Thanks Pivotal Labs!
Short answer:
It's fine, that "false" is just an indicator that the background job to make that file available to your project hasnt happened yet.
From the email
...
When you upload a file to Tracker, whether via the API or the UI, an
asynchronous job has to run to complete the upload and create the
thumbnail image. So the immediate response to your request reflects
the fact that this job hasn't completed yet. I can see how confusing
this is, though.
...