Problems with custom field name and webservices - rally

I'm using Rally SOAP API to perform a query given a value for a custom field, via Java.
I get the error "java.lang.IllegalArgumentException: The char '0x1f' after 'return code: 401
' is not a valid XML character."
I've taken a look at the custom field name (name, not display name) and it has some blank chars in it. Can it be this the problem?
If yes, is it a safe operation to rename the custom field, since it is already in use?
Thanks in advance

You can always URLEncode anything that you are trying to send to your webservice, though it sounds like it may NOT be your problem

Have you thought of using the Java Toolkit for Rally REST API?
http://developer.rallydev.com/help/java-toolkit-rally-rest-api
REST is less brittle than SOAP and is the preferred way to access Rally's web services.

Related

Do I need to migrate an action to v2 that doesn't use Dialogflow?

Google sent me a reminder to migrate from Dialogflow API v1 to v2. I don't use Dialogflow. The skill is connected to custom Python code on our own servers. Our code gets JSON and returns JSON. Should I be concerned?
What you've described still could be using Dialogflow, since Actions using Dialogflow can also be written in Python and receive JSON.
Some things that might be indicators:
If you have an actions.json file, and deploy this when you update your Action, you are probably not using Dialogflow.
If the JSON you receive contains an attribute "result" or "originalRequest" (or both), then you're using Dialogflow's fulfillment webhook protocol.
If you're looking at inputs[0].intent to see what Intent was triggered, and the value either matches one in your actions.json or a string such as actions.intent.TEXT, then you're using the Actions SDK and not Dialogflow.
If you were looking at result.metadata.intentName to get the name of the Intent, then you're using Dialogflow.
If you are using Dialogflow, you need to move to v2, which will require some changes in the names of several of the JSON fields. https://dialogflow.com/docs/reference/v1-v2-migration-guide-fulfillment#webhook_request_and_response_json (and sections further down on the page) provide information on the changes and what you'll need to do.
Yes! you should be concerned, I have faced the same issue as JSON has been changed for somethings already.

How to Trigger API with Rivescript?

First of all i'm new to this Rivescript which is used for making chat bots. can any one help me how to trigger Rest API which is already implemented in NodeJS. i heard that some <call> tag will help for this but i'm not getting how to do that. Any example will be appreciated. Thanks in advance.
We wanted to keep control on our side. So we ended up putting meta info in the rivescript file and wrote a custom parser which will make API call.
+ hi
- hi. | API:greeting
Parser splits the response by | and then all values on right side are for API. This can be extended to have any number of parameter to support all kinds of API calls.
This is NOT Rivescript way, but good thing is that it's flexible and allows you to do things in your favorite programming language (rather than depending on Rivescript).

Informatica using URI based REST API

