Get the list of projects using workflow
I have created few projects within the site, each time I create a new project I have to go to the documents and check the project there i.e. Geocortex Essentials --> Security & Data --> Data Store --> Documents. So my query here is, is there any way to get the list of the projects using workflow ?
0
-
What do you mean exactly? If you try to open a project (in the viewer) it should be there right?
But if you must do this from a workflow, you can always use a WebRequest activity (Do a Get Request Info first):
Uri: requestInfo1.ApplicationUri & "/documents/searchDocuments"
Parameters:
f: "json"
token: requestInfo1.Token
documentQuery: "%7B%22filters%22%3A%7B%22require%22%3A%5B%7B%22field%22%3A%22grants.token%22%2C%22method%22%3A%22values%22%2C%22range%22%3A%5B%7B%22string%22%3A%22owner%7Ca8bba70c82a445959cc5bfe6320d09c4%22%7D%5D%7D%2C%7B%22field%22%3A%22properties.siteID.string%22%2C%22range%22%3A%5B%7B%22string%22%3A%22NVM_Wonen%22%7D%5D%7D%2C%7B%22field%22%3A%22fileType%22%2C%22method%22%3A%22values%22%2C%22range%22%3A%5B%7B%22string%22%3A%22gvh-project%22%7D%5D%7D%5D%7D%2C%22sortDescending%22%3A%5B%22timeOfCreation%22%5D%2C%22start%22%3A0%2C%22limit%22%3A10%7D"
The latter is an encoded version of the JSON to request all projects:
{
"filters": {
"require": [
{
"field": "grants.token",
"method": "values",
"range": [
{
"string": "owner|a8bba70c82a445959cc5bfe6320d09c4"
}
]
},
{
"field": "properties.siteID.string",
"range": [
{
"string": "NVM_Wonen"
}
]
},
{
"field": "fileType",
"method": "values",
"range": [
{
"string": "gvh-project"
}
]
}
]
},
"sortDescending": [
"timeOfCreation"
],
"start": 0,
"limit": 10
}
This will give you a list of projects (in JSON format), which you can parse anyway you like.0 -
Make sure you replace the value for properties.siteID.string with the Site ID of your own site. 0 -
Can you share a link to documentation on the searchDocuments endpoint? I'm trying to do some searching here as well but am not getting the desired results. 0
Please sign in to leave a comment.
Comments
3 comments