Zum Hauptinhalt springen

Users

Veröffentlicht am 27. Juni 2019· Aktualisiert am 25. Februar 2020

Cover image for: Users

The user resource represents the end-user of the data retrieved from the API. For example, if an app is using the API to let people access iCloud Photo Library photos, the end-user is the user of that app.

It is important to identify end-users consistently to allow for the highest levels of data security and ensure the best user experience.

Attributes

nametypedescription
iduser IDResource identifier.
resourcestring, always userResource type specifier.
organisationorganisation IDThe organisation the resource belongs to.
keykey IDThe key the resource is associated with.
identifierstringCustom value to help identify the user and avoid duplication. For example, this might be set to be the email address of the end-user.
statestringOne of: active, deactivated, blocked.
date_createddatetimeWhen the resource was created.

Identifier

The identifier attribute is not used by the API but should serve as a bridge between your implementation and the information stored in the API. The value of this attribute should allow for a straight mapping of a user of your system with a user on the API. This can be a user ID within your system, or the end-user's email address.

States

active : the user's standard state.

deactivated : the owning organisation has disabled this user's access.

blocked : an API admin has disabled this user's access.

Create POST /users

Parameters

nametypedescription
organisationsuperLets API admins create users on behalf of other organisations.
keydefault: the current keyAssign a user to a separate key. Perhaps one with fewer permissions, for example.
identifierrequired, stringA piece of information to identify this user against an end-user in your system.

Using cURL

curl https://ricloud-api.reincubate.com/users \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "identifier": "end-user@email.com"
}'

Using ricloud-py

import ricloud

user = ricloud.User.create(identifier='end-user@email.com')

Retrieve GET /users/{user ID}

Using cURL

curl https://ricloud-api.reincubate.com/users/<user ID> \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

user = ricloud.User.retrieve(<user ID>)

List GET /users

Parameters

nametypedescription
keykey IDFilter the users by the key they are associated with.
identifierstringFilter the users by their identifier.
statestringFilter the users by their state.
date_createddatetime filterFilter by resource creation date.

Using cURL

curl https://ricloud-api.reincubate.com/users \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

users = ricloud.User.list()

Update POST /users/{user ID}

Parameters

nametypedescription
keykey IDMove the user to be associated with a different key. For example, if they update from a trial.
identifierstringUpdate the users identifier.
statestringUpdate the user's state, either to deactivated or back to active.

Using cURL

curl https://ricloud-api.reincubate.com/users/<user ID> \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "state": "deactivated"
}'

Using ricloud-py

import ricloud

user = ricloud.User.update_with_id(<user ID>, state='deactivated')

# OR

user = ricloud.User.retrieve(<user ID>)

user.update(state='deactivated')

Verwandte Artikel

Brauchst du Hilfe?

Wir bemühen uns, alle Nachrichten innerhalb eines Werktags zu beantworten.

support@reincubate.com
Logo des King's Award for Enterprise

King's Award for Enterprise: Reincubate hat die höchste offizielle Wirtschaftsauszeichnung des Vereinigten Königreichs viermal gewonnen, zuletzt in Anerkennung des herausragenden Wachstums des Unternehmens in den vergangenen drei Jahren.

Unsere Beziehungen zu Nutzern und Partnern stehen im Mittelpunkt unserer Werte und der Produkte, die wir entwickeln. Lies unsere Bewertungen, um zu erfahren, was sie über uns sagen.

Nach ISO 27001 zertifiziert durch das Centre for Assessment, akkreditiert durch UKAS

© 2008-2026 Reincubate Ltd. Alle Rechte vorbehalten. Eingetragen in England und Wales unter der Nr. 5189175, USt-IdNr. GB151788978. Camo®, Streamlight® und Reincubate® sind eingetragene Marken. Patente angemeldet.

Hilfe