All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
create_project | POST /projects | Create a project |
create_project_invitation | POST /projects/{project_id}/invitations | Create an invitation for a project |
create_transfer_request | POST /projects/{id}/transfers | Create a transfer request |
delete_project | DELETE /projects/{id} | Delete the project |
find_ip_reservation_customdata | GET /projects/{project_id}/ips/{id}/customdata | Retrieve the custom metadata of an IP Reservation |
find_project_by_id | GET /projects/{id} | Retrieve a project |
find_project_customdata | GET /projects/{id}/customdata | Retrieve the custom metadata of a project |
find_project_invitations | GET /projects/{project_id}/invitations | Retrieve project invitations |
find_project_memberships | GET /projects/{project_id}/memberships | Retrieve project memberships |
find_projects | GET /projects | Retrieve all projects |
find_projects_all_pages | GET /projects | Retrieve all projects, fetches all the pages |
update_project | PUT /projects/{id} | Update the project |
Project create_project(project_create_from_root_input, include=include, exclude=exclude)
Create a project
Creates a new project for the user's default organization. If the user does not have a default organization, the API will look for a personal organization belonging to the user with the name "{User's Full Name} Projects" to associate the project with. If that organization does not exist a new organization named "{User's Full Name} Projects" will be created and the new project will be tied to that organization.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.project import Project
from equinix_metal.models.project_create_from_root_input import ProjectCreateFromRootInput
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.ProjectsApi(api_client)
project_create_from_root_input = equinix_metal.ProjectCreateFromRootInput() # ProjectCreateFromRootInput | 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
api_response = api_instance.create_project(project_create_from_root_input, include=include, exclude=exclude)
print("The response of ProjectsApi->create_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->create_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_create_from_root_input | ProjectCreateFromRootInput | 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]
Invitation create_project_invitation(project_id, invitation_input, include=include)
Create an invitation for a project
In order to add a user to a project, they must first be invited.
- 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.ProjectsApi(api_client)
project_id = 'project_id_example' # str | Project 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 a project
api_response = api_instance.create_project_invitation(project_id, invitation_input, include=include)
print("The response of ProjectsApi->create_project_invitation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->create_project_invitation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | Project 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]
TransferRequest create_transfer_request(id, transfer_request_input, include=include)
Create a transfer request
Organization owners can transfer their projects to other organizations.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.transfer_request import TransferRequest
from equinix_metal.models.transfer_request_input import TransferRequestInput
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.ProjectsApi(api_client)
id = 'id_example' # str | UUID of the project to be transferred
transfer_request_input = equinix_metal.TransferRequestInput() # TransferRequestInput | Transfer Request 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 transfer request
api_response = api_instance.create_transfer_request(id, transfer_request_input, include=include)
print("The response of ProjectsApi->create_transfer_request:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->create_transfer_request: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | UUID of the project to be transferred | |
transfer_request_input | TransferRequestInput | Transfer Request 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]
delete_project(id)
Delete the project
Deletes the project.
- 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.ProjectsApi(api_client)
id = 'id_example' # str | Project UUID
try:
# Delete the project
api_instance.delete_project(id)
except Exception as e:
print("Exception when calling ProjectsApi->delete_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | no content | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
find_ip_reservation_customdata(project_id, id)
Retrieve the custom metadata of an IP Reservation
Provides the custom metadata stored for this IP Reservation 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.ProjectsApi(api_client)
project_id = 'project_id_example' # str | Project UUID
id = 'id_example' # str | Ip Reservation UUID
try:
# Retrieve the custom metadata of an IP Reservation
api_instance.find_ip_reservation_customdata(project_id, id)
except Exception as e:
print("Exception when calling ProjectsApi->find_ip_reservation_customdata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | Project UUID | |
id | str | Ip Reservation 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]
Project find_project_by_id(id, include=include, exclude=exclude)
Retrieve a project
Returns a single project if the user has access
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.project import Project
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.ProjectsApi(api_client)
id = 'id_example' # str | Project 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 a project
api_response = api_instance.find_project_by_id(id, include=include, exclude=exclude)
print("The response of ProjectsApi->find_project_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->find_project_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project 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_project_customdata(id)
Retrieve the custom metadata of a project
Provides the custom metadata stored for this project 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.ProjectsApi(api_client)
id = 'id_example' # str | Project UUID
try:
# Retrieve the custom metadata of a project
api_instance.find_project_customdata(id)
except Exception as e:
print("Exception when calling ProjectsApi->find_project_customdata: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project 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_project_invitations(project_id, include=include, page=page, per_page=per_page)
Retrieve project invitations
Returns all invitations in a project.
- 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.ProjectsApi(api_client)
project_id = 'project_id_example' # str | Project 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 project invitations
api_response = api_instance.find_project_invitations(project_id, include=include, page=page, per_page=per_page)
print("The response of ProjectsApi->find_project_invitations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->find_project_invitations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | Project 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]
MembershipList find_project_memberships(project_id, search=search, include=include, page=page, per_page=per_page)
Retrieve project memberships
Returns all memberships in a project.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.membership_list import MembershipList
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.ProjectsApi(api_client)
project_id = 'project_id_example' # str | Project UUID
search = 'search_example' # str | Search by member full name, id and email. (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)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve project memberships
api_response = api_instance.find_project_memberships(project_id, search=search, include=include, page=page, per_page=per_page)
print("The response of ProjectsApi->find_project_memberships:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->find_project_memberships: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | Project UUID | |
search | str | Search by member full name, id and email. | [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] |
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]
ProjectList find_projects(name=name, include=include, exclude=exclude, page=page, per_page=per_page)
Retrieve all projects
Returns a collection of projects that the current user is a member of.
- 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.ProjectsApi(api_client)
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
api_response = api_instance.find_projects(name=name, include=include, exclude=exclude, page=page, per_page=per_page)
print("The response of ProjectsApi->find_projects:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->find_projects: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
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_projects_all_pages(name=name, include=include, exclude=exclude, per_page=per_page) Just like find_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_projects.
Project update_project(id, project_update_input, include=include, exclude=exclude)
Update the project
Updates the project.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.project import Project
from equinix_metal.models.project_update_input import ProjectUpdateInput
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.ProjectsApi(api_client)
id = 'id_example' # str | Project UUID
project_update_input = equinix_metal.ProjectUpdateInput() # ProjectUpdateInput | Project 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 project
api_response = api_instance.update_project(id, project_update_input, include=include, exclude=exclude)
print("The response of ProjectsApi->update_project:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectsApi->update_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID | |
project_update_input | ProjectUpdateInput | Project 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]