I'm having problems extractin LinkedIn Network Updates using API methods.
I can extract my SHAR and CMPY Network Updates but when I try to filter CONN, VIRL or other types I get different types of Network Updates. Let me explain to you.
This
https://api.linkedin.com/v1/people/~/network/updates:(update-type)?type=SHAR&count=100
works and returns:
<updates total="120" count="70" start="0">
<update>
<update-type>SHAR</update-type>
</update>
<update>
<update-type>SHAR</update-type>
</update>
...
</updates>
This
https://api.linkedin.com/v1/people/~/network/updates:(update-type)?type=VIRL&count=100
does not work, returning:
<updates total="201" count="94" start="0">
<update>
<update-type>CONN</update-type>
</update>
<update>
<update-type>SHAR</update-type>
</update>
<update>
<update-type>VIRL</update-type>
</update>
...
</updates>
Has LinkedIn changed the Network Updates types?
VIRL updates are those on which the person had acted upon (liked or commented). So it can include various other updates. The original update is under original-update.
I have used JSON output so it looks like this:
And on expanding the originalUpdate key; it looks like this:
Related
I'm trying to add UDID fields to PNRs using the SOAP API. There is no mention of such functionality anywhere in the docs!
So I tried using the SabreCommandLLSRQ endpoint to attach the UD fields, but I don't seem to be able to make any changes, despite receiving a * response.
I've tried the following command using the endpoint:
5.S*RL[record locator]*UD56 [some test value]
For example:
5.S*RLEPLHYN*UD56 YVRYEG
But that also leads to a * response without the PNR actually changing.
Are you sure that's the right UDID format? I've never seen a record locator prepended to a UDID before. If using the SabreCommandLLSRQ endpoint I would expect your format to look like this:
5.S*UD56 [some test value]
There are many UDID formats so I may be wrong there and I know the responses can be quirky. What response do you get in a PNR if you simply enter your format into Sabre Red?
There is also support for itin remarks in the Add Itinerary Remark (AddRemarkLLSRQ), which may be worth implementing for you as well.
I found it in the API too, it is only mentioned in one of many examples in AddRemarkRQ:
If you want it to show up on the itinerary:
<AddRemarkRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.1">
<RemarkInfo>
<Remark Type="Invoice">
<Text>
U45-111794
</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
If you don't want it to show up on the itinerary:
<AddRemarkRQ xmlns="http://webservices.sabre.com/sabreXML/2011/10" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" Version="2.1.1">
<RemarkInfo>
<Remark Type="Invoice">
<Text>
U*45-111794
</Text>
</Remark>
</RemarkInfo>
</AddRemarkRQ>
I've tested it in both CreatePassengerNameRecordRQ and AddRemarkRQ contexts.
I was wondering if anyone can tell me how to get the action log of the instance using openstacksdk, novaclient. And while getting the action log, I also want to get the flavor attached to it. See the attached picture please.
I actually got the action log using this novaclient module:
novaclient.v2.instance_action.InstanceAction
but it shows me very little details and without the flavor id that I needed. The following fields it shows me are the following:
action, instance_uuid, message, project_id, request_id, start_time and user_id
I hope anyone can tell me how to get it.
I don't think it is possible to get the flavor id from the action list / server event list.
Openstack does not keep a database record of what each request did, or a historic record of the instance states. So you would need to resort to trawling the logs for the request-id ... which is OK for forensics, but does not scale. (And I don't know if the flavor is in the log messages.)
Of course, you could use the APIs (novaclient, openstacksdk) to get the current flavor for the instance, given its instance id. But that isn't exactly what you want.
It is possible record historical information using Gnochi + Ceilometer or similar, but you would need to have set this up already.
I would like to use KeyValueMaps to store some simple values, but they keys I need to use would be computed at runtime. For example in my 'InitialEntries' I want to do something like this:
<KeyValueMapOperations async="false" continueOnError="false" enabled="true" name="Sandbox-Read-Count">
<DisplayName>Sandbox - Read Count</DisplayName>
<FaultRules/>
<Properties/>
<ExclusiveCache>false</ExclusiveCache>
<ExpiryTimeInSecs>-1</ExpiryTimeInSecs>
<InitialEntries>
<Entry>
<Key>
<Parameter>{variable}.sandbox.calls</Parameter>
</Key>
<Value>0</Value>
</Entry>
</InitialEntries>
<Scope>apiproxy</Scope>
</KeyValueMapOperations>
However, when doing this I get an error when I try to save the policy:
Error while Uploading file for API Test.
messaging.config.beans.InvalidBundle. Errors:[Entity : policy-Sandbox-Read-Count, Invalid Key Names For Entries: [{apikey}.sandbox.calls];]
Is it possible to use computed values in the KeyValueMap policy? Is there a different syntax that I should be using?
I've investigated this. What happens is when you save the proxy with InitialEntries in the apiproxy-scoped KVM, the KVM is immediately created with the initial entries. Therefore, there is no way to use runtime variables, because the priming of the KVM has happened before the proxy ever runs.
You didn't use the mapIdentifier field in your KeyValueMapOperations element (look at the KeyValueMap PUT Sample in the Apigee docs), so the KVM you would create would be named kvmap.
You can use the following management API call to get a list of the KVMs and their contents for a given apiproxy:
GET https://api.enterprise.apigee.com/v1/o/{org}/apis/{apiname}/keyvaluemaps?expand=true
Authorization: Basic {base64 username:password}
Since The InitialEntries section is only used when the proxy is first loaded successfully (even if you change the InitialEntries section and redeploy, no changes will be made if the KVM of that name already exists), I think the usefulness of the InitialEntries section is rather limited. I'd recommend manually priming your KVM's using the management API to initialize the KVM:
PUT https://api.enterprise.apigee.com/v1/o/{org}/apis/{apiname}/keyvaluemaps
Authorization: Basic {base64 username:password}
Content-Type: application/json
{
"entry" : [ {
"name" : "key",
"value" : "0"
} ],
"name" : "{kvmName}"
}
I am using Gracenote video services for the programming guide in my application. Within the guide, I display channel logos along with the channel name and number. In the past, I have retrieved channel logo URLs by using the URL_GET API query with the mode set to TVCHANNEL_IMAGE. Within the body of the query, I would include the Gracenote IDs for a set of channels (found in a TVCHANNEL_LOOKUP response). Below is an example query.
<QUERIES>
<AUTH>
<CLIENT>XXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</CLIENT>
<USER>XXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX</USER>
</AUTH>
<QUERY CMD="URL_GET">
<MODE>TVCHANNEL_IMAGE</MODE>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
</QUERY>
</QUERIES>
The response to the query would return URLs that I could then download the logos from. This was working fine up until one week ago. Now, the response returns with no match.
<RESPONSES>
<RESPONSE STATUS="NO_MATCH">
</RESPONSE>
</RESPONSES>
Has the API for retrieving channel logos changed? If so, how and what is the new method for getting channel logos? Ideally, I would like to continue downloading logos on demand through an API similar to URL_GET.
Are you still able to reproduce this? I get a valid response back using your query example
<RESPONSES>
<RESPONSE STATUS="OK">
<TVCHANNEL>
<GN_ID>251535939-B76CB793D827E8BE713DAEB9675ADED4</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/E9F4/7FE7/D525/9746_110.png</URL>
</TVCHANNEL>
<TVCHANNEL>
<GN_ID>251539612-E293EAF3F3164B292AD102532BCB9AF9</GN_ID>
<URL TYPE="IMAGE" SIZE="110" WIDTH="67" HEIGHT="50">http://akamai-b.cdn.cddbp.net/cds/2.0/image/F1D1/F628/A3FE/79E0_110.png</URL>
</TVCHANNEL>
</RESPONSE>
</RESPONSES>
Is it possible to map the method name to a header with a int-http:inbound-gateway? for example:
<int-http:inbound-gateway request-channel="requests" reply-channel="replies"
supported-moethds="GET,PUT"
path="/user">
<int-http:header name="requestMethod" expression="#requestMethod"/>
</int-http:inbound-gateway>
<!-- ... -->
<int:header-value-router input-channel="requests" header-name="requestMethod>
<int:mapping value="GET" channel="getUserRequests"/>
<int:mapping value="PUT" channel="addUserRequests"/>
</int:header-value-router>
Furthermore, I see examples that utilize #requestParams, but the javadoc for 2.1 mentions #queryParameters, and I don't see documentation for either of these in the official documentation page. Do you guys know a good resource that describes not only how SpEL parses expressions but what fields are available to use with it? All I can tell is I have headers, payload, #pathVariables, and maybe #requestParams or #queryParams, along with any other #beans I have defined in the current context.
Thanks in advance!
That method is always mapped to a header
... http_requestMethod=POST ...
Message<?> message = messageBuilder
.setHeader(org.springframework.integration.http.HttpHeaders.REQUEST_URL, request.getURI().toString())
.setHeader(org.springframework.integration.http.HttpHeaders.REQUEST_METHOD, request.getMethod().toString())
.setHeader(org.springframework.integration.http.HttpHeaders.USER_PRINCIPAL, servletRequest.getUserPrincipal())
.build();
The javadoc is wrong. The two additional variables are #requestParams and #pathVariables.