I am using SOAP API to communicate with Polarion server. In one of WSDL files, there are defined a few webservices to query work items, but I could not find a single example how to use them.
Let say that I want to ask the server for all work items that are 'Test Case' type in project 'My First Project'. What parameter values should I pass to 'queryWorkItems' or 'queryWorkItemsBySQL'?
I have found following documentation with structure of the requests:
https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/tracker/TrackerWebService.html#queryWorkItems(java.lang.String,java.lang.String,java.lang.String%5B%5D)
https://almdemo.polarion.com/polarion/sdk/doc/javadoc/com/polarion/alm/ws/client/tracker/TrackerWebService.html#queryWorkItemsBySQL(java.lang.String,java.lang.String%5B%5D)
Unfortunately I have no idea what 'query' or 'sqlQuery' should be like.. Could you provide any examples?
I have found how to build and send API requests with Lucene queries. In this video, there is shown how to build (in video since 0:40) and convert them in text format (in video since 2:52):
https://www.youtube.com/watch?v=DSRKfdr2aJc
Once you have txt query in Lucene format build, you send API webservice request:
queryWorkItems(query, sort, fields)
Example (Python syntax):
queryWorkItems(query="project.id:MyProject AND type:testcase", sort="uri", fields=["id", "assignee"])
Dictionary of [Work Item field] -> [field type]:
FIELDS = {
"approvals": "ArrayOfApproval",
"assignee": "ArrayOfUser",
"attachments": "ArrayOfAttachment",
"author": "User",
"categories": "ArrayOfCategory",
"comments": "ArrayOfComment",
"created": "dateTime",
"description": "Text",
"dueDate": "date",
"externallyLinkedWorkItems": "ArrayOfExternallyLinkedWorkItem",
"hyperlinks": "ArrayOfHyperlink",
"id": "string",
"initialEstimate": "duration",
"linkedOslcResources": "ArrayOfLinkedOslcResource",
"linkedRevisions": "ArrayOfRevision",
"linkedRevisionsDerived": "ArrayOfRevision",
"linkedWorkItems": "ArrayOfLinkedWorkItem",
"linkedWorkItemsDerived": "ArrayOfLinkedWorkItem",
"location": "Location",
"moduleURI": "SubterraURI",
"outlineNumber": "string",
"plannedEnd": "dateTime",
"plannedIn": "ArrayOfPlan",
"plannedStart": "dateTime",
"planningConstraints": "ArrayOfPlanningConstraint",
"previousStatus": "EnumOptionId",
"priority": "PriorityOptionId",
"project": "Project",
"remainingEstimate": "duration",
"resolution": "EnumOptionId",
"resolvedOn": "dateTime",
"severity": "EnumOptionId",
"status": "EnumOptionId",
"timePoint": "TimePoint",
"timeSpent": "duration",
"title": "string",
"type": "EnumOptionId",
"updated": "dateTime",
"workRecords": "ArrayOfWorkRecord",
"customFields": "ArrayOfCustom",
"uri": "SubterraURI",
"unresolvable": "boolean",
}
Related
Trying to create floor plan upload to azure indoor maps. It is uploaded using postman and got the tilesetid but when I provide tilesetid in the Azure Indoor maps sample, it is not rendering the image in html file. When I use sample zip file provided by azure it is working fine.
Following the article as shown in Azure Indoor Maps
Autocad settings
Below is the manifest file
{
"version": "1.1",
"directoryInfo": {
"name": "Digital Twins Testing Building",
"streetAddress": "Contoso Way",
"unit": "1",
"locality": "Eastside",
"postalCode": "00000",
"adminDivisions": [
"Contoso City",
"Contoso State",
"United States"
],
"hoursOfOperation": "Mo-Fr 08:00-17:00 open",
"phone": "1 (425) 555-1234",
"website": "www.contoso.com",
"nonPublic": false,
"anchorLatitude": 33.44277,
"anchorLongitude": -112.072754,
"anchorHeightAboveSeaLevel": 1000,
"defaultLevelVerticalExtent": 2
},
"buildingLevels": {
"levels": [{
"levelName": "Ground Level",
"ordinal": 0,
"verticalExtent": 5,
"filename": "./GroundLevelFloorPlan.dwg"
}]
},
"georeference": {
"lat": 33.44277,
"lon": -112.072754,
"angle": 0
},
"dwgLayers": {
"exterior": [
"exterior"
],
"unit": [
"unit"
]
}
}
From the manifest, I see you expressed loading only exterior and unit, and didn't pass the label layer which is what brings labels and let you add more properties for the units (or zones). If you don't see the map, I would suggest checking the conversion results (see here) which is always a good practice. Another good way to troubleshoot is review the content in the dataset via WFS API, for example units via https://atlas.microsoft.com/wfs/datasets//collections/unit/items?api-version=1.0&subscription-key={{subcriptionkey}}
I’m trying to create an item using the Quickbooks Online API, but the field Sku is just ignored. I send a body like this:
{
"TrackQtyOnHand": true,
"Name": "Garden Supplies",
"Sku": "ITEM-1",
"QtyOnHand": 10,
"IncomeAccountRef": {
"name": "Sales of Product Income",
"value": "79"
},
"AssetAccountRef": {
"name": "Inventory Asset",
"value": "81"
},
"InvStartDate": "2015-01-01",
"Type": "Inventory",
"ExpenseAccountRef": {
"name": "Cost of Goods Sold",
"value": "80"
}
}
However in the object I get back as response, the Sku field is not there.
I set the parameter minorVersion to 45 (which is something I was suggested to do), but still not working.
I think the problem is that the param minorVersion should actually be minorversion (all lowercase).
I use coinbase-node and got transaction API response.
In this response, I can see something like:
{
...
"created_at": "2019-04-21T13:58:12Z",
"updated_at": "2019-04-21T13:58:12Z",
"resource": "transaction",
"resource_path": "/v2/accounts/68a42d04-2075-529c-8cd8-183cd148c45f/transactions/279db234-ca73-5e66-b70a-94502d44739e",
"instant_exchange": false,
"trade": {
"id": "f4ff2d5d-07b7-5c2c-807d-7b98591b488a",
"resource": "trade",
"resource_path": "/v2/accounts/68a42d04-2075-529c-8cd8-183cd148c45f/trades/f4ff2d5d-07b7-5c2c-807d-7b98591b488a"
},
"details": {
"title": "Converted to Bitcoin Cash",
"subtitle": "Using BTC Wallet",
"payment_method_name": "BTC Wallet"
},
...
}
my goal is to find a way to get a trade by ID
any ideas?
This post should help you.
How to import conversions in coinbase api?
At this moment it is impossible to get trades from API call, but you can construct object yourself using trade Id.
The ActivityStreams specification explains the difference between to, cc, bto, and bcc in section 5.1. But there's also an audience property, defined as:
one or more entities that represent the total population of entities for which the object can considered to be relevant.
How is this different from "to" and "cc"? In particular, what's the different effect on ActivityPub delivery?
The answer can be found in the Issue list of the ActivityPub spec, in this comment by James M Snell:
audience is used for targeting.
For example, suppose I have an activity that everyone in my company should see show up in their activity feeds, but only certain specific people should be notified, I would end up with something like:
{
//...//
"audience": {
"type": "Organization",
"id": "http://example.org",
"name": "My Organization"
},
"to": ["http://jane.example.org", "http://joe.example.org"],
"cc": ["http://sally.example.org"]
}
Here, the audience property provides a scoping of the overall audience, while the to and cc fields identify specific individuals within that audience that should be notified more directly of the activity.
After this discussion the specification was updated. See Audience targeting and specifically in par. 5.1.1 there is some more clarification on its use:
Activities are rarely isolated events. Often, multiple individual activities will be performed around a similar context or audience. For instance, a collaborators working on a shared project might perform multiple related activities in the process of achieving some goal. Such activities can be logically grouped together using the context property, and scoped to a particular audience using the audience property.
With the following example supplied (Example 144):
{
"#context": "https://www.w3.org/ns/activitystreams",
"summary": "Activities in Project XYZ",
"type": "Collection",
"items": [
{
"summary": "Sally created a note",
"type": "Create",
"id": "http://activities.example.com/1",
"actor": "http://sally.example.org",
"object": {
"summary": "A note",
"type": "Note",
"id": "http://notes.example.com/1",
"content": "A note"
},
"context": {
"type": "http://example.org/Project",
"name": "Project XYZ"
},
"audience": {
"type": "Group",
"name": "Project XYZ Working Group"
},
"to": "http://john.example.org"
},
{
"summary": "John liked Sally's note",
"type": "Like",
"id": "http://activities.example.com/1",
"actor": "http://john.example.org",
"object": "http://notes.example.com/1",
"context": {
"type": "http://example.org/Project",
"name": "Project XYZ"
},
"audience": {
"type": "Group",
"name": "Project XYZ Working Group"
},
"to": "http://sally.example.org"
}
]
}
Im trying to prefill my document with salesforcse Lead Name, however i cant accomplish it, the signHereTabs, and dateSignedTab is showing but the
texttabs dont get any data,
The REST API Documentation https://docs.docusign.com/esign/restapi/CustomTabs/CustomTabs/create/#request
says: that the row field is the "Specifies the row number in a Salesforce table that the merge field value corresponds to." but if i pass the salesforce record id im getting the error:
DocuSign Response{
"errorCode": "INVALID_REQUEST_PARAMETER",
"message": "The request contained at least one invalid parameter. int value expected for parameter: mergeField.row"
}
This is my json request:
{
"emailSubject": "Agreement",
"emailBlurb": "MSTSolutions is sending you this request for your electronic signature and enter or update confidential payment information.Please review and electronically sign by following the link below.",
"templateId": "42a4815d-f8ac-4972-b1ea-2e1534324658",
"envelopeIdStamping": "false",
"templateRoles": [{
"roleName": "Signer 1",
"name": "TEST TEST",
"email": "xxx#xxxx.com",
"recipientId": "1",
"tabs": {
"signHereTabs": [{
"xPosition": "25",
"yPosition": "50",
"documentId": "1",
"pageNumber": "1"
}],
"dateSignedTabs": [{
"name": "Date Signed",
"xPosition": "25",
"yPosition": "100",
"documentId": "1",
"pageNumber": "1"
}],
"textTabs": [{
"tabLabel": "LeadFirstName",
"xPosition": "25",
"yPosition": "200",
"documentId": "1",
"pageNumber": "1",
"mergeField": {
"configurationType":"Salesforce",
"path":"Lead",
"row":"00Q29000003fI13",
"writeback":"true",
"allowSenderToEdit":"true",
}
}]
}
}],
"status": "sent"
}
Thanks
Fairly sure the error is is how your path is configured. Try this:
"path": "Lead.FirstName"
and then remove the "Row" line
If you use the 'GET /v2/accounts/{accountId}/envelopes' create endpoint you can pass in the lead/opportunity/account Ids via the "Custom Fields" section. This will set all custom Salesforce fields you have defined in the template (relating to the SFIDs you provide) without having to set each tab one by one.
"customFields":{
"textCustomFields":[
{
"value":"0060n00000DIvfNAAT",
"name":"Opportunity",
"configurationType":"salesforce"
}
]
}
Note the textCustomFields is enclosed in a customFields block (which matches the published API) and most importantly, the configuration type must be set to "salesforce" and the Name must be "Opportunity" (etc) without the ##SF prefix which appears in a lot of examples on the web (for the SOAP api). By examining the 'GET /v2/accounts/{accountId}/envelopes/{envelopeId}/custom_fields' endpoint you can see that the API is automatically afixing the ##SF prefix and modifying the Value to include the record name:
{
"textCustomFields": [
{
"fieldId": "10140751586",
"name": "##SFOpportunity",
"show": "false",
"required": "false",
"value": "0060n00000DIvfNAAT~Test Opp Lisa Simpson"
}
}