|
| 1 | +--- |
| 2 | +--- |
| 3 | + |
| 4 | +# Application Passwords |
| 5 | + |
| 6 | +<section class="route"> |
| 7 | + <div class="primary"> |
| 8 | + <h2>Schema</h2> |
| 9 | +<p>The schema defines all the fields that exist within a application password record. Any response from these endpoints can be expected to contain the fields below unless the `_filter` query parameter is used or the schema field only appears in a specific context.</p> |
| 10 | +<table class="attributes"> |
| 11 | + <tr id="schema-uuid"> |
| 12 | + <td> |
| 13 | + <code>uuid</code><br /> |
| 14 | + <span class="type"> |
| 15 | + string, |
| 16 | + uuid |
| 17 | + </span> |
| 18 | + </td> |
| 19 | + <td> |
| 20 | + <p>The unique identifier for the application password.</p> |
| 21 | + <p class="read-only">Read only</p> |
| 22 | + <p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p> |
| 23 | + </td> |
| 24 | + </tr> |
| 25 | + <tr id="schema-app_id"> |
| 26 | + <td> |
| 27 | + <code>app_id</code><br /> |
| 28 | + <span class="type"> |
| 29 | + string, |
| 30 | + uuid |
| 31 | + </span> |
| 32 | + </td> |
| 33 | + <td> |
| 34 | + <p>A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.</p> |
| 35 | + <p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p> |
| 36 | + </td> |
| 37 | + </tr> |
| 38 | + <tr id="schema-name"> |
| 39 | + <td> |
| 40 | + <code>name</code><br /> |
| 41 | + <span class="type"> |
| 42 | + string </span> |
| 43 | + </td> |
| 44 | + <td> |
| 45 | + <p>The name of the application password.</p> |
| 46 | + <p class="context">Context: <code>view</code>, <code>edit</code>, <code>embed</code></p> |
| 47 | + </td> |
| 48 | + </tr> |
| 49 | + <tr id="schema-password"> |
| 50 | + <td> |
| 51 | + <code>password</code><br /> |
| 52 | + <span class="type"> |
| 53 | + string </span> |
| 54 | + </td> |
| 55 | + <td> |
| 56 | + <p>The generated password. Only available after adding an application.</p> |
| 57 | + <p class="read-only">Read only</p> |
| 58 | + <p class="context">Context: <code>edit</code></p> |
| 59 | + </td> |
| 60 | + </tr> |
| 61 | + <tr id="schema-created"> |
| 62 | + <td> |
| 63 | + <code>created</code><br /> |
| 64 | + <span class="type"> |
| 65 | + string, |
| 66 | + datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>) |
| 67 | + </span> |
| 68 | + </td> |
| 69 | + <td> |
| 70 | + <p>The GMT date the application password was created.</p> |
| 71 | + <p class="read-only">Read only</p> |
| 72 | + <p class="context">Context: <code>view</code>, <code>edit</code></p> |
| 73 | + </td> |
| 74 | + </tr> |
| 75 | + <tr id="schema-last_used"> |
| 76 | + <td> |
| 77 | + <code>last_used</code><br /> |
| 78 | + <span class="type"> |
| 79 | + string or null, |
| 80 | + datetime (<a href="https://core.trac.wordpress.org/ticket/41032">details</a>) |
| 81 | + </span> |
| 82 | + </td> |
| 83 | + <td> |
| 84 | + <p>The GMT date the application password was last used.</p> |
| 85 | + <p class="read-only">Read only</p> |
| 86 | + <p class="context">Context: <code>view</code>, <code>edit</code></p> |
| 87 | + </td> |
| 88 | + </tr> |
| 89 | + <tr id="schema-last_ip"> |
| 90 | + <td> |
| 91 | + <code>last_ip</code><br /> |
| 92 | + <span class="type"> |
| 93 | + string or null, |
| 94 | + ip |
| 95 | + </span> |
| 96 | + </td> |
| 97 | + <td> |
| 98 | + <p>The IP address the application password was last used by.</p> |
| 99 | + <p class="read-only">Read only</p> |
| 100 | + <p class="context">Context: <code>view</code>, <code>edit</code></p> |
| 101 | + </td> |
| 102 | + </tr> |
| 103 | + </table> |
| 104 | + |
| 105 | + </div> |
| 106 | +</section> |
| 107 | + |
| 108 | +<div><section class="route"> |
| 109 | + <div class="primary"> |
| 110 | + <h2>Retrieve a Application Password</h2> |
| 111 | + |
| 112 | + <h3>Definition & Example Request</h3> |
| 113 | + |
| 114 | + <code>GET /wp/v2/users/<user_id>)/application-passwords</code> |
| 115 | + |
| 116 | + <p>Query this endpoint to retrieve a specific application password record.</p> |
| 117 | + |
| 118 | + <code>$ curl https://example.com/wp-json/wp/v2/users/<user_id>)/application-passwords</code> |
| 119 | + </div> |
| 120 | + <div class="secondary"> |
| 121 | + <h3>Arguments</h3> |
| 122 | + <table class="arguments"> |
| 123 | + <tr> |
| 124 | + <td> |
| 125 | + <code>context</code><br /> |
| 126 | + </td> |
| 127 | + <td> |
| 128 | + <p>Scope under which the request is made; determines fields present in response.</p> |
| 129 | + <p class="default"> |
| 130 | + Default: <code>view</code> |
| 131 | + </p> |
| 132 | + <p>One of: <code>view</code>, <code>embed</code>, <code>edit</code></p> |
| 133 | + </td> |
| 134 | + </tr> |
| 135 | + </table> |
| 136 | + |
| 137 | + </div> |
| 138 | +</section> |
| 139 | +<section class="route"> |
| 140 | + <div class="primary"> |
| 141 | + <h2>Create a Application Password</h2> |
| 142 | + <h3>Arguments</h3> |
| 143 | + <table class="arguments"> |
| 144 | + <tr> |
| 145 | + <td> |
| 146 | + <code><a href="#schema-app_id">app_id</a></code><br /> |
| 147 | + </td> |
| 148 | + <td> |
| 149 | + <p>A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.</p> |
| 150 | + </td> |
| 151 | + </tr> |
| 152 | + <tr> |
| 153 | + <td> |
| 154 | + <code><a href="#schema-name">name</a></code><br /> |
| 155 | + </td> |
| 156 | + <td> |
| 157 | + <p>The name of the application password.</p> |
| 158 | + <p class="required"> |
| 159 | + Required: 1 |
| 160 | + </p> |
| 161 | + </td> |
| 162 | + </tr> |
| 163 | + </table> |
| 164 | + |
| 165 | + </div> |
| 166 | + <div class="secondary"> |
| 167 | + <h3>Definition</h3> |
| 168 | + |
| 169 | + <code>POST /wp/v2/users/<user_id>)/application-passwords</code> |
| 170 | + </div> |
| 171 | +</section> |
| 172 | +<section class="route"> |
| 173 | + <div class="primary"> |
| 174 | + <h2>Delete a Application Password</h2> |
| 175 | + <p>There are no arguments for this endpoint.</p> |
| 176 | + |
| 177 | + </div> |
| 178 | + <div class="secondary"> |
| 179 | + <h3>Definition</h3> |
| 180 | + |
| 181 | + <code>DELETE /wp/v2/users/<user_id>)/application-passwords</code> |
| 182 | + |
| 183 | + <h3>Example Request</h3> |
| 184 | + |
| 185 | + <code>$ curl -X DELETE https://example.com/wp-json/wp/v2/users/<user_id>)/application-passwords</code> |
| 186 | + </div> |
| 187 | +</section> |
| 188 | +<section class="route"> |
| 189 | + <div class="primary"> |
| 190 | + <h2>Retrieve a Application Password</h2> |
| 191 | + |
| 192 | + <h3>Definition & Example Request</h3> |
| 193 | + |
| 194 | + <code>GET /wp/v2/users/<user_id>)/application-passwords/<uuid></code> |
| 195 | + |
| 196 | + <p>Query this endpoint to retrieve a specific application password record.</p> |
| 197 | + |
| 198 | + <code>$ curl https://example.com/wp-json/wp/v2/users/<user_id>)/application-passwords/<uuid></code> |
| 199 | + </div> |
| 200 | + <div class="secondary"> |
| 201 | + <h3>Arguments</h3> |
| 202 | + <table class="arguments"> |
| 203 | + <tr> |
| 204 | + <td> |
| 205 | + <code>context</code><br /> |
| 206 | + </td> |
| 207 | + <td> |
| 208 | + <p>Scope under which the request is made; determines fields present in response.</p> |
| 209 | + <p class="default"> |
| 210 | + Default: <code>view</code> |
| 211 | + </p> |
| 212 | + <p>One of: <code>view</code>, <code>embed</code>, <code>edit</code></p> |
| 213 | + </td> |
| 214 | + </tr> |
| 215 | + </table> |
| 216 | + |
| 217 | + </div> |
| 218 | +</section> |
| 219 | +<section class="route"> |
| 220 | + <div class="primary"> |
| 221 | + <h2>Update a Application Password</h2> |
| 222 | + <h3>Arguments</h3> |
| 223 | + <table class="arguments"> |
| 224 | + <tr> |
| 225 | + <td> |
| 226 | + <code><a href="#schema-app_id">app_id</a></code><br /> |
| 227 | + </td> |
| 228 | + <td> |
| 229 | + <p>A uuid provided by the application to uniquely identify it. It is recommended to use an UUID v5 with the URL or DNS namespace.</p> |
| 230 | + </td> |
| 231 | + </tr> |
| 232 | + <tr> |
| 233 | + <td> |
| 234 | + <code><a href="#schema-name">name</a></code><br /> |
| 235 | + </td> |
| 236 | + <td> |
| 237 | + <p>The name of the application password.</p> |
| 238 | + </td> |
| 239 | + </tr> |
| 240 | + </table> |
| 241 | + |
| 242 | + </div> |
| 243 | + <div class="secondary"> |
| 244 | + <h3>Definition</h3> |
| 245 | + |
| 246 | + <code>POST /wp/v2/users/<user_id>)/application-passwords/<uuid></code> |
| 247 | + |
| 248 | + <h3>Example Request</h3> |
| 249 | + |
| 250 | + <code></code> |
| 251 | + </div> |
| 252 | +</section> |
| 253 | +<section class="route"> |
| 254 | + <div class="primary"> |
| 255 | + <h2>Delete a Application Password</h2> |
| 256 | + <p>There are no arguments for this endpoint.</p> |
| 257 | + |
| 258 | + </div> |
| 259 | + <div class="secondary"> |
| 260 | + <h3>Definition</h3> |
| 261 | + |
| 262 | + <code>DELETE /wp/v2/users/<user_id>)/application-passwords/<uuid></code> |
| 263 | + |
| 264 | + <h3>Example Request</h3> |
| 265 | + |
| 266 | + <code>$ curl -X DELETE https://example.com/wp-json/wp/v2/users/<user_id>)/application-passwords/<uuid></code> |
| 267 | + </div> |
| 268 | +</section> |
| 269 | +</div> |
0 commit comments