Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Converted from version 6.1.2

...

Update

URL/api/v1/api.php?target=lir&action=update
Description

Updates a LIR.

LIR updates utilize the Resource system - see API Module - Resource - Update for details on editing a resource via the API.

Returns

Examples:

SUCCESSFUL
{
 "success":1,
 "message":"Resource Updated",
 "data":
 {
 "id":"206",
 "name":"TestName",
 "slug":"dstl-reserved",
 "type":"entry",
 "parent_id":"191",
 "category_id":null,
 "date":1470755920,
 "modified":1517513903,
 "attr":
 {
 "mnt-by-password":11,
 "rir":"RIPE",
 "asn":"30303",
 "mnt-by":"Maint2",
 "admin-c":"admin4",
 "tech-c":"Tech5",
 "_section":"162",
 "_custom_id":"",
 "_gadget_data":[]
 },
 "section":
 {
 "id":"162",
 "name":"4BCH",
 "slug":"4bch",
 "type":"section",
 "parent_id":"1",
 "category_id":null,
 "date":1468356788,
 "modified":1468356788,
 "attr":[]
 },
 "gadgets":[]
 }
}

					
ERROR
{
    "success":0,
    "message":"error message"
}
				

Required Parameters

( meta[ ] =)

Name
Type
Example
Notes
meta[id]INTEGER1234ID of the LIR resource to update.
meta[type]STRINGentryType of resource - Updating a LIR will always be "entry".

Optional Parameters

( meta[ ] =)

Name
Type
Example
Notes
meta[name]STRINGTestLIRName of the LIR resource.
  

Required Parameters

( fields[ ][] =)

 

None.

 

 

Optional Parameters

( fields[ ][] =)

For LIRs with RIR = "ARIN":
Name
Type
Example
Notes
fields[rir][]STRINGARINThe RIR for the LIR. Accepted values are "ARIN", "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918".
fields[asn][]STRING20202The ASN (Autonomous System Number) for the LIR.
fields[org-handle][]       STRINGorg1Organization Handle 
fields[admin-poc][]STRINGadmin1The admin point of contact object name.
fields[technet-cpoc][]STRINGtech1Technical The network point of contact for this object.
fields[abuse-poc][]STRINGabuse1The abuse point of contact object name.
fields[net-name-prefix][]STRINGtest-The network name prefix.
fields[api-key][]STRINGakakakakakakaAPI key used to interface with RIR services

 

 

For LIRs with RIR = "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918". :
Name
Type
Example
Notes
fields[rir][]STRINGRIPEThe RIR for the LIR. Accepted values are "ARIN", "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918".
fields[asn][]STRING20202The ASN (Autonomous System Number) for the LIR.
fields[mnt-by][]STRINGmaint1The name of the maintainer object.
fields[mnt-by-password][]STRINGpasswordabcdThe maintainer password.
fields[admin-c][]STRINGadmin1Administrative contact for this object.
fields[tech-c][]STRINGtech1Technical contact for this object
Example URL

Update example with only the minimum required information:

This sends only the meta data required for a success response, but it does not actually change any values.

/api/v1/api.php?target=lir&action=update&meta[id]=14068&meta[type]=entry

 

Update example with changing RIR, ASN, and updating all field information:

This example changes a non-ARIN LIR to an ARIN LIR, and provides all updated information for the new RIR type.

/api/v1/api.php?target=lir&action=update&meta[id]=14068&meta[type]=entry&meta[name]=TestLIR4b&fields[rir][]=ARIN&fields[asn][]=30303&fields[org-handle][]=OrgABC&fields[admin-poc][]=AdminABC&fields[tech-c][]=TechABC&fields[abuse-poc][]=AbuseABC&fields[net-name-prefix][]=TestABC-&fields[api-key][]=abcdabcd