openapi: 3.2.0 info: title: Jans Config Attribute API contact: name: Contact url: https://github.com/JanssenProject/jans/discussions license: name: License url: https://github.com/JanssenProject/jans/blob/main/LICENSE version: OAS Version servers: - url: https://jans.local.io description: The Jans server tags: - name: Attribute paths: /api/v1/attributes: get: tags: - Attribute summary: Gets a list of Jans attributes description: Gets a list of Jans attributes. operationId: get-attributes parameters: - name: limit in: query description: Search size - max size of the results to return schema: type: integer format: int32 default: 50 - name: pattern in: query description: Search pattern schema: type: string default: '' - name: status in: query description: Status of the attribute schema: type: string default: all - name: startIndex in: query description: The 1-based index of the first query result schema: type: integer format: int32 default: 0 - name: sortBy in: query description: Attribute whose value will be used to order the returned response schema: type: string default: inum - name: sortOrder in: query description: Order in which the sortBy param is applied. Allowed values are "ascending" and "descending" schema: type: string default: ascending - name: fieldValuePair in: query description: Field and value pair for seraching schema: type: string default: '' examples: Field value example: description: Field value example value: adminCanEdit=true,dataType=string responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/PagedResult' examples: Response example: description: Response example value: "{\n \"start\": 0,\n \"totalEntriesCount\": 78,\n \"entriesCount\": 2,\n \"entries\": [\n {\n \"dn\": \"inum=08E2,ou=attributes,o=jans\",\n \"selected\": false,\n \"inum\": \"08E2\",\n \"name\": \"departmentNumber\",\n \"displayName\": \"Department\",\n \"description\": \"Organizational Department\",\n \"origin\": \"jansCustomPerson\",\n \"dataType\": \"string\",\n \"editType\": [\n \"admin\"\n ],\n \"viewType\": [\n \"user\",\n \"admin\"\n ],\n \"claimName\": \"department_number\",\n \"status\": \"inactive\",\n \"saml1Uri\": \"urn:mace:dir:attribute-def:departmentNumber\",\n \"saml2Uri\": \"urn:oid:2.16.840.1.113730.3.1.2\",\n \"urn\": \"urn:mace:dir:attribute-def:departmentNumber\",\n \"oxMultiValuedAttribute\": false,\n \"custom\": false,\n \"whitePagesCanView\": false,\n \"adminCanEdit\": true,\n \"userCanView\": true,\n \"userCanEdit\": false,\n \"adminCanAccess\": true,\n \"adminCanView\": true,\n \"userCanAccess\": true,\n \"baseDn\": \"inum=08E2,ou=attributes,o=jans\"\n },\n {\n \"dn\": \"inum=0C18,ou=attributes,o=jans\",\n \"selected\": false,\n \"inum\": \"0C18\",\n \"name\": \"telephoneNumber\",\n \"displayName\": \"Home Telephone Number\",\n \"description\": \"Home Telephone Number\",\n \"origin\": \"jansCustomPerson\",\n \"dataType\": \"string\",\n \"editType\": [\n \"user\",\n \"admin\"\n ],\n \"viewType\": [\n \"user\",\n \"admin\"\n ],\n \"claimName\": \"phone_number\",\n \"status\": \"inactive\",\n \"saml1Uri\": \"urn:mace:dir:attribute-def:telephoneNumber\",\n \"saml2Uri\": \"urn:oid:2.5.4.20\",\n \"urn\": \"urn:mace:dir:attribute-def:phone_number\",\n \"oxMultiValuedAttribute\": false,\n \"custom\": false,\n \"whitePagesCanView\": false,\n \"adminCanEdit\": true,\n \"userCanView\": true,\n \"userCanEdit\": true,\n \"adminCanAccess\": true,\n \"adminCanView\": true,\n \"userCanAccess\": true,\n \"baseDn\": \"inum=0C18,ou=attributes,o=jans\"\n }\n}\n" '401': description: Unauthorized '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.readonly - oauth2: - https://jans.io/oauth/config/attributes.write - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/read-all - oauth2: - https://jans.io/oauth/config/write-all put: tags: - Attribute summary: Updates an existing attribute operationId: put-attributes requestBody: description: JansAttribute object content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Request example: description: Request example value: "{\n \"adminCanAccess\": true,\n \"adminCanEdit\": true,\n \"adminCanView\": true,\n \"custom\": false,\n \"dataType\": \"string\",\n \"description\": \"QAAdded Attribute\",\n \"displayName\": \"QAAdded Attribute\",\n \"editType\": [\n \"admin\",\n \"user\"\n ],\n \"name\": \"qaattribute\",\n \"origin\": \"jansPerson\",\n \"jansMultivaluedAttr\": false,\n \"status\": \"active\",\n \"urn\": \"urn:mace:dir:attribute-def:qaattribute\",\n \"userCanAccess\": true,\n \"userCanEdit\": true,\n \"userCanView\": true,\n \"viewType\": [\n \"admin\",\n \"user\"\n ],\n \"whitePagesCanView\": false\n}\n" responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Response example: description: Response example value: "{\n \"adminCanAccess\": true,\n \"adminCanEdit\": true,\n \"adminCanView\": true,\n \"custom\": false,\n \"dataType\": \"string\",\n \"description\": \"QAAdded Attribute\",\n \"displayName\": \"QAAdded Attribute\",\n \"editType\": [\n \"admin\",\n \"user\"\n ],\n \"name\": \"qaattribute\",\n \"origin\": \"jansPerson\",\n \"jansMultivaluedAttr\": false,\n \"status\": \"active\",\n \"urn\": \"urn:mace:dir:attribute-def:qaattribute\",\n \"userCanAccess\": true,\n \"userCanEdit\": true,\n \"userCanView\": true,\n \"viewType\": [\n \"admin\",\n \"user\"\n ],\n \"whitePagesCanView\": false\n}\n" '401': description: Unauthorized '406': description: NotAcceptable '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.write - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/write-all post: tags: - Attribute summary: Adds a new attribute operationId: post-attributes requestBody: description: JansAttribute object content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Request example: description: Request example value: "{\n \"adminCanAccess\": true,\n \"adminCanEdit\": true,\n \"adminCanView\": true,\n \"custom\": false,\n \"dataType\": \"string\",\n \"description\": \"QAAdded Attribute\",\n \"displayName\": \"QAAdded Attribute\",\n \"editType\": [\n \"admin\",\n \"user\"\n ],\n \"name\": \"qaattribute\",\n \"origin\": \"jansPerson\",\n \"jansMultivaluedAttr\": false,\n \"status\": \"active\",\n \"urn\": \"urn:mace:dir:attribute-def:qaattribute\",\n \"userCanAccess\": true,\n \"userCanEdit\": true,\n \"userCanView\": true,\n \"viewType\": [\n \"admin\",\n \"user\"\n ],\n \"whitePagesCanView\": false\n}\n" responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Response example: description: Response example value: "{\n \"adminCanAccess\": true,\n \"adminCanEdit\": true,\n \"adminCanView\": true,\n \"custom\": false,\n \"dataType\": \"string\",\n \"description\": \"QAAdded Attribute\",\n \"displayName\": \"QAAdded Attribute\",\n \"editType\": [\n \"admin\",\n \"user\"\n ],\n \"name\": \"qaattribute\",\n \"origin\": \"jansPerson\",\n \"jansMultivaluedAttr\": false,\n \"status\": \"active\",\n \"urn\": \"urn:mace:dir:attribute-def:qaattribute\",\n \"userCanAccess\": true,\n \"userCanEdit\": true,\n \"userCanView\": true,\n \"viewType\": [\n \"admin\",\n \"user\"\n ],\n \"whitePagesCanView\": false\n}\n" '400': description: BadRequest '401': description: Unauthorized '406': description: NotAcceptable '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.write - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/write-all /api/v1/attributes/{inum}: get: tags: - Attribute summary: Gets an attribute based on inum operationId: get-attributes-by-inum parameters: - name: inum in: path description: Attribute Id required: true schema: type: string responses: '200': description: Ok content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Response example: description: Response example value: "{\n \"dn\": \"inum=08E2,ou=attributes,o=jans\",\n \"selected\": false,\n \"inum\": \"08E2\",\n \"name\": \"departmentNumber\",\n \"displayName\": \"Department\",\n \"description\": \"Organizational Department\",\n \"origin\": \"jansCustomPerson\",\n \"dataType\": \"string\",\n \"editType\": [\n \"admin\"\n ],\n \"viewType\": [\n \"user\",\n \"admin\"\n ],\n \"claimName\": \"department_number\",\n \"status\": \"inactive\",\n \"saml1Uri\": \"urn:mace:dir:attribute-def:departmentNumber\",\n \"saml2Uri\": \"urn:oid:2.16.840.1.113730.3.1.2\",\n \"urn\": \"urn:mace:dir:attribute-def:departmentNumber\",\n \"oxMultiValuedAttribute\": false,\n \"custom\": false,\n \"whitePagesCanView\": false,\n \"adminCanEdit\": true,\n \"userCanView\": true,\n \"userCanEdit\": false,\n \"adminCanAccess\": true,\n \"adminCanView\": true,\n \"userCanAccess\": true,\n \"baseDn\": \"inum=08E2,ou=attributes,o=jans\"\n}\n" '401': description: Unauthorized '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.readonly - oauth2: - https://jans.io/oauth/config/attributes.write - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/read-all - oauth2: - https://jans.io/oauth/config/write-all delete: tags: - Attribute summary: Deletes an attribute based on inum operationId: delete-attributes-by-inum parameters: - name: inum in: path description: Attribute Id required: true schema: type: string responses: '204': description: No Content '401': description: Unauthorized '404': description: Not Found '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.delete - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/delete-all patch: tags: - Attribute summary: Partially modify a JansAttribute operationId: patch-attributes-by-inum parameters: - name: inum in: path description: Attribute Id required: true schema: type: string requestBody: description: String representing patch-document. content: application/json-patch+json: schema: type: array items: $ref: '#/components/schemas/PatchRequest' examples: Patch request example: description: Patch request example value: '[ {op:replace, path: displayName, value: "CustomAttribute" } ] ' responses: '200': description: Updated JansAttribute content: application/json: schema: $ref: '#/components/schemas/JansAttribute' examples: Response example: description: Response example value: "{\n \"adminCanAccess\": true,\n \"adminCanEdit\": true,\n \"adminCanView\": true,\n \"custom\": false,\n \"dataType\": \"string\",\n \"description\": \"QAAdded Attribute\",\n \"displayName\": \"QAAdded Attribute\",\n \"editType\": [\n \"admin\",\n \"user\"\n ],\n \"name\": \"qaattribute\",\n \"origin\": \"jansPerson\",\n \"jansMultivaluedAttr\": false,\n \"status\": \"active\",\n \"urn\": \"urn:mace:dir:attribute-def:qaattribute\",\n \"userCanAccess\": true,\n \"userCanEdit\": true,\n \"userCanView\": true,\n \"viewType\": [\n \"admin\",\n \"user\"\n ],\n \"whitePagesCanView\": false\n}\n" '401': description: Unauthorized '404': description: Not Found '500': description: InternalServerError security: - oauth2: - https://jans.io/oauth/config/attributes.write - oauth2: - https://jans.io/oauth/config/attributes.admin - oauth2: - https://jans.io/oauth/config/write-all components: schemas: PatchRequest: type: object properties: op: type: string path: type: string value: type: string PagedResult: type: object properties: start: type: integer format: int32 totalEntriesCount: type: integer format: int32 entriesCount: type: integer format: int32 entries: type: array items: type: object AttributeValidation: type: object properties: minLength: type: integer format: int32 maxLength: type: integer format: int32 regexp: type: string JansAttribute: required: - dataType - description - displayName - editType - name - viewType type: object properties: dn: type: string inum: type: string sourceAttribute: type: string nameIdType: type: string name: maxLength: 30 minLength: 1 pattern: ^[a-zA-Z0-9_]+$ type: string displayName: maxLength: 60 minLength: 0 type: string description: maxLength: 4000 minLength: 0 type: string origin: type: string dataType: type: string enum: - string - numeric - boolean - binary - certificate - generalizedTime - json editType: type: array items: type: string enum: - admin - owner - manager - user - whitePages viewType: type: array items: type: string enum: - admin - owner - manager - user - whitePages usageType: type: array items: type: string enum: - openid claimName: type: string seeAlso: type: string status: type: string enum: - active - inactive - expired - register saml1Uri: type: string saml2Uri: type: string urn: type: string scimCustomAttr: type: boolean oxMultiValuedAttribute: type: boolean jansHideOnDiscovery: type: boolean required: type: boolean custom: type: boolean attributeValidation: $ref: '#/components/schemas/AttributeValidation' tooltip: type: string selected: type: boolean adminCanAccess: type: boolean userCanAccess: type: boolean whitePagesCanView: type: boolean adminCanView: type: boolean adminCanEdit: type: boolean userCanView: type: boolean userCanEdit: type: boolean baseDn: type: string securitySchemes: oauth2: type: oauth2 flows: clientCredentials: tokenUrl: https://{op-hostname}/.../token scopes: https://jans.io/oauth/jans-auth-server/config/properties.readonly: View Auth Server properties related information https://jans.io/oauth/jans-auth-server/config/properties.write: Manage Auth Server properties related information https://jans.io/oauth/config/attributes.readonly: View attribute related information https://jans.io/oauth/config/attributes.write: Manage attribute related information https://jans.io/oauth/config/attributes.delete: Delete attribute related information https://jans.io/oauth/config/acrs.readonly: View ACRS related information https://jans.io/oauth/config/acrs.write: Manage ACRS related information https://jans.io/oauth/config/database/ldap.readonly: View LDAP database related information https://jans.io/oauth/config/database/ldap.write: Manage LDAP database related information https://jans.io/oauth/config/database/ldap.delete: Delete LDAP database related information https://jans.io/oauth/config/scripts.readonly: View cache scripts information https://jans.io/oauth/config/scripts.write: Manage scripts related information https://jans.io/oauth/config/scripts.delete: Delete scripts related information https://jans.io/oauth/config/cache.readonly: View cache related information https://jans.io/oauth/config/cache.write: Manage cache related information https://jans.io/oauth/config/smtp.readonly: View SMTP related information https://jans.io/oauth/config/smtp.write: Manage SMTP related information https://jans.io/oauth/config/smtp.delete: Delete SMTP related information https://jans.io/oauth/config/logging.readonly: View logging related information https://jans.io/oauth/config/logging.write: Manage logging related information https://jans.io/oauth/config/jwks.readonly: View JWKS related information https://jans.io/oauth/config/jwks.write: Manage JWKS related information https://jans.io/oauth/config/jwks.delete: Delete JWKS related information https://jans.io/oauth/config/openid/clients.readonly: View clients related information https://jans.io/oauth/config/openid/clients.write: Manage clients related information https://jans.io/oauth/config/openid/clients.delete: Delete clients related information https://jans.io/oauth/config/scopes.readonly: View scope related information https://jans.io/oauth/config/scopes.write: Manage scope related information https://jans.io/oauth/config/scopes.delete: Delete scope related information https://jans.io/oauth/config/stats.readonly: View server with basic statistic https://jans.io/oauth/config/organization.readonly: View organization configuration information https://jans.io/oauth/config/organization.write: Manage organization configuration information https://jans.io/oauth/config/agama.readonly: View Agama Flow related information https://jans.io/oauth/config/agama.write: Manage Agama Flow related information https://jans.io/oauth/config/agama.delete: Delete Agama Flow related information https://jans.io/oauth/jans-auth-server/session.readonly: View Session related information https://jans.io/oauth/jans-auth-server/session.delete: Delete Session information https://jans.io/oauth/config/read-all: Super admin read access to all configuration resources https://jans.io/oauth/config/write-all: Super admin write access to all configuration resources https://jans.io/oauth/config/delete-all: Super admin delete access to all configuration resources https://jans.io/oauth/config/openid/openid.readonly: View OpenID functionality https://jans.io/oauth/config/openid/openid.write: Manage OpenID functionality https://jans.io/oauth/config/openid/openid.delete: Delete OpenID functionality https://jans.io/oauth/config/uma.readonly: View UMA functionality https://jans.io/oauth/config/uma.write: Manage UMA functionality https://jans.io/oauth/config/uma.delete: Delete UMA functionality https://jans.io/oauth/config/plugin.readonly: View Plugin information https://jans.io/oauth/config/properties.readonly: View Config-API related configuration properties https://jans.io/oauth/config/properties.write: Manage Config-API related configuration properties https://jans.io/oauth/client/authorizations.readonly: View ClientAuthorizations https://jans.io/oauth/client/authorizations.delete: Revoke ClientAuthorizations https://jans.io/oauth/config/asset.readonly: View Jans Assets https://jans.io/oauth/config/asset.write: Manage Jans Assets https://jans.io/oauth/config/asset.delete: Delete Jans Assets https://jans.io/oauth/config/token.readonly: View Token details https://jans.io/oauth/config/token.write: Manage Token details https://jans.io/oauth/config/token.delete: Delete Token details https://jans.io/oauth/config/data.readonly: View Config-API related data https://jans.io/oauth/config/ssa.readonly: View SSA details https://jans.io/oauth/config/ssa.write: Manage SSA details https://jans.io/oauth/config/ssa.delete: Delete SSA details https://jans.io/oauth/jans-auth-server/config/properties.admin: Admin scope for Auth Server properties https://jans.io/oauth/config/attributes.admin: Admin for Attribute management https://jans.io/oauth/config/acrs.admin: Admin for ACRS management https://jans.io/oauth/config/database.admin: Admin for Database config management https://jans.io/oauth/config/scripts.admin: Admin for Scripts management https://jans.io/oauth/config/cache.admin: Admin for Cache management https://jans.io/oauth/config/message.admin: Admin for Message management https://jans.io/oauth/config/smtp.admin: Admin for SMTP management https://jans.io/oauth/config/logging.admin: Admin for Logging management https://jans.io/oauth/config/jwks.admin: Admin for JWKS management https://jans.io/oauth/config/openid/clients.admin: Admin for clients management https://jans.io/oauth/config/token.admin: Admin for Token management https://jans.io/oauth/config/scopes.admin: Admin for scope management https://jans.io/oauth/config/stats.admin: Admin for statistic management https://jans.io/oauth/config/organization.admin: Admin for organization configuration management https://jans.io/oauth/config/agama.admin: Admin for Agama flow management https://jans.io/oauth/jans-auth-server/session.admin: Admin for Session management https://jans.io/oauth/config/uma.admin: Admin for UMA management https://jans.io/oauth/config/plugin.admin: Admin for Plugin management https://jans.io/oauth/config/properties.admin: Admin for Config-API management https://jans.io/oauth/client/authorizations.admin: Admin for Client Authorizations management https://jans.io/oauth/config/asset.admin: Admin for Jans Assets management https://jans.io/auth/ssa.admin: Admin for SSA management https://jans.io/oauth/config/health.admin: Admin for Health API management