I'm having real trouble getting Informatica PowerCenter or Developer to call a URI based REST API and I'm doing it for something simple (JIRA's API). Basically I want to call JIRA's worklog REST API which is a different URL for a list of issue ids and write it to our DB.
https://docs.atlassian.com/jira/REST/6.2/
/rest/api/2/issue/{issueIdOrKey}/worklog
Informatica PowerCenter supports only HTTP transformation which is only a simple GET. Unfortunately the latest version is still stuck in the 'old' query type URL building where they append inputs into search strings. E.g. if I have a "key" input field with value "ABC-1" and the URL is jira/rest/api/2/search it would actually build the URL on the fly into jira/rest/api/2/search?key=ABC-1. While some of JIRA's API works this way, some use the URI way e.g. jira/rest/api/2/ABC-1/worklog which requires embedding the value into the URI. There's no way I can get this to work :-
if I do jira/rest/api/$key/worklog it still converts the URI into jira/rest/api/$key/worklog/?key=ABC-1 so $key does not get replaced
even if i pre-build the URI outside the mapping it's not feasible as the URI needs to be dynamic to the list of JIRA keys and anyway because it appends ? at the end JIRA throws an error (because ? is a reserved key word for this API)
HTTP transformation does not support NTLMv2 authentication which our company's JIRA instance may upgrade to shortly
Last resort is to use a Java transformation in which Informatica has quite little value add. This also means I need to somehow pass in the JIRA user password for authentication which is a separate challenge (versus just storing as a HTTP connection)
Informatica Developer supports REST Web Consumer Transformation but has similar limitations with only building query type URL. Even worse I can't even dynamically build the URL since it's fixed to the HTTP connection object URL.
Am I straight outta luck?
I got the query and here I would like to answer about this. I can write here only points and it might be you won’t be able to understand that thing properly. So Here I am putting link of blog where the task "how to informatica read rest api is mentioned in detail step by step with video tutotial. Some examples are also there. Feel free to visit
https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/
Hope it will help.

Adding recipient Groups to a CiviCRM Mailing via REST.. how?

I have been able so far to create a new civi Mailing object and populate it, but confusingly I can't see a parameter in that to specify the mail destination group.
For context, I am dealing with Civi using pure REST api from a remote server. I have a solution to getting a custom template onto the server; the new problem is setting a schedule and delivery group, and initiating the send. I am using the python-civicrm library from github as the intermediary on the client.
I presume send happens as a result of setting the schedule -- i.e. I don't need an API call to say 'send mailing'? Is setting 'sheduled date' == 'now' safe or should I set a date of 'now + 1min' or similar?
So that leaves setting the delivery group. We already have groups defined in the DB, and I want to specify the group by name (and preferably be able to verify in advance that a group name is a valid destination, perhaps by doing a group name -> id lookup).
I think there might be a parameter to Mailing create 'groups' which can have keys 'include' and 'exclude'; at least, that's what the web form seems to do. However it's not mentioned in the REST api implementation.
Can anyone offer pointers?
I think you will find all you need in the following link :
Example of api call that is using the group include/exclude : https://gist.github.com/xurizaemon/6775471
Discussion about implementing mailing as an api - http://forum.civicrm.org/index.php?topic=24075.0
Otherwise, if it doesn't work, i suggest that you :
help adding this api in the CiviCRM Core - you could have some help on this on irc #civicrm (and have a look at https://issues.civicrm.org/jira/browse/CRM-11023)
OR create an extension with the api you need. It will be automatically available for REST. If you haven't created an extension yet, i suggest you go to the page http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Module+Extension. It's quite straightforward with civix installed.
The table you need to check in the database is civicrm_mailing_group
To confirm, the problem was that (a) I needed to use groups[include]=array(ids) as mentioned by samuelsov, but also (b) I needed to use the json={...} form of request through REST, because the HTTP params syntax doesn't support nested data.

Jira SOAP API custom field

Hi I'm am trying to get the list of issues from a JIRA server using the SOAP API provided by JIRA.
I'm trying to filter the issues based on a custom field (and latter I will want to set that custom field).
If I get the list of issue it returns the custom fields for those issues along with them (I get customfieldId, key, values for each custom field) and I can get the custom field with getCustomFields methods provided by the API (to look for the ID of the field with a given name).
The issue I have is that if I login with an account that is not an admin (using the API) I can't call the getCustomFields method (it throws an exception saying I have to be an admin to do that).
My question is: Is there any other way to know which is the ID of the custom field I desire that can be done using a normal user account?
Also if you know how to set a custom field for an issue, it would also be very helpful :) (I would also like to be able to do it with a regular user account).
You have to be an admin to get a list of custom fields. Any 'normal' account can act on the custom fields via the API provided the user knows the customfield ID.
You can set the value of a custom field too, even with a 'normal' account. Again, the user needs the appropriate permissions to do this. Example provided here.
More here and here.
You can also use getFieldsForEdit(token, issueKey), which will return RemoteField[] for all fields available for edit on that issue (even if it has not yet been defined on the issue). It does not require admin permissions, but because it has the word "Edit" in the method, it does require that you have permission to edit the issue (which means, e.g., if the issue is status=Closed, it will raise an exception unless you allow editing closed issues. Unfortunately, I have yet to find a way to retrieve the RemoteField[] list (in order to map id to name), so getCustomFields() and getFieldsForEdit() appear to be the only options.
Have you tried getting a list of issues from the project, picking one, zeroing out the data, and using that as a template? That might work.
SOAP is being deprecated in favor of the REST API, which also has a better method to get this information