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[ ] =) | | | Example | |
---|
meta[id] | INTEGER | 1234 | ID of the LIR resource to update. | meta[type] | STRING | entry | Type of resource - Updating a LIR will always be "entry". |
|
Optional Parameters ( meta[ ] =) | | | Example | |
---|
meta[name] | STRING | TestLIR | Name of the LIR resource. |
|
| |
Required Parameters ( fields[ ][] =) | None. |
Optional Parameters ( fields[ ][] =) | For LIRs with RIR = "ARIN": | | | Example | |
---|
fields[rir][] | STRING | ARIN | The RIR for the LIR. Accepted values are "ARIN", "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918". | fields[asn][] | STRING | 20202 | The ASN (Autonomous System Number) for the LIR. | fields[org-handle][] | STRING | org1 | Organization Handle | fields[admin-poc][] | STRING | admin1 | The admin point of contact object name. | fields[technet-cpoc][] | STRING | tech1 | Technical The network point of contact for this object. | fields[abuse-poc][] | STRING | abuse1 | The abuse point of contact object name. | fields[net-name-prefix][] | STRING | test- | The network name prefix. | fields[api-key][] | STRING | akakakakakaka | API key used to interface with RIR services |
For LIRs with RIR = "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918". : | | | Example | |
---|
fields[rir][] | STRING | RIPE | The RIR for the LIR. Accepted values are "ARIN", "RIPE", "LACNIC", "AfriNIC", "APNIC", and "1918". | fields[asn][] | STRING | 20202 | The ASN (Autonomous System Number) for the LIR. | fields[mnt-by][] | STRING | maint1 | The name of the maintainer object. | fields[mnt-by-password][] | STRING | passwordabcd | The maintainer password. | fields[admin-c][] | STRING | admin1 | Administrative contact for this object. | fields[tech-c][] | STRING | tech1 | Technical 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 |