openapi: 3.2.0 info: title: Decipher Rest API Keys API version: '1.0' description: The Decipher REST API allows comprehensive automation of your private or shared Decipher instance. servers: - url: https://{server}/api/v1 description: Replace server with your instance domain. variables: server: default: selfserve.decipherinc.com description: Server domain security: - APIKey: [] tags: - name: API Keys paths: /rh/apikeys: get: operationId: getHRApiKeys summary: List API Keys description: 'What API keys have been created? A supervisor user will be able to see all API keys for his company. A staff user will be able to see all global API keys. Other user types will see only their own keys.' tags: - API Keys parameters: - name: company description: Restrict array of keys keyed to users in this company ID in: query required: false schema: type: string - name: user description: 'Restrict array of keys to only this specific user. A user can be specified as a numeric ID, email address or shared user name. The special name "self" references to the owner of the API key. ' in: query required: false schema: type: string responses: '200': description: OK content: application/json: schema: type: array items: type: object properties: restrictions: type: object user_id: type: integer calls: type: integer user_fullname: type: string created_on: type: string format: ISO 8601 timestamp with timezone key: type: string active: type: boolean resource: type: integer user_name: type: string user_email: type: string format: email address user_account_active: type: boolean example: restrictions: {} user_id: 1 calls: 0 user_fullname: Developer created_on: '2021-01-13T01:36:44Z' key: jw2qgdbjt7xv66bjrvnpg9540kynjbsp active: true resource: 0 user_name: developer user_email: developer@decipherinc.com user_account_active: true post: operationId: createRHApiKey summary: Create API key description: Add a new API key. tags: - API Keys requestBody: content: application/json: schema: type: object properties: user: description: 'user account that will be used when doing API calls with this key. Specific a numeric user ID, email address, shared user name or "self" for your own account ' type: string restrictions: description: security restrictions for how the new key can be used type: string required: - user responses: '200': description: OK content: application/json: schema: type: object properties: restrictions: type: object user_id: type: integer calls: type: integer combined_key: type: string user_fullname: type: string created_on: type: string secret: type: string key: type: string active: type: boolean resource: type: integer user_name: type: string user_email: type: string user_account_active: type: boolean example: restrictions: {} user_id: 1 calls: 0 combined_key: mdb0z0kzaquhh38da0bw2vv2efw74jqsjf1benyfftbjy5b2c9kg0b2r73tnzv27 user_fullname: '' created_on: '2021-01-13T00:24:55Z' secret: jf1benyfftbjy5b2c9kg0b2r73tnzv27 key: mdb0z0kzaquhh38da0bw2vv2efw74jqs active: true resource: 0 user_name: developer user_email: developer@decipherinc.com user_account_active: true /rh/apikeys/{apikey}: post: operationId: rekeyRHApiKey summary: Rekey description: 'This allows for re-generation of the secret part of the API key while retaining restrictions and API key usage history. **Python library NOTE**: As a convenience, the Python library allows you to run `api.rekey()` to call this function and immediately update the configuration file with the new key. You can also run `beacon rekey` from the command line to do the same.' tags: - API Keys parameters: - name: apikey description: The API key to manipulate in: path required: true schema: type: string example: jw2qgdbjt7xv66bjrvnpg9540kynjbsp responses: '200': description: OK content: application/json: schema: type: object properties: restrictions: type: object user_id: type: integer calls: type: integer combined_key: type: string user_fullname: type: string created_on: type: string secret: type: string key: type: string active: type: boolean resource: type: integer user_name: type: string user_email: type: string user_account_active: type: boolean example: restrictions: {} user_id: 1 calls: 0 combined_key: jw2qgdbjt7xv66bjrvnpg9540kynjbspm3e9de92j31ud1qzdqaqyvnqsea0x212 user_fullname: '' created_on: '2021-01-13T00:24:55Z' secret: m3e9de92j31ud1qzdqaqyvnqsea0x212 key: jw2qgdbjt7xv66bjrvnpg9540kynjbsp active: true resource: 0 user_name: developer user_email: developer@decipherinc.com user_account_active: true get: operationId: getRHApiKey summary: Get description: Retrieve information about a single API key. tags: - API Keys parameters: - name: apikey description: The API key to manipulate in: path required: true schema: type: string example: mdb0z0kzaquhh38da0bw2vv2efw74jqs responses: '200': description: OK content: application/json: schema: type: object properties: restrictions: type: object user_id: type: integer calls: type: integer user_fullname: type: string created_on: type: string key: type: string active: type: boolean resource: type: integer user_name: type: string user_email: type: string user_account_active: type: boolean example: restrictions: {} user_id: 1 calls: 0 user_fullname: '' created_on: '2021-01-13T00:24:55Z' key: mdb0z0kzaquhh38da0bw2vv2efw74jqs active: true resource: 0 user_name: developer user_email: developer@decipherinc.com user_account_active: true put: operationId: updateRHApiKey summary: Update description: 'Change an API key''s restrictions. In the request body, specify an object with "restrictions" being the only valid key. The value of restrictions must follow the key restriction specification.' tags: - API Keys parameters: - name: apikey description: The API key to manipulate in: path required: true schema: type: string example: jw2qgdbjt7xv66bjrvnpg9540kynjbsp requestBody: content: application/json: schema: type: object properties: restrictions: type: string description: 'updated restrictions for this key; set to `{}` for no restrictions ' required: - restrictions responses: '200': description: OK content: application/json: schema: type: object properties: restrictions: type: object user_id: type: integer calls: type: integer user_fullname: type: string created_on: type: string key: type: string active: type: boolean resource: type: integer user_name: type: string user_email: type: string user_account_active: type: boolean example: restrictions: {} user_id: 1 calls: 0 user_fullname: '' created_on: '2021-01-13T00:24:55Z' key: jw2qgdbjt7xv66bjrvnpg9540kynjbsp active: true resource: 0 user_name: developer user_email: developer@decipherinc.com user_account_active: true delete: operationId: deleteRHApiKey summary: Retire description: 'Deactivate an API key. Keys that were created and never used are deleted; others are marked as inactive for audit purposes. The `deleted` value in the response will tell you whether the key was completely erased or just inactivated.' tags: - API Keys parameters: - name: apikey description: The API key to manipulate in: path required: true schema: type: string example: mdb0z0kzaquhh38da0bw2vv2efw74jqs responses: '200': description: OK content: application/json: schema: type: object properties: deleted: type: boolean description: 'true if the key was deleted, false if it was marked as inactive ' components: securitySchemes: APIKey: type: apiKey in: header name: x-apikey description: 'In order to access the api, you''ll need to generate an API key. Refer to the instructions [here](/docs/decipher/api#section/API-Keys) to generate and configure an API key with the appropriate permission sets. You can generate as many keys as required. Configure each request to include your API key in the request header. For example: ``` x-apikey: dp48ss3mgsaucyjtybxw728h7s4cgnwzhejtszdwhf4xpe8yhmtdwpk2ntdhtwbs ``` ' x-tagGroups: - name: Autoclose tags: - Autoclose - name: Data Input and Output tags: - Data - Data Feed - Response Summary - Modifying Data - Datasources - Datasources Data - Umerge - name: Survey Metadata tags: - Simulated Data - Survey State - Survey Evaluate - Survey Quotas - Survey Files - Survey Warnings - Survey Terms - Survey Subscribers - Survey Users - Survey Tasks - name: Panels tags: - Panel Data - Panel Datapoints - Survey Panels - name: Research Hub tags: - Users - Companies - Categories - Surveys - Panels - Crosstabs - Archives - Archival Reports - API Keys - Usage - Warnings Summary - name: Crosstabs tags: - Crosstabs Configuration - Crosstabs Execution - Crosstabs Nets - Saved Crosstabs - Crosstabs Table Settings - Crosstabs Validation - Crosstabs Rim Weighting - name: Dashboards tags: - Dashboards - name: DQ APIs tags: - DQ-Specific API Calls - MaxDiff API Calls - Discrete Choice Model API Calls - Media Testimonial API Calls - name: Response Summary tags: - Share Link - name: Sample Management tags: - Bounced Emails - Participant Sources - name: Distribution tags: - Email Distribution - SFTP Distribution - Slack Distribution - name: Campaign Manager tags: - Campaigns - Campaign Email Invites - Campaign Exports - Campaign Lists - Shared Campaign Lists - Campaign Sends - Campaign Status Lists - Supression Lists - name: Question Library tags: - Company Element - Company Elements - Survey Elements - Survey Element Report Settings - name: Language Manager tags: - LM Application Data - LM Application Translations - Translation Resources - Translations - Translation Deltas - Translation Reservations - Primary Survey Language - Other Survey Languages - Unused Survey Languages - name: Project Parameters tags: - Available Project Parameters - Saved Project Parameters - Project Parameters Configuration - name: Multi-User Editing tags: - Available Sections - Check Out Section - Check In Section - Sync Section - Section Editor - Abandon Section - Validate Section - name: Video Management tags: - Videos - Watermarked Videos - name: Miscellaneous tags: - System Information - Logic Nodes - Logic Events - CATI - Global Search - Miscellaneous