Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Reverted from v. 2
Sv translation
languageen

/api/users/:id

Invalidates Deletes the access token and user sessions specified specified by user ID.

Resource Information

 

Request Parameters

Parameter

Detail

Example

idID of the user to update.123

Sample Request / Response

Using curl:

Code Block
curl -X "DELETE" -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\""  https://service.belladati.com/api/users/123/sessions

When the request has been executed successfully, the server replies with an HTTP status code of 200 and an empty body. 

 

Sv translation
languageja

/api/users/:id

IDで指定したユーザーを変更します。

リソース情報

リソースURL

https://service.belladati.com/api/users/:id

HTTP方法

POST

リクエストパラメータ

パラメータ
詳細
id更新するユーザーのID123
data

次のJSON形式で送信するフォームコンテンツ

説明
emailユーザーのメールアドレス
lastNameユーザーの姓
usernameユーザ名
firstNameユーザ名前
timeZone(任意)ユーザのタイムゾーン
info(任意)ユーザーの詳細情報
locale(任意)ユーザーロケール - サポートされる言語のコード
groups

(任意)配列はユーザーが所得する全てのユーザーグループを含みます。各グループの構造は次のとおりです。

説明
idユーザー・グループ識別子
nameユーザグループ名
roles

(任意)配列はユーザーが所属するすべてのユーザーグループを含みます。各グループの構造は次のとおりです。

説明
role役割名  -  サポートされる値のリストをご参照してください


{
  "username""myusername",
  "email""myusername@example.com",
  "firstName""John",
  "lastName""Doe",
  "info""I'm pretty cool",
  "timeZone""Europe/Prague",
  "locale""cs",
  "roles": [
    {
      "role""DATASET_ADMIN"
    },
    {
      "role""REPORT_ADMIN"
    }
  ],
  "groups": [
    {
      "id""56",
      "name""My User Group nr.1"
    }
  ]
}

サンプルリクエスト/レスポンス

curl使用:

 

curl -H "Authorization: OAuth realm=\"https://service.belladati.com/\", oauth_consumer_key=\"myConsumer\", oauth_token=\"mh7an9dkrg59\", oauth_timestamp=\"135131231\", oauth_nonce=\"randomString\"" -d "data={\"username\":\"myusername\",\"email\":\"myusername@example.com\",\"firstName\":\"John\",\"lastName\":\"Doe\"}" https://service.belladati.com/api/users/123

 

フォームが正常に送信された場合、サーバはHTTPステータスコード200と新しいユーザのIDを含む本体で応答しする。