SlashID Organization Attributes API
The Organization Attributes API from SlashID — 2 operation(s) for organization attributes.
The Organization Attributes API from SlashID — 2 operation(s) for organization attributes.
openapi: 3.0.1
info:
title: SlashID Groups Organization Attributes API
description: "This is the [OpenAPI](https://www.openapis.org/) specification for communicating with the [SlashID](https://www.slashid.dev/) service.\n\nThe latest version of the OpenAPI API spec can be fetched from [our CDN](https://cdn.slashid.com/slashid-openapi-latest.yaml).\n\nWe recommend you use an [OpenAPI SDK generator](https://openapi.tools/#sdk) to create a client library in your programming language,\nbut you can also use this documentation to make HTTP calls directly.\n\n> **Compatibility note**: We aim to keep wire compatibility whenever we update the API, but parts of the specification may occasionally be refactored.\n If you use an SDK generator, your code may require minor changes between versions.\n"
version: '1.1'
termsOfService: https://www.slashid.dev/terms-of-use/
contact:
name: API Support
email: contact@slashid.dev
servers:
- url: https://api.slashid.com
description: Production
- url: https://api.sandbox.slashid.com
description: Sandbox
security:
- ApiKeyAuth: []
tags:
- name: Organization Attributes
paths:
/organizations/attributes:
patch:
operationId: PatchOrganizationsAttributes
x-rbac-enabled: true
x-rbac-allowed-groups: admin
summary: Create or modify attributes for the organization in multiple buckets
description: 'Create new attributes or modify existing attributes for the organization in one or more attribute buckets.
The request body should be a nested object, with bucket names as top-level keys, and key-value pair attributes as values, as shown in the example request body. The buckets must exist and must be accessible by the organization identified in the request header. Attribute names may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB. Any existing attribute that isn''t referenced by key in the request is left untouched.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchBucketedAttributesReq'
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: PutOrganizationsAttributes
x-rbac-enabled: true
x-rbac-allowed-groups: admin
summary: Create or modify attributes for the organization in multiple buckets
description: 'Create new attributes or modify existing attributes for the organization in one or more attribute buckets.
The request body should be a nested object, with bucket names as top-level keys, and key-value pair attributes as values, as shown in the example request body. The buckets must exist and must be accessible by the organization identified in the request header. Attribute names may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB. Replaces the set of existing attributes with those present in the request. In other words, it deletes any existing attributes that aren''t referenced by key in the request.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PutBucketedAttributesReq'
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
get:
operationId: GetOrganizationsAttributes
x-rbac-enabled: true
x-rbac-allowed-groups: admin,member
summary: Retrieve attributes for the organization from multiple buckets
description: 'Retrieve attributes for the organization from one or more buckets. If no buckets are specified, attributes from all buckets will be retrieved.
Bucket names can be specified as a comma-separated list in the `buckets` query parameter. All buckets specified must exist, and the organization specified in the header must be able to access them. Empty bucket names are not permitted.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/AttributeBucketsQueryParam'
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/APIResponseBase'
- type: object
properties:
result:
$ref: '#/components/schemas/GetBucketedAttributesResp'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
/organizations/attributes/{bucket_name}:
patch:
operationId: PatchOrganizationsAttributesBucketName
x-rbac-enabled: true
x-rbac-allowed-groups: admin
summary: Create or modify attributes for the organization in a single bucket
description: 'Create new attributes or modify existing attributes for the organization in a single attribute bucket.
The bucket must exist and must be accessible by the organization identified in the request header.
The request body should be an object consisting of key-value pair attributes. Attribute names may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB. Any existing attribute that isn''t referenced by key in the request is left untouched.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/AttributeBucketNamePathParam'
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PatchAttributesReq'
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
put:
operationId: PutOrganizationsAttributesBucketName
x-rbac-enabled: true
x-rbac-allowed-groups: admin
summary: Create or modify attributes for the organization in a single bucket
description: 'Create new attributes or modify existing attributes for the organization in a single attribute bucket.
The bucket must exist and must be accessible by the organization identified in the request header.
The request body should be an object consisting of key-value pair attributes. Attribute names may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB. Replaces the set of existing attributes with those present in the request. In other words, it deletes any existing attributes that aren''t referenced by key in the request.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/AttributeBucketNamePathParam'
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PutAttributesReq'
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
get:
operationId: GetOrganizationsAttributesBucketName
x-rbac-enabled: true
x-rbac-allowed-groups: admin,member
summary: Retrieve attributes for the organization from a single bucket
description: 'Retrieve attributes for the organization from a single attribute bucket.
The bucket must exist and must be accessible by the organization identified in the request header. If no attribute names are specified, all attributes in the bucket will be retrieved. Attribute names can be provided as a comma-separated list in the `attributes` query parameter. Empty attribute names are not permitted.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/AttributeBucketNamePathParam'
required: true
- $ref: '#/components/parameters/AttributeNamesQueryParam'
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/APIResponseBase'
- type: object
properties:
result:
$ref: '#/components/schemas/GetAttributesResp'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
delete:
operationId: DeleteOrganizationsAttributesBucketName
x-rbac-enabled: true
x-rbac-allowed-groups: admin
summary: Delete attributes for the organization from a single bucket
description: 'Delete attributes for the organization from a single attribute bucket.
The bucket must exist and must be accessible by the organization identified in the request header. Attribute names can be provided as a comma-separated list in the `attributes` query parameter. Empty attribute names are not permitted. If no attribute names are specified, all attributes in the bucket will be deleted.
WARNING: this action is permanent and cannot be undone.
'
tags:
- Organization Attributes
parameters:
- $ref: '#/components/parameters/OrgIDHeader'
- $ref: '#/components/parameters/AttributeBucketNamePathParam'
- $ref: '#/components/parameters/AttributeNamesQueryParam'
required: true
- $ref: '#/components/parameters/RequiredConsistencyHeader'
- $ref: '#/components/parameters/RequiredConsistencyTimeoutHeader'
responses:
'204':
$ref: '#/components/responses/NoContent'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
components:
responses:
Forbidden:
description: Forbidden
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
NoContent:
description: No content
NotFound:
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
Unauthorized:
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
BadRequest:
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/APIResponseBase'
parameters:
RequiredConsistencyHeader:
name: SlashID-Required-Consistency
in: header
description: 'The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error.
408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.
Allowed values: * `local_region`: Wait while the request executes in the local region. * `all_regions`: Wait while the request executes across all regions.
You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.
'
schema:
type: string
enum:
- local_region
- all_regions
default: local_region
OrgIDHeader:
name: SlashID-OrgID
in: header
schema:
type: string
required: true
description: The organization ID
example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1
AttributeBucketNamePathParam:
in: path
name: bucket_name
description: 'The name of an attribute bucket. The bucket `end_user_read_write` exists for all organizations and is suitable for many common use cases. Please refer to our documentation for more information on attribute buckets.
'
required: true
schema:
type: string
RequiredConsistencyTimeoutHeader:
name: SlashID-Required-Consistency-Timeout
in: header
description: 'The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error.
408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout.
You can learn more about our replication model on our [Cross-region Replication Model](/docs/access/concepts/replication) page.
'
schema:
type: integer
default: 30
maximum: 120
minimum: 1
AttributeNamesQueryParam:
in: query
name: attributes
description: A comma-separated list of attribute names
example:
- address_line_1,address_line_2,city,zip_code
schema:
type: array
items:
type: string
style: form
explode: false
AttributeBucketsQueryParam:
in: query
name: buckets
description: A comma-separated list of attribute bucket names
example:
- person_pool-end_user_read_write,person_pool-end_user_no_access
schema:
type: array
items:
type: string
style: form
explode: false
schemas:
APIResponseBase:
type: object
properties:
meta:
$ref: '#/components/schemas/APIMeta'
errors:
type: array
items:
$ref: '#/components/schemas/APIResponseError'
APIPagination:
type: object
required:
- limit
- offset
- total_count
properties:
limit:
type: integer
offset:
type: integer
total_count:
type: integer
format: int64
APICursorPagination:
type: object
required:
- limit
- cursor
- total_count
properties:
limit:
type: integer
cursor:
type: string
total_count:
type: integer
format: int64
PutAttributesReq:
$ref: '#/components/schemas/Attributes'
Attributes:
type: object
additionalProperties: true
description: 'Clear-text person attributes as key-value pairs. Attribute names (keys) may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB.
'
example:
attr1: value1
attr2: 2
attr3: true
attr_4:
- 1
- 2
- 3
- 4
attr_5:
nested: 5
PatchBucketedAttributesReq:
$ref: '#/components/schemas/BucketedAttributes'
GetBucketedAttributesResp:
$ref: '#/components/schemas/BucketedAttributes'
PatchAttributesReq:
$ref: '#/components/schemas/Attributes'
APIResponseError:
type: object
properties:
httpcode:
type: integer
message:
type: string
PutBucketedAttributesReq:
$ref: '#/components/schemas/BucketedAttributes'
BucketedAttributes:
type: object
description: 'Attributes divided into named buckets. Bucket names are top level keys; attributes are values. Attributes consist of key-value pairs. Attribute names (keys) may be at most 70 bytes long. Attribute values must be JSON-serializable and are limited to 64KiB.
'
additionalProperties:
$ref: '#/components/schemas/Attributes'
example:
person_pool-end_user_read_write:
card_number: '1234'
expiry: 07/25
end_user_read_only:
address_line_1: New Street
city: New York
APIMeta:
type: object
properties:
pagination:
$ref: '#/components/schemas/APIPagination'
cursor_pagination:
$ref: '#/components/schemas/APICursorPagination'
GetAttributesResp:
$ref: '#/components/schemas/Attributes'
securitySchemes:
ApiKeyAuth:
description: Authorizes the request with the organization's API Key.
x-svc-um-api: true
type: apiKey
in: header
name: SlashID-API-Key
OAuth2ClientIdSecret:
description: Authorizes the request with a client ID/client secret pair
type: http
scheme: basic
OAuth2AccessTokenBearer:
description: Authorizes the request with an Access Token for the current user.
type: http
scheme: bearer
bearerFormat: opaque