ActiveCollab API - return only open tickets - activecollab

Currently I see only this option in the documentation
projects/:project_id/tasks
This command lists all open and completed non-archived Tasks from a
Project.
Is there a filter or parameter (or another API call) I can pass to get back only the open tasks which are not completed ?
Thank you.

ActiveCollab 4 works the way you described. If you need only open tasks, you sould filter the result when your app receives it.
In ActiveCollab 5, there are separate API resources for open and completed tasks, so upgrade is one possible path to behavior that you want.

Related

How do I quickly list all Google Cloud projects in an organization?

I would like to quickly list all Google Cloud projects in an organization, without AppScript folders.
gcloud projects list can be very slow. This documentation is about speeding it up, but does not show how to retrieve the Appscript folder which is used for filtering. Can that be done from the command line?
Also, gcloud projects list does not have a way to filter by organization. It seems that that is impossible as projects are not linked to their organization except through a tree of folders.
The documentation shows a way of walking the tree, apparently with Resource Manager API, which might do the job, but only pseudocode is shown. How can this be done with gcloud -- or else with Python or another language?
And if there is no way to accelerate this: How do I page through results using gcloud projects list? The documentation shows that page-size can be set, but does not show how to step through page by page (presumably by sending a page number with each command).
See also below for a reference to code I wrote that is the imperfect but best solution I could find.
Unfortunately there isn’t a native Apps Script resource available to work with Cloud Resource Manager API.
Although, it is possible to make a HTTP call directly to the Resource Manager API projects.list() endpoint with the help of UrlFetchApp service.
Alternatively, using Python as mentioned, the recommended Google APIs client library for python supports calls to Resource Manager API. You can find the specific projects.list() method documentation here.
On additional note, if you happen to use a Cloud project to generate credentials and authenticate the API call, you may want to enable Cloud Resource Manager API on your project by following this URL.
I’d also recommend submitting a new Feature Request using this template.
Here is some code that lists projects in an organization as quickly as possible. It is in Clojure, but it uses Java APIs and you can translate it easily.
Key steps
Query all accessible projects using CloudResourceManager projects(), using setQuery to accelerate the query by filtering out, for example, the hundreds of sys- projects often generated by AppScript. The query uses paging.
From the results
Accept those that are the child of the desired org
Reject those that are the child of another org.
For those that are the child of a folder, do this (concurrently, for speed): Use gcloud projects get-ancestors $PROJECT_ID to find the projects in your organization. (I don't see a way to do that in Java, and so I call the CLI.)

Reopen a completed project on Active Collab

How can I run the reopen project that is found on completed projects in active collab (the URL, and or data I need to post)?
I already have new project, complete project, and a slew of other commands implemented, so I have the API up and running.
I also tested this in PUT and POST to no avail:
/projects/ID DATA-> "is_completed": false
In order to open a completed project, you'd need to hit dedicated API endpoint for that which is
api/v1/open/project/{projectId} => where you'll replace {projectId} with your projectId ID.
Keep in mind that the method is PUT.

Query Environment hub records from salesforce API

I'm currently creating a chrome extension that will query EnvironmentHubMember records from our Salesforce org, however I'm currently getting this returned from the REST callout;
'"sObject type 'EnvironmentHubMember' is not supported."'
The endpoint I'm using is 'INSTANCENAME.COM/services/data/v20.0/query/?q=SELECT+Name+FROM+EnvironmentHubMember
I can't seem to find any specific settings to make this sObject available via an api call, has anybody been able to query these records from an external system before?
Thanks!
try using a later API version. The object itself was not available in version 20. The most recent version is 41.

How is memory allocated to a Google Cloud Function?

Today I got this error in cloud function:
Function killed. Error: memory limit exceeded
My function is based on authenticated-json-api example of Firebase sample functions. Because it worked like a charm, I extended it with multiple routes and multiple tasks like connecting with multiple external api, turning base64 strings into pdf on storage, validation, logging, and so on...
I removed some routes and it looks more stable now. My question now is: Can there be a limit to the amount of code / processing there can be within a single function. And would it be a better approach to split them up in multiple express api's ?
I also found some questions about allocating memory to specific functions. However, I can't find the option in Google Cloud Platform to change it nor the option in firebase package.json to set it.
I found the solution:
Go to the Google Cloud Platform Console (not the Firebase console)
Select Cloud Functions in the menu
Now you see your firebase function in here if it's correct. Otherwise check if you selected the right project.
Ignore all checkboxes, buttons and menu items, just click on the name of the function.
Click on edit (top menu) and only change the allocated memory and click save.
Regards, Peter

Displaying Tiles data with Time interval using Push Notifications in Metro Apps?

I have metro application in which I implemented Push notification concept for getting single message.If I get more than 1 notification,still my application tile is able to show only 1 notification(msg).Am not able to do how to display multiple notifications for time-specific.Means do I need to write any extra code for displaying multiple notifications on my tile.If so, where should I need do write either client-side or server-side?
Thank you.
There are several ways to look at updating, and depending on what your end goal is, you may end up implementing the code either on the client, or the server, or a little of both.
For the scenario you describe, you need to use Windows Notification Services to push the notification each time you want a new tile notification. Typically, this is done by having a service running in the cloud (a website, or a Windows Azure service, or similar), that calls Windows Notification Service and sends a tile update to the app when something of interest occurs.
If what you want is for multiple notifications to cycle on the tile, that's enabled by calling the enableNotificationQueue method on the TileUpdater class:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.notifications.tileupdater.enablenotificationqueue.aspx
Per the comment below, enableNotificationQueue works for any notification source. But if you want to pull information from a remote service, rather than using push, you can use scheduled polling as means of updating the tile using remote information, as described here:
http://msdn.microsoft.com/en-us/library/windows/apps/Hh761476.aspx
Combined with the call to enableNotificationQueue, it may also enable the scenario you're looking for.