Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v1.1 info in "Using REST API for updating Add-ons" #3269

Merged
merged 56 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
43c6690
Update using-addons-api.md
bhuvanapriyap Sep 17, 2024
d0dcd1a
Merge branch 'main' into v-bhuvana
mikehoffms Sep 18, 2024
8f8baf8
Writer/Editor pass
mikehoffms Sep 18, 2024
75b20b5
full name of API each time
mikehoffms Sep 18, 2024
64ef655
improve v2 intro section
mikehoffms Sep 18, 2024
09e1c96
add todo cmts re: v2 p.c. UI
mikehoffms Sep 18, 2024
05166a6
rewrite h2 Before you begin
mikehoffms Sep 18, 2024
10c49ea
clarify "auto update n/a for P.C. extensions"
mikehoffms Sep 18, 2024
26a2c2a
state scenario of applicability
mikehoffms Sep 18, 2024
fb86547
externally installed extension
mikehoffms Sep 18, 2024
3ec3781
acknowledge externally installed extensions
mikehoffms Sep 18, 2024
edc24c4
normalize leading spaces
mikehoffms Sep 18, 2024
b56265e
norm indents more
mikehoffms Sep 18, 2024
1643cfa
try 4 lead spaces in 1st section 55-71
mikehoffms Sep 18, 2024
a1c9526
desc: & See also h2
mikehoffms Sep 18, 2024
721162f
link to Partner Center. add See also h2 section
mikehoffms Sep 18, 2024
c924fb8
norm'ize Check Status step list
mikehoffms Sep 18, 2024
b8948a8
(CD)
mikehoffms Sep 19, 2024
ec35d2c
link trim
mikehoffms Sep 19, 2024
d24902d
link trim 2
mikehoffms Sep 19, 2024
e1c51d4
Rewrite "Before you begin" headings
mikehoffms Sep 19, 2024
3af0345
Merge branch 'main' into v-bhuvana
mikehoffms Sep 19, 2024
ac59727
typo an Microsoft account
mikehoffms Sep 19, 2024
726b0df
change v2 to v1.1
mikehoffms Sep 19, 2024
4fa992f
tabsets
mikehoffms Sep 19, 2024
6e1520f
key not keys; isolate v1.1 from v1 info; ClientID
mikehoffms Sep 19, 2024
a75eab5
resolved todos
mikehoffms Sep 19, 2024
489899b
p.c. 1.1 pngs, tabsets for code in Using
mikehoffms Sep 19, 2024
26c0144
true code in v1.1 tabs
mikehoffms Sep 19, 2024
0366023
linkfix, add Update to title
mikehoffms Sep 19, 2024
69f67db
shrink "v1.1 vs v1" section, link Overview to h2s
mikehoffms Sep 19, 2024
4f20802
state the png shows initial v1 UI
mikehoffms Sep 19, 2024
5a0995b
token vs url
mikehoffms Sep 19, 2024
7d7fbb8
anchor link fix
mikehoffms Sep 19, 2024
9629da2
reseq title now that it's long
mikehoffms Sep 19, 2024
d7ecfd6
add "update" to Ref article title
mikehoffms Sep 19, 2024
79797c1
clarify lead-in re: access token & url
mikehoffms Sep 19, 2024
957d3b0
title for Using more like for Ref article
mikehoffms Sep 19, 2024
cff19aa
not "cover"; clarif "opt in"
mikehoffms Sep 19, 2024
2d61c95
convert mid-sentence lists
mikehoffms Sep 19, 2024
e155b55
corrected list of endpoints abilities
mikehoffms Sep 19, 2024
6144242
endpoint root
mikehoffms Sep 19, 2024
7ecd579
missing colon X-Client, break curl into 2-3 lines
mikehoffms Sep 20, 2024
575cd08
$varName, hints, tips, links
mikehoffms Sep 20, 2024
842a6dd
revert auth token url to v2.0
mikehoffms Sep 20, 2024
d0d1edb
comment out unclear paragraph
mikehoffms Sep 20, 2024
39b45c2
$varName consistency, keep /v1/
mikehoffms Sep 20, 2024
038a50e
Merge branch 'main' into v-bhuvana
mikehoffms Sep 20, 2024
bd18124
PUT -> POST
mikehoffms Sep 20, 2024
e0e81cc
azure to entra 404
mikehoffms Sep 20, 2024
0cac749
{operationID} to $operationID in send lines
mikehoffms Sep 20, 2024
39a14c5
Update released-features.md
mikehoffms Sep 23, 2024
33c7923
not publish extension. CI/CD expansion
mikehoffms Sep 23, 2024
b967f24
the api --> this api
mikehoffms Sep 23, 2024
b7d9106
restructure Intro
mikehoffms Sep 23, 2024
d8dd8b8
clarify opt in to API key UX
mikehoffms Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
$varName, hints, tips, links
  • Loading branch information
