Skip to content

Latest commit

 

History

History
175 lines (121 loc) · 7.02 KB

InternalApi.md

File metadata and controls

175 lines (121 loc) · 7.02 KB

pfruck_contabo.InternalApi

All URIs are relative to https://api.contabo.com

Method HTTP request Description
create_ticket POST /v1/create-ticket Create a new support ticket
retrieve_user_is_password_set GET /v1/users/is-password-set Get user is password set status

create_ticket

CreateTicketResponse create_ticket(x_request_id, create_ticket_request, x_trace_id=x_trace_id)

Create a new support ticket

Create a new support ticket.

Example

  • Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.create_ticket_request import CreateTicketRequest
from pfruck_contabo.models.create_ticket_response import CreateTicketResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
    host = "https://api.contabo.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pfruck_contabo.InternalApi(api_client)
    x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
    create_ticket_request = pfruck_contabo.CreateTicketRequest() # CreateTicketRequest | 
    x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)

    try:
        # Create a new support ticket
        api_response = api_instance.create_ticket(x_request_id, create_ticket_request, x_trace_id=x_trace_id)
        print("The response of InternalApi->create_ticket:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->create_ticket: %s\n" % e)

Parameters

Name Type Description Notes
x_request_id str Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
create_ticket_request CreateTicketRequest
x_trace_id str Identifier to trace group of requests. [optional]

Return type

CreateTicketResponse

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 The response will be a JSON object and contains standard support ticket attributes. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

retrieve_user_is_password_set

FindUserIsPasswordSetResponse retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id)

Get user is password set status

Get info about idm user if the password is set.

Example

  • Bearer (JWT) Authentication (bearer):
import pfruck_contabo
from pfruck_contabo.models.find_user_is_password_set_response import FindUserIsPasswordSetResponse
from pfruck_contabo.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
    host = "https://api.contabo.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = pfruck_contabo.InternalApi(api_client)
    x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
    x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
    user_id = '6cdf5968-f9fe-4192-97c2-f349e813c5e8' # str | The user ID for checking if password is set for him (optional)

    try:
        # Get user is password set status
        api_response = api_instance.retrieve_user_is_password_set(x_request_id, x_trace_id=x_trace_id, user_id=user_id)
        print("The response of InternalApi->retrieve_user_is_password_set:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling InternalApi->retrieve_user_is_password_set: %s\n" % e)

Parameters

Name Type Description Notes
x_request_id str Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
x_trace_id str Identifier to trace group of requests. [optional]
user_id str The user ID for checking if password is set for him [optional]

Return type

FindUserIsPasswordSetResponse

Authorization

bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 The response will be a JSON object and contains standard user attributes. -

[Back to top] [Back to API list] [Back to Model list] [Back to README]