All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
create_organization | POST /organizations | Create an organization |
create_organization_invitation | POST /organizations/{id}/invitations | Create an invitation for an organization |
create_organization_project | POST /organizations/{id}/projects | Create a project for the organization |
create_payment_method | POST /organizations/{id}/payment-methods | Create a payment method for the given organization |
delete_organization | DELETE /organizations/{id} | Delete the organization |
find_operating_systems_by_organization | GET /organizations/{id}/operating-systems | Retrieve all operating systems visible by the organization |
find_organization_by_id | GET /organizations/{id} | Retrieve an organization's details |
find_organization_customdata | GET /organizations/{id}/customdata | Retrieve the custom metadata of an organization |
find_organization_invitations | GET /organizations/{id}/invitations | Retrieve organization invitations |
find_organization_payment_methods | GET /organizations/{id}/payment-methods | Retrieve all payment methods of an organization |
find_organization_projects | GET /organizations/{id}/projects | Retrieve all projects of an organization |
find_organization_projects_all_pages | GET /organizations/{id}/projects | Retrieve all projects of an organization, fetches all the pages |
find_organization_transfers | GET /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization |
find_organizations | GET /organizations | Retrieve all organizations |
find_organizations_all_pages | GET /organizations | Retrieve all organizations, fetches all the pages |
find_plans_by_organization | GET /organizations/{id}/plans | Retrieve all plans visible by the organization |
update_organization | PUT /organizations/{id} | Update the organization |
Organization create_organization(organization_input, include=include, exclude=exclude)
Create an organization
Creates an organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.organization import Organization
from equinix_metal.models.organization_input import OrganizationInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
organization_input = equinix_metal.OrganizationInput() # OrganizationInput | Organization to create
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Create an organization
api_response = api_instance.create_organization(organization_input, include=include, exclude=exclude)
print("The response of OrganizationsApi->create_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->create_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_input | OrganizationInput | Organization to create | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | created | - |
401 | unauthorized | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Invitation create_organization_invitation(id, invitation_input, include=include)
Create an invitation for an organization
In order to add a user to an organization, they must first be invited. To invite to several projects the parameter projects_ids:[a,b,c]
can be used
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.invitation import Invitation
from equinix_metal.models.invitation_input import InvitationInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
invitation_input = equinix_metal.InvitationInput() # InvitationInput | Invitation to create
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Create an invitation for an organization
api_response = api_instance.create_organization_invitation(id, invitation_input, include=include)
print("The response of OrganizationsApi->create_organization_invitation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->create_organization_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
invitation_input | InvitationInput | Invitation to create | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | created | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project create_organization_project(id, project_create_input, include=include, exclude=exclude)
Create a project for the organization
Creates a new project for the organization
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.project import Project
from equinix_metal.models.project_create_input import ProjectCreateInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
project_create_input = equinix_metal.ProjectCreateInput() # ProjectCreateInput | Project to create
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Create a project for the organization
api_response = api_instance.create_organization_project(id, project_create_input, include=include, exclude=exclude)
print("The response of OrganizationsApi->create_organization_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->create_organization_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
project_create_input | ProjectCreateInput | Project to create | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | created | - |
401 | unauthorized | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentMethod create_payment_method(id, payment_method_create_input, include=include)
Create a payment method for the given organization
Creates a payment method.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.payment_method import PaymentMethod
from equinix_metal.models.payment_method_create_input import PaymentMethodCreateInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
payment_method_create_input = equinix_metal.PaymentMethodCreateInput() # PaymentMethodCreateInput | Payment Method to create
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Create a payment method for the given organization
api_response = api_instance.create_payment_method(id, payment_method_create_input, include=include)
print("The response of OrganizationsApi->create_payment_method:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->create_payment_method: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
payment_method_create_input | PaymentMethodCreateInput | Payment Method to create | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | created | - |
401 | unauthorized | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_organization(id)
Delete the organization
Deletes the organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
try:
# Delete the organization
api_instance.delete_organization(id)
except Exception as e:
print("Exception when calling OrganizationsApi->delete_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | no content | - |
401 | unauthorized | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OperatingSystemList find_operating_systems_by_organization(id, include=include)
Retrieve all operating systems visible by the organization
Returns a listing of available operating systems for the given organization
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.operating_system_list import OperatingSystemList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Retrieve all operating systems visible by the organization
api_response = api_instance.find_operating_systems_by_organization(id, include=include)
print("The response of OrganizationsApi->find_operating_systems_by_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_operating_systems_by_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Organization find_organization_by_id(id, include=include, exclude=exclude)
Retrieve an organization's details
Returns a single organization's details, if the user is authorized to view it.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.organization import Organization
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Retrieve an organization's details
api_response = api_instance.find_organization_by_id(id, include=include, exclude=exclude)
print("The response of OrganizationsApi->find_organization_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
find_organization_customdata(id)
Retrieve the custom metadata of an organization
Provides the custom metadata stored for this organization in json format
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
try:
# Retrieve the custom metadata of an organization
api_instance.find_organization_customdata(id)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_customdata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InvitationList find_organization_invitations(id, include=include, page=page, per_page=per_page)
Retrieve organization invitations
Returns all invitations in an organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.invitation_list import InvitationList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve organization invitations
api_response = api_instance.find_organization_invitations(id, include=include, page=page, per_page=per_page)
print("The response of OrganizationsApi->find_organization_invitations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_invitations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
page | int | Page to return | [optional] [default to 1] |
per_page | int | Items returned per page | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentMethodList find_organization_payment_methods(id, include=include, page=page, per_page=per_page)
Retrieve all payment methods of an organization
Returns all payment methods of an organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.payment_method_list import PaymentMethodList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve all payment methods of an organization
api_response = api_instance.find_organization_payment_methods(id, include=include, page=page, per_page=per_page)
print("The response of OrganizationsApi->find_organization_payment_methods:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_payment_methods: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
page | int | Page to return | [optional] [default to 1] |
per_page | int | Items returned per page | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectList find_organization_projects(id, name=name, include=include, exclude=exclude, page=page, per_page=per_page)
Retrieve all projects of an organization
Returns a collection of projects that belong to the organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.project_list import ProjectList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
name = 'name_example' # str | Filter results by name. (optional)
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve all projects of an organization
api_response = api_instance.find_organization_projects(id, name=name, include=include, exclude=exclude, page=page, per_page=per_page)
print("The response of OrganizationsApi->find_organization_projects:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_projects: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
name | str | Filter results by name. | [optional] |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
page | int | Page to return | [optional] [default to 1] |
per_page | int | Items returned per page | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectList find_organization_projects_all_pages(id, name=name, include=include, exclude=exclude, per_page=per_page) Just like find_organization_projects but fetches resources from all pages. This method doesn't take
page
parameter. Other parameters, return type and other characteristics are the same as in find_organization_projects.
TransferRequestList find_organization_transfers(id, include=include)
Retrieve all project transfer requests from or to an organization
Provides a collection of project transfer requests from or to the organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.transfer_request_list import TransferRequestList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Retrieve all project transfer requests from or to an organization
api_response = api_instance.find_organization_transfers(id, include=include)
print("The response of OrganizationsApi->find_organization_transfers:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organization_transfers: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationList find_organizations(personal=personal, without_projects=without_projects, include=include, exclude=exclude, page=page, per_page=per_page)
Retrieve all organizations
Returns a list of organizations that are accessible to the current user.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.organization_list import OrganizationList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
personal = 'personal_example' # str | Include, exclude or show only personal organizations. (optional)
without_projects = 'without_projects_example' # str | Include, exclude or show only organizations that have no projects. (optional)
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve all organizations
api_response = api_instance.find_organizations(personal=personal, without_projects=without_projects, include=include, exclude=exclude, page=page, per_page=per_page)
print("The response of OrganizationsApi->find_organizations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_organizations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
personal | str | Include, exclude or show only personal organizations. | [optional] |
without_projects | str | Include, exclude or show only organizations that have no projects. | [optional] |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
page | int | Page to return | [optional] [default to 1] |
per_page | int | Items returned per page | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrganizationList find_organizations_all_pages(personal=personal, without_projects=without_projects, include=include, exclude=exclude, per_page=per_page) Just like find_organizations but fetches resources from all pages. This method doesn't take
page
parameter. Other parameters, return type and other characteristics are the same as in find_organizations.
PlanList find_plans_by_organization(id, include=include, exclude=exclude)
Retrieve all plans visible by the organization
Returns a listing of available plans for the given organization
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.plan_list import PlanList
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Retrieve all plans visible by the organization
api_response = api_instance.find_plans_by_organization(id, include=include, exclude=exclude)
print("The response of OrganizationsApi->find_plans_by_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->find_plans_by_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Organization update_organization(id, organization_input, include=include, exclude=exclude)
Update the organization
Updates the organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.organization import Organization
from equinix_metal.models.organization_input import OrganizationInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# 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 API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
organization_input = equinix_metal.OrganizationInput() # OrganizationInput | Organization to update
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Update the organization
api_response = api_instance.update_organization(id, organization_input, include=include, exclude=exclude)
print("The response of OrganizationsApi->update_organization:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling OrganizationsApi->update_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Organization UUID | |
organization_input | OrganizationInput | Organization to update | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | List[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]