mikehoffms committed Sep 20, 2024
commit 575cd0808e162fb15d73567933ce50ef1630370e
Original file line number Diff line number Diff line change
@@ -23,9 +23,12 @@ As of September 6, 2024, both v1.1 and v1 of this Update REST API are supported.

<!-- ====================================================================== -->
## Upload a package to update an existing submission
<!-- endpoint 1: POST /submissions/draft/package -->

Uploads a package to update an existing draft submission of an add-on product.

See also [Uploading a package to update an existing submission](./using-addons-api.md#uploading-a-package-to-update-an-existing-submission) in _Using the REST API for updating Microsoft Edge Add-ons_.


<!-- ------------------------------ -->
#### Request
@@ -34,6 +37,15 @@ Uploads a package to update an existing draft submission of an add-on product.
|---|---|
| `POST` | `/products/{productID}/submissions/draft/package` |

<!-- todo:
change {operationID} to $operationID ?
change {productID} to $productID ?
change {operationID} to $operationID ?

like format used in using.md
global, consistency pass in using.md & ref.md
-->


<!-- ---------- -->
###### URI parameters
@@ -42,6 +54,10 @@ Uploads a package to update an existing draft submission of an add-on product.
|---|---|
| `productID` | Required. The product ID of the product to which the package must be uploaded. |

<!-- todo: in these tables, change eg productID to $productID ?
global, consistency pass in using.md & ref.md
-->


<!-- ---------- -->
###### Request headers
@@ -50,23 +66,13 @@ The following request headers are required:

##### [v1.1](#tab/v1-1)

* `Authorization: ApiKey <api key>`
* `X-ClientID: <client ID>`
* `Authorization: ApiKey $ApiKey`
* `X-ClientID: $ClientID`
* `Content-Type: application/zip`

<!-- todo:
change <client ID> to $ClientID ?
change <api key> to $ApiKey ?
change order?
per using.md:
Authorization: ApiKey $ApiKey; Content-Type: application/zip; X-ClientID $ClientID

global in article, & check using.md
-->

##### [v1](#tab/v1)

* `Authorization: Bearer <auth token>`
* `Authorization: Bearer $TOKEN`
* `Content-Type: application/zip`

---
@@ -87,6 +93,8 @@ global in article, & check using.md

* Location: `{operationID}`

The response includes an operation ID, to send to other endpoints.


<!-- ---------- -->
###### Status codes
@@ -106,9 +114,12 @@ See also:

<!-- ====================================================================== -->
## Check the status of a package upload
<!-- endpoint 2: GET submissions/draft/package/operations/$operationID -->

Gets the status of the package upload.

See also [Checking the status of a package upload](./using-addons-api.md#checking-the-status-of-a-package-upload) in _Using the REST API for updating Microsoft Edge Add-ons_.


<!-- ------------------------------ -->
#### Request
@@ -133,12 +144,12 @@ The following request headers are required:

##### [v1.1](#tab/v1-1)

* `Authorization: ApiKey <api key>`
* `X-ClientID: <client ID>`
* `Authorization: ApiKey $ApiKey`
* `X-ClientID: $ClientID`

##### [v1](#tab/v1)

* `Authorization: Bearer <auth token>`
* `Authorization: Bearer $TOKEN`

---

@@ -227,9 +238,12 @@ See also:

<!-- ====================================================================== -->
## Publish the product draft submission
<!-- endpoint 3: POST /submissions -->

Publishes the current draft of the product to Microsoft Edge Add-ons.

See also [Publishing the submission](./using-addons-api.md#publishing-the-submission) in _Using the REST API for updating Microsoft Edge Add-ons_.


<!-- ------------------------------ -->
#### Request
@@ -254,12 +268,12 @@ The following request headers are required:

##### [v1.1](#tab/v1-1)

* `Authorization: ApiKey <api key>`
* `X-ClientID: <client ID>`
* `Authorization: ApiKey $ApiKey`
* `X-ClientID: $ClientID`

##### [v1](#tab/v1)

* `Authorization: Bearer <auth token>`
* `Authorization: Bearer $TOKEN`

---

@@ -279,6 +293,8 @@ The following request headers are required:

* Location: `{operationID}`

The response includes an operation ID, to send to other endpoints.


<!-- ---------- -->
###### Status codes
@@ -298,9 +314,12 @@ See also:

<!-- ====================================================================== -->
## Check the publishing status
<!-- endpoint 4: GET /submissions/operations/$operationID -->

Checks the status of the publish operation.

See also [Checking the publishing status](using-addons-api.md#checking-the-publishing-status) in _Using the REST API for updating Microsoft Edge Add-ons_.


<!-- ------------------------------ -->
#### Request
@@ -324,12 +343,12 @@ The following request headers are required:

##### [v1.1](#tab/v1-1)

* `Authorization: ApiKey <api key>`
* `X-ClientID: <client ID>`
* `Authorization: ApiKey $ApiKey`
* `X-ClientID: $ClientID`

##### [v1](#tab/v1)

* `Authorization: Bearer <auth token>`
* `Authorization: Bearer $TOKEN`

---

@@ -345,6 +364,8 @@ None.

A `GET` operation status API can be called in the following scenarios. In all valid scenarios, `200 OK` is returned, with different status messages.

The response includes an operation ID, to send to other endpoints.


<!-- ---------- -->
###### Response when a new product is published
@@ -543,4 +564,4 @@ Here's a list of common error codes and possible reasons. For a full list, see
<!-- all article-level links in article body: -->
* [Using the REST API for updating Microsoft Edge Add-ons](./using-addons-api.md)
* [Partner Center REST error codes](/partner-center/develop/error-codes) in Partner Center docs.
* [List of HTTP status codes](https://wikipedia.org/wiki/List_of_HTTP_status_codes) at Wikipedia.
* [List of HTTP status codes](https://wikipedia.org/wiki/List_of_HTTP_status_codes) at Wikipedia.
44 changes: 35 additions & 9 deletions microsoft-edge/extensions-chromium/publish/api/using-addons-api.md
Original file line number Diff line number Diff line change
@@ -174,8 +174,9 @@ Header Parameters: Content-Type: application/x-www-form-urlencoded

<!-- ---------- -->
###### Sample request
<!-- to retrieve access token (v1 only) -->

For example, to get an access token, send a POST request to the access token URL, as follows:
For example, to get an access token, send a POST request to the access token URL, by entering a `curl` command at the command prompt, as follows:

```console
> curl \
@@ -242,26 +243,29 @@ To create a new product or update a product's metadata, you must use Microsoft P

<!-- ====================================================================== -->
## Uploading a package to update an existing submission
<!-- endpoint 1 -->
<!-- endpoint 1: POST /submissions/draft/package -->

Use this REST API endpoint to update the package for an add-on. This API uploads a package to update an existing draft submission of an add-on product.

See also [Upload a package to update an existing submission](./addons-api-reference.md#upload-a-package-to-update-an-existing-submission) in _REST API Reference for updating Microsoft Edge Add-ons_.


<!-- ---------------------------------------------- -->
#### Endpoint description
<!-- todo: must label these code blocks that are above the "Sample" section headings code blocks - Global in both article
what kind of code block is each of these? 3 different kinds in 2 different articles = 3 different kinds of code blocks?
-->

##### [v1.1](#tab/v1-1)

```REST
Endpoint: /v1/products/$productID/submissions/draft/package
Type: POST
Header Parameters: Authorization: ApiKey $ApiKey; Content-Type: application/zip; X-ClientID: $ClientID
Header Parameters: Authorization: ApiKey $ApiKey; X-ClientID: $ClientID; Content-Type: application/zip
Body content: the package file to upload
```

<!-- todo: change /v1/ to /v1-1/ ?
global in using.md & ref.md
-->

##### [v1](#tab/v1)

```REST
@@ -290,6 +294,9 @@ To get the product ID:

<!-- ---------------------------------- -->
#### Sample request
<!-- for endpoint 1 -->

To upload a package to update an existing submission, use the `curl` command at a command prompt as follows:

##### [v1.1](#tab/v1-1)

@@ -327,10 +334,14 @@ See also:

<!-- ====================================================================== -->
## Checking the status of a package upload
<!-- endpoint 2 -->
<!-- endpoint 2: GET submissions/draft/package/operations/$operationID -->

Use this API to check the status of package upload.

`$operationID` is the operation ID that's returned in the response header from [Uploading a package to update an existing submission](#uploading-a-package-to-update-an-existing-submission) or [Publishing the submission](#publishing-the-submission).

See also [Check the publishing status](./addons-api-reference.md#check-the-publishing-status) in _REST API Reference for updating Microsoft Edge Add-ons_.


<!-- ---------------------------------------------- -->
#### Endpoint description
@@ -356,6 +367,9 @@ Header Parameters: Authorization: Bearer $TOKEN

<!-- ---------------------------------- -->
#### Sample request
<!-- for endpoint 2 -->

To check the status of a package upload, use the `curl` command at the command prompt as follows:

##### [v1.1](#tab/v1-1)

@@ -386,10 +400,12 @@ See also:

<!-- ====================================================================== -->
## Publishing the submission
<!-- endpoint 3 -->
<!-- endpoint 3: POST /submissions -->

Use this API to publish the current draft of the product to the Microsoft Edge Add-ons website.

See also [Publish the product draft submission](./addons-api-reference.md#publish-the-product-draft-submission) in _REST API Reference for updating Microsoft Edge Add-ons_.


<!-- ---------------------------------------------- -->
#### Endpoint description
@@ -417,6 +433,9 @@ Body content: Notes for certification, in JSON format

<!-- ---------------------------------- -->
#### Sample request
<!-- for endpoint 3 -->

To publish the submission, use the `curl` command at the command prompt as follows:

##### [v1.1](#tab/v1-1)

@@ -451,10 +470,14 @@ See also:

<!-- ====================================================================== -->
## Checking the publishing status
<!-- endpoint 4 -->
<!-- endpoint 4: GET /submissions/operations/$operationID -->

Use this API to check the status of the publish operation.

`$operationID` is the operation ID that's returned in the response header from [Uploading a package to update an existing submission](#uploading-a-package-to-update-an-existing-submission) or [Publishing the submission](#publishing-the-submission).

See also [Check the publishing status](./addons-api-reference.md#check-the-publishing-status) in _REST API Reference for updating Microsoft Edge Add-ons_.


<!-- ---------------------------------------------- -->
#### Endpoint description
@@ -480,6 +503,9 @@ Header Parameters: Authorization: Bearer $TOKEN

<!-- ---------------------------------- -->
#### Sample request
<!-- for endpoint 4 -->

To check the publishing status, use the `curl` command at the command prompt as follows:

##### [v1.1](#tab/v1-1)