الانتقال إلى المحتوى
الأقسام
Fiesta

api-tokens

المسار القطع التي تكون استجابة كاملة لا جزءًا من استجابة.

صفحة رموز API: الكشف لمرة واحدة، ونموذج الإنشاء، والقائمة، وأزرار الإلغاء.

كل مثال يعمل فعلًا، لكن روابطه لا تؤدي إلى أي مكان. يعرض HTML الترميز الجاهز للنسخ.

أربعة رموز، اثنان منها فعّالان

ترسل نماذج الإلغاء إلى ‎/tokens/revoke‎ و‎/tokens/revoke-agent‎ و‎/tokens/revoke-all‎، تحت مسار الصفحة نفسها. وجّهها إلى حيث يعالجها تطبيقك.

معاينة
<div rst-tokens>
  <section rst-box>
    <form rst-form method="post" action="/tokens">
      <div rst-field>
        <label rst-field-label for="agent">اسم الوكيل</label>
        <input rst-input type="text" id="agent" name="agent" maxlength="40">
      </div>
      <label rst-switch>
        <input type="checkbox" name="for_self" value="on">
        <span rst-switch-track aria-hidden="true"></span>
        هذا الرمز لي، وليس لوكيل
      </label>
      <fieldset rst-choice>
        <legend>الوصول</legend>
        <div rst-choice-cards>
          <label>
            <input type="radio" name="access" value="write" checked>
            <span>
              <span rst-choice-title>قراءة وكتابة</span>
            </span>
          </label>
          <label>
            <input type="radio" name="access" value="read">
            <span>
              <span rst-choice-title>قراءة فقط</span>
            </span>
          </label>
        </div>
      </fieldset>
      <div rst-field>
        <label rst-field-label for="expiry">تنتهي الصلاحية</label>
        <select rst-input="short" id="expiry" name="expiry">
          <option value="30">30 يومًا</option>
          <option value="90" selected>90 يومًا</option>
          <option value="365">سنة واحدة</option>
          <option value="never">أبدًا</option>
        </select>
      </div>
      <div rst-form-foot>
        <button rst-btn="primary lg" type="submit">إنشاء رمز</button>
      </div>
    </form>
  </section>
  <div rst-card rst-tokens-list role="table" aria-label="الرموز">
    <div rst-lrow="head" role="row">
      <span role="columnheader">الرمز</span>
      <span class="rst-m-hide" role="columnheader">الوصول</span>
      <span class="rst-m-hide" role="columnheader">تاريخ الإنشاء</span>
      <span class="rst-m-hide" role="columnheader">آخر استخدام</span>
      <span class="rst-m-hide" role="columnheader">تنتهي الصلاحية</span>
      <span role="columnheader"><span class="rst-sr-only">الحالة</span></span>
      <span role="columnheader"><span class="rst-sr-only">الإجراءات</span></span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Claude نيابةً عن Grace Hopper</span>
        <small>
          <code>k3Jx9QpL2mWa</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة وكتابة</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span><time datetime="2026-08-11">2026-08-11</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span><time datetime="2026-10-31">2026-10-31</time></span>
      <span rst-tokens-state role="cell"></span>
      <span role="cell">
        <details rst-row-menu name="rst-menus">
          <summary aria-label="إجراءات Claude نيابةً عن Grace Hopper">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <form method="post" action="/tokens/revoke">
              <input type="hidden" name="id" value="k3Jx9QpL2mWa">
              <button type="submit">إلغاء</button>
            </form>
          </div>
        </details>
      </span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Grace Hopper</span>
        <small>
          <code>Qm2vR8sT4xYb</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة فقط</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span>أبدًا</span>
      <span rst-tokens-state role="cell"></span>
      <span role="cell">
        <details rst-row-menu name="rst-menus">
          <summary aria-label="إجراءات Grace Hopper">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <form method="post" action="/tokens/revoke">
              <input type="hidden" name="id" value="Qm2vR8sT4xYb">
              <button type="submit">إلغاء</button>
            </form>
          </div>
        </details>
      </span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Codex نيابةً عن Grace Hopper</span>
        <small>
          <code>Zp7wN1cH6kLd</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة وكتابة</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span>أبدًا</span>
      <span rst-tokens-state role="cell"><span rst-status rst-tone="neutral">مُلغى</span></span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>الاستيراد الليلي نيابةً عن Grace Hopper</span>
        <small>
          <code>Vb4tG9yK3nMe</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة فقط</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span><time datetime="2026-08-11">2026-08-11</time></span>
      <span rst-tokens-state role="cell"><span rst-status rst-tone="warning">منتهي الصلاحية</span></span>
    </div>
  </div>
  <div rst-tokens-revoke>
    <form method="post" action="/tokens/revoke-agent">
      <input type="hidden" name="agent" value="Claude">
      <button rst-btn type="submit">إلغاء كل رموز هذا الوكيل: Claude</button>
    </form>
    <form method="post" action="/tokens/revoke-all">
      <button rst-btn="danger" type="submit">إلغاء كل الرموز</button>
    </form>
  </div>
