{"id":22379141,"url":"https://github.com/sky-uk/skyinfoblox","last_synced_at":"2025-07-31T01:31:54.278Z","repository":{"id":69994216,"uuid":"91345657","full_name":"sky-uk/skyinfoblox","owner":"sky-uk","description":"Go library for the Infoblox appliance","archived":false,"fork":false,"pushed_at":"2020-09-20T18:54:04.000Z","size":309,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-06-20T08:19:09.642Z","etag":null,"topics":["api-client","golang","infoblox"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sky-uk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-15T14:11:42.000Z","updated_at":"2021-05-29T09:11:54.000Z","dependencies_parsed_at":"2023-03-02T19:31:30.157Z","dependency_job_id":null,"html_url":"https://github.com/sky-uk/skyinfoblox","commit_stats":null,"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fskyinfoblox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fskyinfoblox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fskyinfoblox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sky-uk%2Fskyinfoblox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sky-uk","download_url":"https://codeload.github.com/sky-uk/skyinfoblox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228204606,"owners_count":17884711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","golang","infoblox"],"created_at":"2024-12-04T23:09:06.080Z","updated_at":"2024-12-04T23:09:06.745Z","avatar_url":"https://github.com/sky-uk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# skyinfoblox - Go library for the Infoblox appliance\n\nThis is the GoLang API wrapper for Infoblox. This is currently used for building terraform provider for the same appliance.\nThis package is based on the Infoblox WAPI library version v2.6.1.\nWapi library documentation can be accessed directly on Infoblox web site.\n\n\n## Run Unit tests\n```\nmake test\n\n```\n\n## Building the cli binary\n```\nmake all\n\n```\n\nThis will give you skyinfoblox-cli file which you can use to interact with InfoBlox API.\n\n## Using the library\nNote: starting from release 0.1.0, a new API has been provided. The new API supports CRUD operations on all object types.\n\n## WAPI version used\nThe Server WAPI version can be configured at client creation time (it defaults anyhow to v2.6.1). Support for older versions schemes is driven by the Infoblox WAPI server itself (query your server schema to find out the list of supported versions).\n\n### Importing the skyinfoblox library\n\n```\nimport(\n    \"github.com/sky-uk/skyinfoblox\"\n    \"github.com/sky-uk/skyinfoblox/api/common/v261\" // only if you want to use (a limited set of) v261 objects as defined structs\n    )\n```\n\n### Getting an API client object\nIn order to get an API client object first set a list of connnection parameters and pass it to the Connect() function:\n\n```\n\tparams := Params{\n\t\tWapiVersion: \"v2.6.1\", // this is anyhow the default...\n\t\tURL:         server,\n\t\tUser:        username,\n\t\tPassword:    password,\n\t\tIgnoreSSL:   true,\n\t\tDebug:       true,\n\t}\n\n    client := Connect(params)\n\n```\n\n### Creating an object\nYou can create any object you like setting object profile in a map:\n\n```\n\tadminRole := make(map[string]interface{})\n\tadminRole[\"name\"] = \"a role name\"\n\tadminRole[\"comment\"] = \"An initial comment\"\n\n\trefObj, err := client.Create(\"adminrole\", adminRole)\n```\n\nOr, for a limited selection of objects we directly support, you can use our provided structs:\n\n```\n\t\tdisable := true\n\t\tsuperUser := false\n\n\t\tadminGroup := model.IBXAdminGroup{\n\t\t\tAccessMethod:   []string{\"API\"},\n\t\t\tComment:        \"API Access only\",\n\t\t\tDisable:        \u0026disable,\n\t\t\tEmailAddresses: []string{\"test@example-test.com\"},\n\t\t\tName:           \"test\",\n\t\t\tRoles:          []string{\"test-role\"},\n\t\t\tSuperUser:      \u0026superUser,\n\t\t}\n\n        refObj, err := client.Create(\"admingroup\", adminGroup)\n\n```\n\n### Deleting an object\n\n```\n    refObj, err = client.Delete(refObj)\n```\n\nThe Delete() function returns the deleted object reference or an error otherwise\n\n#### Reading an object\n\n```\n    obj := make(map[string]interface{})\n    err = client.Read(objRef, []string{\u003clist of attrs you want back\u003e}, \u0026obj)\n```\n\n### Updating an object\n\n```\n    updatedRefObj, err := client.Update(refObj, newObjectProfileAsMap)\n```\n\n### Creating and reading an object\nThis function can come handy if you like to get anyhow the created\nobject back instead of only its reference.\nIt returns the created object as map[string]interface{}\nYou can create any object you like setting object profile in a map:\n\n```\n\tadminRole := make(map[string]interface{})\n\tadminRole[\"name\"] = \"a role name\"\n\tadminRole[\"comment\"] = \"An initial comment\"\n\n\tmyObj, err := client.CreateAndRead(\"adminrole\", adminRole)\n```\n\n### Updating and reading an object\nAgain this can be handy to get the updated object back\n\n```\n    updatedObj, err := client.UpdateAndRead(refObj, newObjectProfileAsMap)\n```\n\n\n## CLI Usage\nIf called without parameters, the cli will print its needed input parameters and the \nprovided commands\n\n```\n$ ./skyinfoblox-cli\n  -debug\n    \tDebug output. Default:false\n  -password string\n    \tAuthentication password (Env: IBX_PASSWORD)\n  -port int\n    \tInfoblox API server port. Default:443 (default 443)\n  -server string\n    \tInfoblox API server hostname or address. (Env: IBX_SERVER)\n  -username string\n    \tAuthentication username (Env: IBX_USERNAME)\n  -wapiVersion string\n    \tWAPI version (defaults to v2.6.1) \n  Commands:\n    create-and-read-object\n    create-object\n    delete-object\n    read-all-objects\n    read-object\n    update-and-read-object\n    update-object\n\n```\n\n### Creating an object with the CLI\n\nTo create an object, define first its profile in a json-encoded file, then issue the command:\n\n```\n./skyinfoblox-cli \u003call needed input params\u003e create-object -type \u003cobject type\u003e -profile \u003cjson-file with encoded object profile\u003e\n```\nThe command should print the created object reference or the error returned by the Infoblox REST API (note: passing the -debug parameter will result in the detailed request and response being dumped on screen).\n\n### Deleting \nTo delete an object:\n\n```\n./skyinfoblox-cli \u003call needed input params\u003e delete-object -ref \u003cthe object reference\u003e\n```\n\n### Reading all objects of a given type\nTo get the list of all objects of a given type:\n\n```\n./skyinfoblox-cli \u003call needed input params\u003e read-all-objects -type \u003cobject type\u003e\n```\n\nYou should get back the list of objects (default fields)\n\n### Reading an object\nTo get the profile of an object:\n\n```\n./skyinfoblox-cli \u003call needed input params\u003e read-object -ref \u003cobject reference\u003e -return-params \u003ccomma-separated list of attributes to get back\u003e\n```\n\n### To update an object\nTo update an object:\n\n```\n./skyinfoblox-cli \u003call needed input params\u003e update-object -ref \u003cobject reference\u003e -profile \u003cjson-encoded file with updated object profile\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-uk%2Fskyinfoblox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsky-uk%2Fskyinfoblox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsky-uk%2Fskyinfoblox/lists"}