Versions Compared

Key

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

...

add
URL/api/v1/api.php?target=resource&action=add
DescriptionDelete an resource holder.
ReturnsExamples:
SUCCESSFUL:
ERROR:
Required Parameters
NameTypeNotes/Example
meta[name]STRINGName of the resource
meta[type]STRINGType of resource (entry, section, field, ect)

Required Parameters

(for meta[type] = entry)


One of the following:

NameTypeNotes/Example
meta[section_id]INTEGERID of the section that the entry will be assigned to
meta[section]STRINGSlug of the section that the entry will be assigned to

Optional Parameters

(meta[type] = entry)

NameTypeNotes/Example
fields[]ARRAY

Entry field values (for fields that have already been assigned to the section) can be populated when the entry is created.

The format is field[field-slug][field-instance]. If the field instance is left blank, it will simply be the next value in the instance array. For example:

fields[network-fqdn][]=example.com&fields[network-fqdn][]=test.com

translates to

fields = array(
     network-fqdn =﹥ array(
          0 =﹥ 'example.com',
          1 =﹥ 'test.com',
     )
)

A field can be added to a section multiple times. The field instance is used to keep track of which field occurrence we are referring. In this example, the network-fqdn field had been added twice to the section so we were able to store two values for it.

Optional Parameters

NameTypeNotes/Example
parent_idINTEGERID of the parent resource

Optional Parameters

(for meta[type]=entry)

 
Example URL/api/v1/api.php?target=resource&action=delete&id=57