Project - Projects and Releases - List Folders

This API call will be available soon, but we're sharing the documentation now so you can prepare.

Lists all available folders in the account that projects can be assigned to

Before using this call, you'll need to authenticate against the API as detailed here.

It's possible to search for folders by specifying logic and operands as well as pure values.

 

The anatomy of the search is made up of the following components:

{logic}-{key}-{operand}-{type}-{value}

These components can be described as follows:

logic -  Decides whether to apply "AND"  or "OR".

key - The field to which the search criterion is applied. 

operand - Specifies how folders should be compared to the criterion to determine whether they are returned as results or not.

type - Specified whether to use value of a given field (described by the key) for comparison, or another field.

value - Either a specific value, or the name of the field to compare.

 

Some examples of this in use are:

and-name-ne-value-foo

Returns all folders where the name is NOT equal to foo
and-name-inc-value-foo

Returns all folders where the name is LIKE foo (case sensitive)
and-name-inci-value-foo

Returns all folders where the name is LIKE foo (case insensitive)
or-tag_name-eq-value-red|or-tag_name-eq-value-blue

Returns all folders that are tagged red or blue
and-name-eq-value-foo|and-tag_name-ini-value-red,blue

Returns all folders where the name is equal to foo & associated tags are red and blue
and-deleted-eq-value-1

Returns a list of folders that have been marked as deleted

Options for Logic:

AND - specifies that result should be included where all criteria are met
OR - specifies that result should be included if it matches at least one of the criteria

Options for Operands:

bool - Boolean comparison, e.g. true or false (is NULL | is not NULL). eq - Equals comparison (case sensitive).
eqi - Equals comparison (case insensitive).
ne - Not equals comparison (case sensitive). 
nei - Not equals comparison (case insensitive). lt - Less than comparison.
gt - Greater than comparison.
ge - Greater than or equal to comparison. 
le - Less than or equal to comparison. inc - Includes (case sensitive).
inci - Includes (case insensitive).
ninc - Not includes (case sensitive). ninci - Not includes (case insensitive). re - Regular expression. 
begins - Begins (case sensitive).
beginsi - Begins (case insensitive).
in - Comma delimited list of values to match (case sensitive).
ini - Comma delimited list of values to match (case insensitive).
nin - Comma delimited list of values to not match (case sensitive).
nini - Comma delimited list of values to not match (case insensitive). 

Code examples are included below. All of these examples have simulation mode turned on. Once you are read to use in a production environment, you can remove the simulation parameter. Any changes will then affect your account.

The full example search string, even when it contains a pipe, should be included as the argument against the "search" field.

PHP

Ruby

Python

Response

PHP

$n$nonce = get_nonce('https://api.elucidat.com/v2/projects', 'PUBLIC_KEY', 'PRIVATE_KEY');
$headers = auth_headers('PUBLIC_KEY', $nonce);
$fields = array(
    'simulation_mode' => 'simulation',
    'search' => $arg1,
    'order' => $arg2
);
$result = call_elucidat($headers, $fields, 'GET', 'https://api.elucidat.com/v2/folders', 'PRIVATE_KEY');
echo ("HTTP status code: " . $result['status'] . "\n");
print_r($result['response']);

Ruby 

nonce = client.get_nonce;
headers = client.auth_headers(nonce)
fields = {
	'simulation_mode' => 'simulation',
	'search' => arg1,
	'order' => arg2
}
pp client.call_elucidat(headers, fields, 'GET', '/v2/folders')

Python

nonce = get_nonce(
    "https://api.elucidat.com/v2/projects",
    "PUBLIC_KEY",
    "PRIVATE_KEY",
)
headers = auth_headers("PUBLIC_KEY", nonce)
fields = [("simulation_mode", "simulation"), ("search", arg1), ("order", arg2)]
print call_elucidat(
    headers,
    fields,
    "GET",
    "https://api.elucidat.com/v2/folders",
    "PRIVATE_KEY",
)

Response

[
{
"id": 123,
"name": "FolderName",
"department_id": null,
"parent_id": null,
"type": "media",
"created": "2021-04-12 09:12:28",
"modified": "0000-00-00 00:00:00",
"deleted": "0"
},
...
]
Was this article helpful?
0 out of 0 found this helpful

Articles in this section

See more
Request support
Access support that’s tailored to you by getting in touch with our Support Team.
Send us feedback
Do you have a new feature request, or want to tell us about something that works well (or not so well) for you? Get in touch!