Skip to content

Create Version not working #135

@archierosenblum

Description

@archierosenblum

The Zones.create_version is failing. The NS1 API documentation indicates a body is required and that the body contain the name of the version.

The create_version code should be adjusted to something like below to accept name as a parameter and pass a body to __make_request()_. (The code below is working.)

    def create_version(self, zone, force=False, callback=None, errback=None, name=None):
        if name is None:
            name = zone
        body = {}
        body["name"] = name
        request = "{}/{}/versions?force={}".format(
            self.ROOT, zone, str.lower(str(force))
        )
        return self._make_request(
            "PUT",
            request,
            body=body,
            callback=callback,
            errback=errback,
        )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions