Migrate API Builder API to Spec Hub

View as Markdown
Migrates an API Builder definition to a [Spec Hub](https://learning.postman.com/docs/design-apis/specifications/overview) specification. You can migrate the definition to an existing workspace, or create a new workspace to migrate the definition into. On success, this returns an HTTP `202 Created` response. You can use the GET `/apis/{apiId}/spec-migrations` endpoint to check the migration status. **Note:** This returns an HTTP `200 OK` response if the given API ID isn't an API Builder definition.

Authentication

x-api-keystring
API Key authentication via header
OR
Authorizationstring
A valid [SCIM API key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key) for calls to SCIM endpoints.
OR
AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

apiIdstringRequired
The API's ID.

Headers

AcceptenumRequired

The application/vnd.api.v10+json request header required to use the endpoint.

Allowed values:

Request

This endpoint expects an object.
Migrate to Existing WorkspaceobjectRequired
OR
Migrate to New WorkspaceobjectRequired
OR
Migrate Git-Connected Mono-Repo to New WorkspaceobjectRequired

Response

Empty API Migration
messagestring
The operation's message.
successboolean
If true, the migration succeeded.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error