</div>

في تطبيق حقيقي سيصل هذا إلى /tokens, /tokens/revoke, /tokens/revoke-agent, /tokens/revoke-all. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.

أُنشئ للتو: السر، معروض مرة واحدة

اعرض هذا في الاستجابة لنموذج الإنشاء نفسه، ولا تُعد توجيهها: السر موجود في تلك الاستجابة ولا في أي مكان آخر.

معاينة
<div rst-tokens>
  <div rst-callout rst-tone="positive" tabindex="-1" autofocus>
    <span rst-callout-ic aria-hidden="true">
      <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>
    </span>
    <div rst-callout-body>
      <strong>انسخ هذا الرمز الآن. لن يُعرض مرة أخرى.</strong>
      <p>
        <code rst-tokens-secret>harbour_k3Jx9QpL2mWa_6bD2qK9xWz4rT8vN1mP3sL7yF5hJ0cG2aE4uB</code>
      </p>
    </div>
  </div>
  <section rst-box>
    <form rst-form method="post" action="/tokens">
      <div rst-field>
        <label rst-field-label for="agent">اسم الوكيل</label>
        <input rst-input type="text" id="agent" name="agent" maxlength="40">
      </div>
      <label rst-switch>
        <input type="checkbox" name="for_self" value="on">
        <span rst-switch-track aria-hidden="true"></span>
        هذا الرمز لي، وليس لوكيل
      </label>
      <fieldset rst-choice>
        <legend>الوصول</legend>
        <div rst-choice-cards>
          <label>
            <input type="radio" name="access" value="write" checked>
            <span>
              <span rst-choice-title>قراءة وكتابة</span>
            </span>
          </label>
          <label>
            <input type="radio" name="access" value="read">
            <span>
              <span rst-choice-title>قراءة فقط</span>
            </span>
          </label>
        </div>
      </fieldset>
      <div rst-field>
        <label rst-field-label for="expiry">تنتهي الصلاحية</label>
        <select rst-input="short" id="expiry" name="expiry">
          <option value="30">30 يومًا</option>
          <option value="90" selected>90 يومًا</option>
          <option value="365">سنة واحدة</option>
          <option value="never">أبدًا</option>
        </select>
      </div>
      <div rst-form-foot>
        <button rst-btn="primary lg" type="submit">إنشاء رمز</button>
      </div>
    </form>
  </section>
  <div rst-card rst-tokens-list role="table" aria-label="الرموز">
    <div rst-lrow="head" role="row">
      <span role="columnheader">الرمز</span>
      <span class="rst-m-hide" role="columnheader">الوصول</span>
      <span class="rst-m-hide" role="columnheader">تاريخ الإنشاء</span>
      <span class="rst-m-hide" role="columnheader">آخر استخدام</span>
      <span class="rst-m-hide" role="columnheader">تنتهي الصلاحية</span>
      <span role="columnheader"><span class="rst-sr-only">الحالة</span></span>
      <span role="columnheader"><span class="rst-sr-only">الإجراءات</span></span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Claude نيابةً عن Grace Hopper</span>
        <small>
          <code>k3Jx9QpL2mWa</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة وكتابة</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span><time datetime="2026-08-11">2026-08-11</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span><time datetime="2026-10-31">2026-10-31</time></span>
      <span rst-tokens-state role="cell"></span>
      <span role="cell">
        <details rst-row-menu name="rst-menus">
          <summary aria-label="إجراءات Claude نيابةً عن Grace Hopper">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <form method="post" action="/tokens/revoke">
              <input type="hidden" name="id" value="k3Jx9QpL2mWa">
              <button type="submit">إلغاء</button>
            </form>
          </div>
        </details>
      </span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Grace Hopper</span>
        <small>
          <code>Qm2vR8sT4xYb</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة فقط</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span>أبدًا</span>
      <span rst-tokens-state role="cell"></span>
      <span role="cell">
        <details rst-row-menu name="rst-menus">
          <summary aria-label="إجراءات Grace Hopper">
            <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="1"/><circle cx="12" cy="5" r="1"/><circle cx="12" cy="19" r="1"/></svg>
          </summary>
          <div rst-row-menu-panel>
            <form method="post" action="/tokens/revoke">
              <input type="hidden" name="id" value="Qm2vR8sT4xYb">
              <button type="submit">إلغاء</button>
            </form>
          </div>
        </details>
      </span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>Codex نيابةً عن Grace Hopper</span>
        <small>
          <code>Zp7wN1cH6kLd</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة وكتابة</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span>أبدًا</span>
      <span rst-tokens-state role="cell"><span rst-status rst-tone="neutral">مُلغى</span></span>
    </div>
    <div rst-lrow role="row">
      <span class="rst-nm" role="rowheader"><span rst-actor>الاستيراد الليلي نيابةً عن Grace Hopper</span>
        <small>
          <code>Vb4tG9yK3nMe</code>
        </small>
      </span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>الوصول</span>قراءة فقط</span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تاريخ الإنشاء</span><time datetime="2026-08-02">2026-08-02</time></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>آخر استخدام</span></span>
      <span rst-tokens-fact role="cell"><span rst-tokens-fact-label>تنتهي الصلاحية</span><time datetime="2026-08-11">2026-08-11</time></span>
      <span rst-tokens-state role="cell"><span rst-status rst-tone="warning">منتهي الصلاحية</span></span>
    </div>
  </div>
  <div rst-tokens-revoke>
    <form method="post" action="/tokens/revoke-agent">
      <input type="hidden" name="agent" value="Claude">
      <button rst-btn type="submit">إلغاء كل رموز هذا الوكيل: Claude</button>
    </form>
    <form method="post" action="/tokens/revoke-all">
      <button rst-btn="danger" type="submit">إلغاء كل الرموز</button>
    </form>
  </div>
