Zum Hauptinhalt springen

Organisations

Veröffentlicht am 26. Juni 2019· Aktualisiert am 15. November 2022

Cover image for: Organisations

The organisation resource helps link together all other API resources that relate to a client of the API (here a client is an API customer, not an API client implementation).

An organisation must be configured before its API keys can be used to perform data retrieval operations against the API. Without at least a valid storage configuration the API won't know how to publish results.

An organisation keeps track of a set of base permissions. These describe what operations keys within the organisation are allowed to perform against the API.

Attributes

nametypedescription
idorganisation IDResource identifier.
resourcestring, always organisationResource type specifier.
typesuper, stringOne of: standard, super.
namestringThe chosen name for the organisation.
slugstringThe slugified version of name.
api_versionAPI versionThe API version the organisation is configured to use.
confignested objectOrganisation-wide configuration settings.
permissionspermissions resourceNested permissions resource.
storage_configslist object containing storage config resourcesNested list of storage config objects associated with the organisation.
storage_config_defaultoptional, storage config IDThe ID of the organisation's default storage config.
webhook_configslist object containing webhook config resourcesNested list of webhook config objects associated with the organisation.
webhook_config_defaultoptional, webhook config IDThe ID of the organisation's default webhook config.
statestringOne of: unconfigured, active, deactivated, blocked.
date_createddatetimeWhen the resource was created.

Types

standard : For clients of the API.

super : For internal managers of the API.

Configuration

Organisation-level configuration can be set on the config attribute of the organisation. For the moment, this only accepts publish_source_files, related to the source file publishing mechanism.

Permissions

The permissions value specifies the set of base permissions for the organisation. These are the least strict permissions afforded to any sub-resource of that organisation, i.e. a key or a user cannot have access to more data than the organisation it belongs to.

States

unconfigured : Every organisation is created in this state. Being in this state blocks access to most data-retrieval functionality.

active : The organisation has been configured and can use all parts of the API.

deactivated : The organisation has been shut-down on request of the owner.

blocked : The organisation has been shut-down by an API administrator.

Changelog

2020-02-20

  • Major The storage_configs and webhook_configs attributes of the organisation object are now a nested list object, rather than a simple list attribute.

Retrieve GET /organisation

Using cURL

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

Using ricloud-py

import ricloud

ricloud.Organisation.retrieve()

Sample response

{
  "id": 1,
  "resource": "organisation",
  "name": "My org",
  "slug": "my-org",
  "api_version": "2020-02-20",
  "permissions": {
    "id": 1,
    "resource": "organisation_permissions",
    "identifier": "default",
    "scopes": {
      "source_type:icloud.*": [],
      "task_type:*": [],
      "data_type:icloud.account.info": [],
    },
    "date_created": "2018-11-08T13:05:29.954188Z"
  },
  "storage_configs": {
    "data": [
      {
        "id": 1,
        "resource": "storage_config",
        "type": "gs",
        "url": "gs://my-storage-bucket",
        "credentials": {},
        "state": "valid",
        "date_created": "2018-11-08T16:47:56.849618Z"
      }
    ],
    "has_more": false,
    "total_count": 1,
    "url": "/configs/storage"
  },
  "storage_config_default": 1,
  "webhook_configs": {
    "data": [
      {
        "id": 1,
        "resource": "webhook_config",
        "url": "https://www.mywebhookendpoint.com/webhooks",
        "secret": "Wg69dQaffJuXckXsdoHuPYkf3VSWEGMa",
        "state": "valid",
        "date_created": "2018-11-08T13:07:59.563975Z"
      }
    ],
    "has_more": false,
    "total_count": 1,
    "url": "/configs/webhook"
  },
  "webhook_config_default": 1,
  "state": "active",
  "date_created": "2018-11-08T13:05:29.784270Z"
}

Update POST /organisation

Parameters

nametypedescription
namestringChange the display name of your organisation.
storage_config_defaultstorage config IDChange the default storage config used by your organisation.
webhook_config_defaultwebhook config IDChange the default webhook config used by your organisation.

Using cURL

curl 'https://ricloud-api.reincubate.com/organisation' \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "My new organisation name"
}'

Using ricloud-py

import ricloud

ricloud.Organisation.update(name='My new org')

Sample response. Note that the slug attribute does not change, as it is only generated on initial organisation creation.

{
  "id": 1,
  "resource": "organisation",
  "name": "My new org",
  "slug": "my-org",
  "permissions": {},
  "storage_configs": {
    "data": [
      {
        "id": 1,
        "resource": "storage_config",
        "type": "gs",
        "url": "gs://my-storage-bucket",
        "credentials": {},
        "state": "valid",
        "date_created": "2018-11-08T16:47:56.849618Z"
      }
    ],
    "has_more": false,
    "total_count": 1,
    "url": "/configs/storage"
  },
  "storage_config_default": 1,
  "webhook_configs": {
    "data": [
      {
        "id": 1,
        "resource": "webhook_config",
        "url": "https://www.mywebhookendpoint.com/webhooks",
        "secret": "Wg69dQaffJuXckXsdoHuPYkf3VSWEGMa",
        "state": "valid",
        "date_created": "2018-11-08T13:07:59.563975Z"
      }
    ],
    "has_more": false,
    "total_count": 1,
    "url": "/configs/webhook"
  },
  "webhook_config_default": 1,
  "state": "active",
  "date_created": "2018-11-08T13:05:29.784270Z"
}

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