Skip to main content

AuthN | Python SDK | Agreements Endpoints

Agreements Endpoints

Create an agreement

authn.agreements.create(type, name, text, active)

Create an agreement.

m.AgreementType

An agreement type

str

A name to describe the agreement.

str

The body of the agreement.

bool

A flag to that marks which of the agreements is currently active.

A PangeaResponse with a EULA object in the response.result field. Available response fields can be found in our API Documentation.

response = authn.agreements.create(
    type=AgreementType.EULA,
    name="EULA_V1",
    text="You agree to behave yourself while logged in.",
)

Delete an agreement

authn.agreements.delete(type, id)

Delete an agreement.

m.AgreementType

An agreement type

str

An ID for an agreement

A PangeaResponse with an empty object in the response.result field.

authn.agreements.delete(
    type=AgreementType.EULA,
    id="peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
)

List agreements

authn.agreements.list(filter, last, order, order_by, size)

List agreements.

dict
str

Reflected value from a previous response to obtain the next page of results.

str

Order results asc(ending) or desc(ending).

str

Which field to order results by.

int

Maximum results to include in the response. Minimum: 1.

A PangeaResponse with a list of EULA objects in the response.result field. Available response fields can be found in our API Documentation.

response = authn.agreements.list()

Update agreement

authn.agreements.update(type, id, name, text, active)

Update agreement.

m.AgreementType

An agreement type

str

An ID for an agreement

str

The name of the agreement.

str

The body of the agreement.

bool

A flag to that marks which of the agreements is currently active.

A PangeaResponse with the updated EULA object in the response.result field. Available response fields can be found in our API Documentation.

response = authn.agreements.update(
    type=AgreementType.EULA,
    id="peu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
    text="You agree to behave yourself while logged in. Don't be evil.",
    active=True,
)