[OAS][DOCS] Add example for import saved objects API (#192291)

This commit is contained in:
Lisa Cawley 2024-09-09 12:17:31 -07:00 committed by GitHub
parent 910fa36e18
commit 9833f0f598
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 56 additions and 2 deletions

View file

@ -7269,6 +7269,14 @@ paths:
summary: Import saved objects
tags:
- saved objects
x-codeSamples:
- label: Import with createNewCopies
lang: cURL
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/status:
get:
operationId: '%2Fapi%2Fstatus#0'

View file

@ -10201,6 +10201,14 @@ paths:
summary: Import saved objects
tags:
- saved objects
x-codeSamples:
- label: Import with createNewCopies
lang: cURL
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/saved_objects/_resolve_import_errors:
post:
description: >

View file

@ -745,7 +745,14 @@
}
}
}
}
},
"x-codeSamples": [
{
"lang": "cURL",
"label": "Import with createNewCopies",
"source": "curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"
}
]
}
},
"/api/saved_objects/_resolve_import_errors": {

View file

@ -511,6 +511,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/400_response'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
/api/saved_objects/_resolve_import_errors:
post:
summary: Resolve import errors

View file

@ -230,7 +230,14 @@
}
}
}
}
},
"x-codeSamples": [
{
"lang": "cURL",
"label": "Import with createNewCopies",
"source": "curl \\\n -X POST api/saved_objects/_import?createNewCopies=true\n -H \"kbn-xsrf: true\"\n --form file=@file.ndjson\n"
}
]
}
}
},

View file

@ -176,6 +176,14 @@ paths:
application/json:
schema:
$ref: '#/components/schemas/400_response'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson
components:
parameters:
kbn_xsrf:

View file

@ -84,3 +84,11 @@ post:
application/json:
schema:
$ref: '../components/schemas/400_response.yaml'
x-codeSamples:
- lang: cURL
label: Import with createNewCopies
source: |
curl \
-X POST api/saved_objects/_import?createNewCopies=true
-H "kbn-xsrf: true"
--form file=@file.ndjson