Import OpenAPI/Swagger Data
POST
/v1/projects/{projectId}/import-openapi
Function Description
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl --location -g --request POST 'https://api.apidog.com/v1/projects/{{projectId}}/import-openapi?locale=en-US' \
--header 'X-Apidog-Api-Version;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
"url": "https://petstore.swagger.io/v2/swagger.json"
},
"options": {
"targetEndpointFolderId": 0,
"targetSchemaFolderId": 0,
"endpointOverwriteBehavior": "OVERWRITE_EXISTING",
"schemaOverwriteBehavior": "OVERWRITE_EXISTING",
"updateFolderOfChangedEndpoint": false,
"prependBasePath": false
}
}'
Response Response Example
{
"data": {
"counters": {
"endpointCreated": 10,
"endpointUpdated": 0,
"endpointFailed": 0,
"endpointIgnored": 0,
"schemaCreated": 10,
"schemaUpdated": 0,
"schemaFailed": 0,
"schemaIgnored": 0,
"endpointFolderCreated": 0,
"endpointFolderUpdated": 0,
"endpointFolderFailed": 0,
"endpointFolderIgnored": 0,
"schemaFolderCreated": 0,
"schemaFolderUpdated": 0,
"schemaFolderFailed": 0,
"schemaFolderIgnored": 0
}
}
}
Request
Path Params
projectId
string
required
Example:
{{projectId}}
Query Params
locale
string
optional
Example:
en-US
Header Params
X-Apidog-Api-Version
enum<string>
required
Allowed value:
2024-03-28
Default:
2024-03-28
Authorization
string
required
Default:
Bearer {{access_token}}
Body Params application/json
Responses
Modified at 2025-03-11 07:39:30