You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 4
Next »
Resources
get |
---|
URL | /api/v1/api.php?target=resource&action=get |
Description | Get a resource or resources |
Returns | Examples: SUCCESSFUL: {"success":1,"message":"Search successful","data":[{"id":"57","name":"2nd Email","slug":"6c-contact-email2","type":"field","parent_id":"1","category_id":null,"attr":[]}]} ERROR: {"success":0,"message":"Search failed"} |
Optional Parameters | Name | Type | Notes/Example |
---|
id | INTEGER | Integer ID of the resource holder | name | STRING | Name of the resource. Example: 6Connect, Inc. | slug | STRING | The unique URL friendly name of the resource. Example: 6connect-inc | type | STRING | Type of resource (eg. entry, field, category) | category_id | INTEGER | ID of the category | | | |
At most, one of the following: Name | Type | Notes/Example |
---|
parent_id | INTEGER | Get resources whose parent has this ID | parent__in | ARRAY | Get resources whose parents have one of these IDs | parent__not_in | ARRAY | Get resources whose parents do not have one of these IDs |
At most, one of the following: Name | Type | Notes/Example |
---|
category_id | INTEGER | Get resources of the category that has this ID | category__in | ARRAY | Get resources of the categories that have one of these IDs | category__not_in | ARRAY | Get resources of the categories that do not have one of these IDs |
|
Example URL | /api/v1/api.php?target=resource&action=get&id=7 |