본문으로 건너뛰기
Reincubate

Keys

게시일: 2019년 6월 27일· 업데이트: 2022년 11월 15일

Cover image for: Keys

A key gives access to the API at the organisation level via its token attribute. It is allowed to interact with all API endpoints on behalf of its organisation.

A key is generated for each newly created organisation.

Attributes

nametypedescription
idkey IDResource identifier.
resourcestring, always keyResource type specifier.
organisationorganisation IDThe organisation this key belongs to.
typestringOne of: standard, trial.
confignested objectKey-specific configuration settings.
storage_configoptional, storage config IDThe storage config used by the key.
webhook_configoptional, webhook config IDThe webhook config used by the key.
tokenstringThe auth material for this key. Is used to populate the AUTHORIZATION HTTP header in requests against the API.
statestringOne of: active, deactivated, blocked, expired.
date_createddatetimeWhen the resource was created.
date_expiresoptional, datetimeWhen the key will expire. Mainly applies to trial type keys.

Types

standard : the key type. Every organisation has at least one of these.

trial : a key generated by an API administrator to give the organisation trial access to additional permissions. These will typically have the date_expires field set.

Configuration

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

Storage and webhook configs

A key resource can override the organisation default values for storage and webhook config. This can be helpful to split results and event notification between environments like dev and production.

Token

The value of a key's token attribute can be used to authenticate against the API on behalf of the owning organisation.

These values should be stored securely and never exposed publicly.

State

active : the key's standard state.

deactivated : the owning organisation has disabled the key.

blocked : the key has been disabled by an API admin.

expired : the key is disabled as the trial period has passed.

Create POST /keys

Parameters

nametypedescription
storage_configstorage config IDOverride the organisation's default storage config on this key.
webhook_configwebhook config IDOverride the organisation's default webhook config on this key.

Using cURL

curl 'https://ricloud-api.reincubate.com/keys' \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "storage_config": 2,
}'

Using ricloud-py

import ricloud

key = ricloud.Key.create(storage_config=2)

# OR

storage_config = ricloud.StorageConfig.retrieve(2)

key = ricloud.Key.create(storage_config=storage_config)

Retrieve GET /keys/{key ID}

Using cURL

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

Using ricloud-py

import ricloud

key = ricloud.Key.retrieve(<key ID>)

List GET /keys

Parameters

nametypedescription
typestringFilter keys by their type.
statestringFilter keys by their state.

Using cURL

curl 'https://ricloud-api.reincubate.com/keys?limit=2' \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

keys = ricloud.Key.list(limit=2)

Update POST /keys/{key ID}

Parameters

nametypedescription
storage_configstorage config IDUpdate the storage config used by the key. If null will fall back to organisation default.
webhook_configwebhook config IDUpdate the webhook config used by the key. If null will fall back to organisation default.

Using cURL

curl 'https://ricloud-api.reincubate.com/keys/<key ID>' \
  -X POST \
  -H 'Authorization: Token <your key_token>' \
  -H 'Content-Type: application/json' \
  -d '{
  "webhook_config": 2
}'

Using ricloud-py

import ricloud

key = ricloud.Key.update_with_id(<key ID>, webhook_config=2)

# OR

key = ricloud.Key.retrieve(<key ID>)

key.update(webhook_config=2)

Rotate POST /keys/{key ID}/rotate

Rotate the value of a key's token. Although not required, it is recommended to do this on a fairly regular basis or immediately if it is suspected the key's token has been compromised.

Parameters

nametypedescription
forcebool, default: FalseIf the current token value should be deauthorized immediately. If not, the current rotation period is 6 hours after the call is made.

Using cURL

curl 'https://ricloud-api.reincubate.com/keys/<key ID>/rotate' \
  -X POST \
  -H 'Authorization: Token <your key_token>'

Using ricloud-py

import ricloud

key = ricloud.Key.rotate_with_id(<key ID>)

# OR

key = ricloud.Key.retrieve(<key ID>)

key.rotate()

관련 문서

도움이 필요하신가요?

모든 문의에 영업일 기준 1일 이내에 답변드리도록 노력하고 있습니다.

support@reincubate.com
King's Award for Enterprise 로고

King's Award for Enterprise: Reincubate는 영국 최고의 공식 비즈니스 영예를 네 차례 수상했으며, 가장 최근에는 지난 3년간의 뛰어난 성장을 인정받았습니다.

사용자 및 파트너와의 관계는 우리의 가치와 우리가 만드는 제품의 핵심입니다. 리뷰을(를) 통해 그들의 이야기를 들어보세요.

Centre for Assessment의 ISO 27001 인증, UKAS 공인

© 2008-2026 Reincubate Ltd. 모든 권리 보유. 잉글랜드 및 웨일스 등록 번호 5189175, VAT 번호 GB151788978. Camo®, Streamlight® 및 Reincubate®는 등록 상표입니다. 특허 출원 중.

도움말