API Client represents a low level interface for Endpoint API. All API operation be can performed using this.
A low-level client for Endpoint API
from abeja.endpoints import APIClient
api_client = APIClient()
create a endpoint
API reference: POST /organizations/{organization_id}/deployments/{deployment_id}/endpoints
organization_id = "1111111111111"
deployment_id = "2222222222222"
service_id = "ser-abc3333333333333"
custom_alias = "default"
response = api_client.create_endpoint(organization_id, deployment_id, service_id, custom_alias)
organization_id (str): organization identifier
deployment_id (str): deployment identifier
service_id (str): service identifier for alias
custom_alias (str): custom alias name
dict
{
"endpoint_id": "pnt-abc1111111111111",
"custom_alias": "default",
"service_id": "ser-abc2222222222222"
}
BadRequest: the resource already exists or parameters is insufficient or invalid.
Unauthorized: Authentication failed
InternalServerError
delete a endpoint
API reference: DELETE /organizations/<organization_id>/deployments/<deployment_id>/endpoints/<endpoint>
response = api_client.delete_endpoint(organization_id='1111111111111',
deployment_id='1111111111111', endpoint='pnt-abc1111111111111')
organization_id (str): organization_id
deployment_id (str): deployment identifier
endpoint (str): endpoint identifier or custom alias
dict
{
"message": "pnt-abc1111111111111 deleted"
}
NotFound: endpoint not found
Unauthorized: Authentication failed
InternalServerError
get a endpoint
API reference: GET /organizations/<organization_id>/deployments/<deployment_id>/endpoints/<endpoint>
response = api_client.get_endpoint(organization_id='1111111111111', deployment_id='1111111111111',
endpoint='pnt-abc1111111111111')
organization_id (str): organization_id
deployment_id (str): deployment identifier
endpoint (str): endpoint identifier or custom alias
dict
{
"endpoint_id": "pnt-d28322af41a14e16",
"custom_alias": "default",
"service_id": "ser-57e40a4c681a4a09"
}
NotFound: endpoint not found
Unauthorized: Authentication failed
InternalServerError
Get endpoints entries
API reference: GET /organizations/<organization_id>/deployments/<deployment_id>/endpoints
response = api_client.get_endpoints(organization_id='1111111111111', deployment_id='1111111111111')
organization_id (str): organization_id
deployment_id (str): deployment identifier
dict
{
"entries": [
{
"endpoint_id": "pnt-abc1111111111111",
"custom_alias": "default",
"service_id": "ser-abc1111111111111"
}
]
}
Unauthorized: Authentication failed
InternalServerError
update a endpoint
API reference: PATCH /organizations/<organization_id>/deployments/<deployment_id>/endpoints/<endpoint>
response = api_client.update_endpoint(organization_id='1111111111111',
deployment_id='1111111111111',
endpoint='pnt-abc1111111111111',
service_id='ser-abc1111111111111')
organization_id (str): organization_id
deployment_id (str): deployment identifier
endpoint (str): endpoint identifier or custom alias
service_id (str): service identifier
dict
{
"message": "pnt-1111111111111111 updated"
}
NotFound: endpoint not found
Unauthorized: Authentication failed
InternalServerError