</div>

في تطبيق حقيقي سيصل هذا إلى /tokens, /tokens/revoke, /tokens/revoke-agent, /tokens/revoke-all. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.

لا توجد رموز بعد

معاينة
<div rst-tokens>
  <section rst-box>
    <form rst-form method="post" action="/tokens">
      <div rst-field>
        <label rst-field-label for="agent">اسم الوكيل</label>
        <input rst-input type="text" id="agent" name="agent" maxlength="40">
      </div>
      <label rst-switch>
        <input type="checkbox" name="for_self" value="on">
        <span rst-switch-track aria-hidden="true"></span>
        هذا الرمز لي، وليس لوكيل
      </label>
      <fieldset rst-choice>
        <legend>الوصول</legend>
        <div rst-choice-cards>
          <label>
            <input type="radio" name="access" value="write" checked>
            <span>
              <span rst-choice-title>قراءة وكتابة</span>
            </span>
          </label>
          <label>
            <input type="radio" name="access" value="read">
            <span>
              <span rst-choice-title>قراءة فقط</span>
            </span>
          </label>
        </div>
      </fieldset>
      <div rst-field>
        <label rst-field-label for="expiry">تنتهي الصلاحية</label>
        <select rst-input="short" id="expiry" name="expiry">
          <option value="30">30 يومًا</option>
          <option value="90" selected>90 يومًا</option>
          <option value="365">سنة واحدة</option>
          <option value="never">أبدًا</option>
        </select>
      </div>
      <div rst-form-foot>
        <button rst-btn="primary lg" type="submit">إنشاء رمز</button>
      </div>
    </form>
  </section>
  <div rst-empty>
    <p rst-empty-body>لا توجد رموز بعد.</p>
  </div>
</div>

في تطبيق حقيقي سيصل هذا إلى /tokens. أما هنا فروابطه ونماذجه لا تذهب إلى أي مكان.