メインコンテンツまでスキップ

スラッグによるWorkspacesとアプリの識別

API(およびBitriseサポートチーム)は、Workspaceのスラッグやプロジェクトのスラッグをよく尋ねます。スラッグは、これらのリソースを一意に識別するもので、16進数で構成されます。特定のWorkspaceまたはプロジェクトのスラッグは、UIとAPIの両方で確認できます。

Bitrise websiteでスラッグを確認するClick to copy link​

Workspaceのスラッグとプロジェクトのスラッグはどちらも、Bitrise websiteで確認できます。

  1. BitriseにLog inし、左側のナビゲーションバーにカーソルを合わせます。

  2. Workspaceメニューで、正しいworkspaceが選択されていることを確認します。

  3. Settingsを選択します。

  4. Workspace settingsページで、`General settings from the left navigation menu.

  5. Find the Workspace slug in the Workspace information section. You can copy the slug by clicking the copy button next to it.

    workspace-slug.png

Bitrise APIを使用したスラッグの確認Click to copy link​

You can get the slug for all Workspaces and apps you have access to with simple API calls.

  1. Authenticate with the Bitrise API.

  2. Call the GET /organizations endpoint with your Personal Access Token:

    curl -X 'GET' \
    'https://api.bitrise.io/v0.1/organizations' \
    -H 'accept: application/json' \
    -H 'Authorization: <ACCESS-TOKEN>'
  3. Find the slug in the response:

    {
    "data": [
    {
    "name": "TestOrg",
    "slug": "2dec5c71bbce73d9",
    "avatar_icon_url": "https://bitrise-public-content-production.s3.amazonaws.com/org-icons/default_avatar-09.png",
    "concurrency_count": null,
    "owners": [
    {
    "slug": "1b3f130835b1c09ef2",
    "username": "bitbot",
    "email": "[email protected]"
    }
    ]
    }
    ]
    }