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_transfers | GET /organizations/{id}/transfers | Retrieve all project transfer requests from or to an organization |
find_organizations | GET /organizations | Retrieve all organizations |
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)
Create an organization
Creates an organization.
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
organization_input = metal.OrganizationInput() # OrganizationInput | Organization to create
try:
# Create an organization
api_response = api_instance.create_organization(organization_input)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->create_organization: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
organization_input | OrganizationInput | Organization to create |
- 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)
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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
invitation_input = metal.InvitationInput() # InvitationInput | Invitation to create
try:
# Create an invitation for an organization
api_response = api_instance.create_organization_invitation(id, invitation_input)
pprint(api_response)
except ApiException 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 |
- 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)
Create a project for the organization
Creates a new project for the organization
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
project_create_input = metal.ProjectCreateInput() # ProjectCreateInput | Project to create
try:
# Create a project for the organization
api_response = api_instance.create_organization_project(id, project_create_input)
pprint(api_response)
except ApiException 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 |
- 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)
Create a payment method for the given organization
Creates a payment method.
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
payment_method_create_input = metal.PaymentMethodCreateInput() # PaymentMethodCreateInput | Payment Method to create
try:
# Create a payment method for the given organization
api_response = api_instance.create_payment_method(id, payment_method_create_input)
pprint(api_response)
except ApiException 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 |
- 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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
try:
# Delete the organization
api_instance.delete_organization(id)
except ApiException 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, exclude=exclude)
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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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 operating systems visible by the organization
api_response = api_instance.find_operating_systems_by_organization(id, include=include, exclude=exclude)
pprint(api_response)
except ApiException 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] |
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 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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
pprint(api_response)
except ApiException 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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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 ApiException 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, exclude=exclude, page=page, per_page=per_page)
Retrieve organization invitations
Returns all invitations in an organization.
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
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, exclude=exclude, page=page, per_page=per_page)
pprint(api_response)
except ApiException 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] |
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 | - |
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, exclude=exclude, 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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
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, exclude=exclude, page=page, per_page=per_page)
pprint(api_response)
except ApiException 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] |
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 | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ProjectList find_organization_projects(id, 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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
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, include=include, exclude=exclude, page=page, per_page=per_page)
pprint(api_response)
except ApiException as e:
print("Exception when calling OrganizationsApi->find_organization_projects: %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] |
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]
TransferRequestList find_organization_transfers(id, include=include, exclude=exclude)
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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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 project transfer requests from or to an organization
api_response = api_instance.find_organization_transfers(id, include=include, exclude=exclude)
pprint(api_response)
except ApiException 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] |
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 | - |
[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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
pprint(api_response)
except ApiException 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]
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):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = 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)
pprint(api_response)
except ApiException 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)
Update the organization
Updates the organization.
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from 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 = 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'] = 'YOUR_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 metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.OrganizationsApi(api_client)
id = 'id_example' # str | Organization UUID
organization_input = metal.OrganizationInput() # OrganizationInput | Organization to update
try:
# Update the organization
api_response = api_instance.update_organization(id, organization_input)
pprint(api_response)
except ApiException 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 |
- 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]