Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Description

Get available resource links. If no resource links exist for the given resource, an empty object is returned.

URL/api/v1/api.php?target=resource&action=getLink
Returns

Examples:

SUCCESSFUL:{"success":1 ,"message":"Search successful", "data":{"meta":{"totalRecords":"3", "retrieved":3}, "0":{"id":"22", "resource_id1":"1292", "resource_id2":"1302", "relation":"dhcpPoolLink"}, "1":{"id":"2", "resource_id1":"1292", "resource_id2":"1452", "relation":"dhcpPoolLink"}, "2":{"id":"12", "resource_id1":"1422", "resource_id2":"1482", "relation":"dhcpPoolLink"}}}
ERROR:{"success":0, "message":"error message"}

Return Detail:

NameTypeDescription
idINTEGERId of the resource linkage
resource_id1INTEGERThe id of the parent resource
resource_id2INTEGERThe id of the linked resource
relationSTRINGThe relation type. Relation types include:
contact, dhcpPoolLink, dnsViewACL, dnsViewServer, dnsZoneMaster, dnsZoneServer, dnsZoneView 

Meta Attributes:

NameTypeDescription
totalRecordsINTEGERHow many records were found by this query, without pagination.
retrievedINTEGERHow many records were returned by this query, with pagination.

Optional Attributes:

NameTypeDescription
resultsPerPageINTEGERHow many records to include per page display.*
pageINTEGERWhich page to display, when used with "resultsPerPage"*
*Example pagination: api.php?target=resource&action=getLink&relation=dhcpPoolLink&resultsPerPage=100&page=2
Get

get resource search

Description

Search the resource system for the provided term. Performs a "LIKE" search to return similar results.

URL/api/v1/api.php?target=resource&action=get&search=
Returns

Examples:

SUCCESSFUL:{"success":1,"message":"Search successful","data":[{"id":"11011","name":"a6connectchildentry","slug":"a6connectchildentry","type":"entry","parent_id":"4210","category_id":null,"date":1499106555,"modified":1499106555,"attr":{"_section":"4214"},"section":{"id":"4214","name":"aQA Section","slug":"aqa-section","type":"section","parent_id":"1","category_id":null,"date":1498775688,"modified":1499106630,"attr":[]},"gadgets":[]}],"result_count":1,"found_count":1}
ERROR:{"success":0, "message":"error message"}

Return Detail:

NameTypeDescription
idINTEGERId of the resource linkage
nameSTRINGThe resource name
slugSTRINGThe resource slug
typeSTRINGThe resource type.
parent_idINTEGERID of the parent resource
category_idINTEGERID of the resource category type
dateINTEGERResouce creation date
modifiedINTEGERResource last modified date
attrJSONA JSON list of resource attributes

 

Required Attributes:

NameTypeDescription
searchSTRINGThe search term
Example URL/api/v1/api.php?target=resource&action=get&search=6connect