API changes for platform gateway

Ansible Automation Platform uses a platform gateway that provides centralized API access to all services. While APIs for automation controller, automation hub, and Event-Driven Ansible remain accessible directly for backward compatibility, this direct access will be removed in a future release.

These changes impact your organization if you have API calls implemented directly with automation controller or private automation hub, or if you are integrating directly with automation controller or private automation hub hosts. You must migrate these integrations to the API endpoints exposed through the platform gateway to ensure they are not disrupted when direct service API access is removed in a future Ansible Automation Platform release.

For detailed API reference information, see the following sources:

  • For platform gateway APIs, see the browsable API at https://<gateway server name>/api/gateway/v1.
  • For automation controller APIs, see the browsable API at https://<gateway server name>/api/controller/v2.
  • For automation hub APIs, see Automation Hub API in API Catalog and Documentation.
  • For Event-Driven Ansible APIs, see the browsable API at https://<gateway server name>/api/eda/v1.

General changes

In Ansible Automation Platform 2.5 and later, API endpoints across components changed with the addition of platform gateway.

Expand
Component 2.4 and earlier endpoints start with… 2.5 and later endpoints start with… Notes

Automation controller

/api/v2/

/api/controller/v2/

Automation hub

/api/automation-hub

/api/galaxy/v1

This is the default path, but this path can be changed. For example: https://<local_hub_URL>/api/

Platform gateway

Not applicable

/api/gateway/v1/

Event-Driven Ansible

Not applicable

/api/eda/v1/

Specific API changes

Specific API mappings for functionality that was centralized through the platform gateway are listed in the following table.

Expand
Component 2.4 and earlier endpoints start with… 2.5 and 2.6 API endpoints Action needed and notes

Automation controller

/api/v2/o

/api/gateway/v1/tokens/

Token authentication has moved to the platform gateway.

The 2.4 API endpoint is deprecated; it still works in 2.6, but it will not work in a future release.

Automation controller

/api/v2/organizations

/api/gateway/v1/organizations/

Moved to the platform gateway.

The 2.4 API endpoint is deprecated; it still works in 2.6, but it will not work in a future release.

Automation controller

/api/v2/teams

/api/gateway/v1/teams/

Moved to the platform gateway.

The 2.4 API endpoint is deprecated; it still works in 2.6, but it will not work in a future release.

Automation controller

/api/v2/users

/api/gateway/v1/users/

Moved to the platform gateway.

The 2.4 API endpoint is deprecated; it still works in 2.6, but it will not work in a future release.

Automation controller

/api/v2/roles

/api/gateway/v1/role_definitions/

Moved to the platform gateway. This is a list of roles. In Ansible Automation Platform 2.6, this is a list of roles which can apply to all services, and includes custom roles.

The 2.4 API endpoint is only a listing. It still works in 2.6, but it will not work in a future release.

Automation controller

  • /api/v2/roles/{id}/teams/
  • /api/gateway/v1/role_definitions/
  • /api/gateway/v1/role_team_assignments/
  • /api/gateway/v1/role_user_assignments/

A POST request gives a user a role to a resource. This is how to give user permissions.

The 2.4 API endpoint is only a listing. It still works in 2.6, but it will not work in a future release.

Automation controller

The following roles list:

  • /api/v2/teams/{id}/roles/
  • /api/v2/users/{id}/roles/
  • /api/gateway/v1/role_team_assignments/?team={id}
  • /api/gateway/v1/role_user_assignments/?user={id}

List user and team permissions, and give new permissions.

The 2.4 API endpoint is only a listing. It still works in 2.6, but it will not work in a future release.

Automation controller

The following object roles list:

/api/v2/{model_name}/{id}/object_roles/

Example: /api/v2/credentials/42/

/api/gateway/v1/role_user_assignments/?content_type__api_slug={model_api_slug}&object_id={id}

Example: /api/gateway/v1/role_user_assignments/?content_type__api_slug=awx.credential&object_id=42

List the roles that apply to a resource.

Automation controller

The following resource access list:

/api/v2/{model_name}/{id}/access_list/

Example: /api/v2/credentials/42/access_list/

Replacement in 2.6: /api/gateway/v1/role_user_access/{model_api_slug}/{id}/

Example: /api/gateway/v1/role_user_access/awx.credential/42/

List the users who have access to a resource.

Automation hub

/api/v3/login/keycloak

/api/gateway/social/complete/<UID>/

Moved to the platform gateway.

Automation hub

/api/v3/auth/token

/api/gateway/v1/tokens/

Token authentication used for pulling collections will migrate to the platform gateway tokens.

Event-Driven Ansible

N/A

/api/gateway/v1/organizations/

No action needed, as upgrades from 2.4 are not supported.

Event-Driven Ansible

N/A

/api/gateway/v1/teams/

No action needed, as upgrades from 2.4 are not supported.

Event-Driven Ansible

N/A

/api/gateway/v1/users/

No action needed, as upgrades from 2.4 are not supported.

Event-Driven Ansible

N/A

  • /api/gateway/v1/role_definitions/
  • /api/gateway/v1/role_team_assignments/
  • /api/gateway/v1/role_user_assignments/

New role capabilities included as part of the platform gateway API.