From 238bd6da87839e7da4134e97d10cd3c715ed8889 Mon Sep 17 00:00:00 2001 From: Monty Dawson <wgd23@cam.ac.uk> Date: Mon, 28 Feb 2022 08:48:30 +0000 Subject: [PATCH] Update identitylib to generate client which can specifying visualization dimensions --- Dockerfile | 4 +- card-api-rc-spec.yml | 1896 ++++++++++++++++++++++++++++++++++++++++++ setup.py | 2 +- 3 files changed, 1900 insertions(+), 2 deletions(-) create mode 100644 card-api-rc-spec.yml diff --git a/Dockerfile b/Dockerfile index ca58ee5..cdc9deb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,10 @@ FROM openapitools/openapi-generator-cli as builder WORKDIR /generated +ADD ./card-api-rc-spec.yml . + RUN docker-entrypoint.sh generate \ - --input-spec https://developer.api.apps.cam.ac.uk/portals/api/sites/api-prod-a3dc87f7-prod/liveportal/apis/card/download_spec \ + --input-spec ./card-api-rc-spec.yml \ --generator-name python \ --additional-properties packageName=identitylib.card_client \ --output /generated diff --git a/card-api-rc-spec.yml b/card-api-rc-spec.yml new file mode 100644 index 0000000..fb5a98c --- /dev/null +++ b/card-api-rc-spec.yml @@ -0,0 +1,1896 @@ +swagger: '2.0' +info: + title: University Card API + description: |+ + + + ## Introduction + + The Card API allows access to information about University Cards. + + The API broadly follows the principles of REST and strives to provide an interface that can be easily consumed by downstream systems. + + The API is currently read-only, and does not expose any operations to create / update or delete University Card data. + + ### Stability + + This release of the Card API is a `beta` offering: a service we are moving towards live but which requires wider testing with a broader group of users. We consider the Card API as being at least as stable as the legacy card system which it aims to replace, so we encourage users to make use of the Card API rather than relying on the legacy card system. + + ### Versioning + + The Card API is versioned using url path prefixes in the format: `/v1beta1/cards`. This follows the pattern established by the [GCP API](https://cloud.google.com/apis/design/versioning). Breaking changes will not be made without a change in API major version, however non-breaking changes will be introduced without changes to the version path prefix. All changes will be documented in the project's [CHANGELOG](https://gitlab.developers.cam.ac.uk/uis/devops/iam/card-database/card-api/-/blob/master/CHANGELOG.md). + + The available versions of the API are listed at the API's root. + + ### Domain + + The Card API has been designed to only expose information about University Cards and the identifiers which link a Card to a person. The API does not expose information about cardholders or the institutions that a cardholder belongs to. This is in order to combat domain crossover and to ensure the Card API does not duplicate information which is held and managed within systems such as Lookup, CamSIS or CHRIS. + + It is expected that the Card API should be used alongside APIs such as Lookup which allow personal and institutional membership information to be retrieved. A tool has been written in order to allow efficient querying of the Card API using information contained within, CamSIS or CHRIS. [Usage and installation instructions for this tool can be found here](https://gitlab.developers.cam.ac.uk/uis/devops/iam/card-database/card-client). + + ### Data source + + The data exposed in the Card API is currently a mirror of data contained within the [Card Database](https://webservices.admin.cam.ac.uk/uc/). With data being synced from the Card Database to the Card API hourly. + + In future, card data will be updated and created directly using the Card API so changes will be reflected in the Card API 'live' without this hourly sync. + + ## Core entities + + ### The `Card` Entity + + The `Card` entity is a representation of a physical University Card. The entity contains fields indicating the status of the card and when the card has moved between different statuses. Cards held by individuals (such as students or staff) and temporary cards managed by institutions are both represented by the `Card` entity, with the former having a `cardType` of `MIFARE_PERSONAL` and the latter having a `cardType` of `MIFARE_TEMPORARY`. + + Each card should have a set of `CardIdentifiers` which allow the card to be linked to an entity in another system (e.g. a person in Lookup), or record information about identifiers held within the card, such as Mifare ID. + + The full `Card` entity contains a `cardNotes` field which holds a set of notes made by administrator users related to the card, as well as an `attributes` field which holds the data that is present on the physical presentation of a card. Operations which list many cards return + `CardSummary` entities which omit these fields for brevity. + + ### The `CardIdentifier` Entity + + The `CardIdentifier` entity holds the `value` and `scheme` of a given identifier. The `value` field of a `CardIdentifier` is a simple ID string - e.g. `wgd23` or `000001`. The `scheme` field of a `CardIdentifier` indicates what system this identifier relates to or was issued by. This allows many identifiers which relate to different systems to be recorded against a single `Card`. + + The supported schemes are: + * `v1.person.identifiers.cam.ac.uk`: The CRSid of the person who holds this card + * `person.v1.student-records.university.identifiers.cam.ac.uk`: The CamSIS identifier (USN) of the person who holds this card + * `person.v1.human-resources.university.identifiers.cam.ac.uk`: The CHRIS identifier (staff number) of the person who holds this card + * `person.v1.board-of-graduate-studies.university.identifiers.cam.ac.uk`: The Board of Graduate Studies identifier of the person who holds this card + * `person.v1.legacy-card.university.identifiers.cam.ac.uk`: The legacy card holder ID for the person who holds this card + * `mifare-identifier.v1.card.university.identifiers.cam.ac.uk`: The Mifare ID which is embedded in this card (this identifier uniquely identifies a single card) + * `mifare-number.v1.card.university.identifiers.cam.ac.uk`: The Mifare Number which is embedded in this card (this identifier is a digest of card's legacy cardholder ID and issue number, so is not guaranteed to be unique) + * `card.v1.legacy-card.university.identifiers.cam.ac.uk`: The legacy card ID from the card database + * `temporary-card.v1.card.university.identifiers.cam.ac.uk`: The temporary card ID from the card database + * `photo.v1.photo.university.identifiers.cam.ac.uk`: The ID of the photo printed on this card + * `barcode.v1.card.university.identifiers.cam.ac.uk`: The barcode printed on this card + * `institution.v1.legacy-card.university.identifiers.cam.ac.uk`: The legacy institution ID from the card database (only populated on temporary cards) + + + ## Using the API + + ### Auth + + To authenticate against the Card API, an application must be registered within the API Service and granted access to the `University Card` product. Details of how to register an application and grant access to products can be found in the [API Service Getting Started Guide](https://developer.api.apps.cam.ac.uk/start-using-an-api). + + #### Principal + + Throughout this specification the term `principal` is used to describe the user or service who is making use of the API. When authenticating using the OAuth2 client credentials flow the principal shall be the application registered within the API Gateway. When authenticating using the authorization code flow, e.g. via a Single Page Application, the principal shall be the user who has authenticated and consented to give the application access to the data + contained within this API - identified by their CRSid. + + This specification references permissions which can be granted to any principal - please contact the API maintainers to grant a principal a specific permission. + + ### Content Type + + The Card API responds with JSON data. The `Content-Type` request header should be omitted or set to `application/json`. If an invalid `Content-Type` header is sent the API will respond with `415 Unsupported Media Type`. + + ### Pagination + + For all operations where multiple entities will be returned, the API will return a paginated result. This is to account for too many entities needing to be returned within a single response. A Paginated response has the structure: + + ```json + { + "next": "https://<gateway_host>/card/v1beta1/cards/?cursor=cD0yMDIxLTAxL + "previous": null, + "results": [ + ... the data for the current page + ] + } + + ``` + + The `next` field holds the url of the next page of results, containing a cursor which indicates to the API which page of results to return. If the `next` field is `null` no further results are available. The `previous` field can be used to navigate backwards through pages of results. + + The `page_size` query parameter can be used to control the number of results to return. This defaults to 200 but can be set to a maximum of 500, if set to greater than this no error will be returned but only 500 results will be given in the response. + + contact: + email: devops+cardapi@uis.cam.ac.uk + license: + name: MIT License + version: v1beta1 +host: api.apps.cam.ac.uk +schemes: + - https +basePath: /card +consumes: + - application/json +produces: + - application/json +securityDefinitions: + API Service OAuth2 Client Credentials: + type: oauth2 + description: Allows authentication using client credentials obtained from the API Service + flow: application + tokenUrl: https://api.apps.cam.ac.uk/oauth/client_credential/accesstoken?grant_type=client_credentials + scopes: + https://api.apps.cam.ac.uk/card/cards: Read and write access to the cards the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/cards.readonly: Read-only access to the cards the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-requests: Read and write access to the card requests the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-requests.readonly: Read-only access to the card requests the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-logos: Read and write access to the card logos that can be used on University cards + https://api.apps.cam.ac.uk/card/card-logos.readonly: Read-only access to the card logos that can be used on University cards + https://api.apps.cam.ac.uk/card/available-barcodes: Read and write access to the barcodes which can be used on University cards + https://api.apps.cam.ac.uk/card/available-barcodes.readonly: Read access to the barcodes which can be used on University cards + https://api.apps.cam.ac.uk/card/card-rfid-data-config.readonly: Read access to the card RFID data configuration used to encode University cards + API Service OAuth2 Access Code: + type: oauth2 + flow: accessCode + authorizationUrl: https://api.apps.cam.ac.uk/oauth2/v1/auth + tokenUrl: https://api.apps.cam.ac.uk/oauth2/v1/token + scopes: + https://api.apps.cam.ac.uk/card/cards: Read and write access to the cards the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/cards.readonly: Read-only access to the cards the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-requests: Read and write access to the card requests the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-requests.readonly: Read-only access to the card requests the current user or service is authenticated to access + https://api.apps.cam.ac.uk/card/card-logos: Read and write access to the card logos that can be used on University cards + https://api.apps.cam.ac.uk/card/card-logos.readonly: Read-only access to the card logos that can be used on University cards + https://api.apps.cam.ac.uk/card/available-barcodes: Read and write access to the barcodes which can be used on University cards + https://api.apps.cam.ac.uk/card/available-barcodes.readonly: Read access to the barcodes which can be used on University cards + https://api.apps.cam.ac.uk/card/card-rfid-data-config.readonly: Read access to the card RFID data configuration used to encode University cards +security: + - API Service OAuth2 Access Code: [] + - API Service OAuth2 Client Credentials: [] +paths: + /v1beta1/cards: + get: + operationId: v1beta1_cards_list + summary: List cards + description: |+ + + ## List Cards + + Allows current and historic University Cards to be listed. + + By default (without any URL parameters included) this method will return all cards, including temporary cards and cards that have expired / been revoked. + + Query parameters can be used to refine the cards that are returned. For example, to fetch cards which have been issued and are therefore currently active we can add the query parameter: `status=ISSUED`. + + If we want to find Cards with a specific identifier we can specify that identifier as a query parameter as well. For example, adding the following to the query string will return all revoked cards with the mifare ID '123': `status=REVOKED&identifier=123@<mifare id scheme>`. Identifiers should be provided in the format `<value>@<scheme>`, but if the scheme is not provided the scheme shall be assumed to be the CRSid. See above for the list of supported schemes. + + In the case of querying by mifare identifier, any leading zeros within the identifier value included in the query will be ignored - so querying with + `identifier=0000000123@<mifare id scheme>` and `identifier=123@<mifare id scheme>` will return the same result. + + Alternately the `search` query parameter can be used to search all cards by a single identifier value regardless of the scheme of that identifier. + + If cards for multiple identifiers need to be fetched, use the `/cards/filter/` endpoint documented below. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view all cards contained within the card system. Without this permission only cards owned by the authenticated principal will be returned. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: + - name: search + in: query + description: A search term. + required: false + type: string + - name: updated_at__lte + in: query + description: '' + required: false + type: string + - name: updated_at__gte + in: query + description: '' + required: false + type: string + - name: identifier + in: query + description: Filter cards by an identifier in the format {value}@{scheme} + type: string + - name: status + in: query + description: Filter cards by their current status + type: string + enum: + - ISSUED + - REVOKED + - RETURNED + - EXPIRED + - name: card_type + in: query + description: Filter by the type of card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + - name: cursor + in: query + description: The pagination cursor value. + required: false + type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/CardSummary' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + parameters: [] + /v1beta1/cards/filter: + post: + operationId: v1beta1_cards_filter + summary: Filter cards by identifiers + description: |+ + + + ## Filter cards by Identifiers + + Returns the cards related to the given batch of identifiers. This is useful for finding a set of cards based on a batch of entities from another system. For example, finding cards for members of a group in Lookup can be achieved by first fetching all members of the group and their crsids from Lookup and then using this endpoint to find all cards based on those crsids. + + Identifiers should be provided in the format `<value>@<scheme>`, but if the scheme is not provided the scheme shall be assumed to be `person.crs.identifiers.uis.cam.ac.uk`. See above for the list of supported schemes. + + __Note__: the number of identifiers which can be sent in each request is limited to 50, if more that 50 unique identifiers are sent in a single request a `400` error response will be returned. If cards need to be filtered by more than 50 identifiers, multiple request should be made with the identifiers split into batches of 50. + + A `status` to filter cards can optionally be included in the body or as a query param. If not included cards of all statuses are returned. + + Although this endpoint uses the `POST` method, no data is created. `POST` is used to allow the set of identifiers to be provided in the body and therefore avoid problems caused by query-string length limits. + + This endpoint returns a paginated response object (as described above), but will not actually perform pagination due to the overall limit on the number of identifiers that can be queried by. Therefore the `next` and `previous` fields will always be `null` and the `page_size` and `cursor` query parameters will not be honoured. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to filter all cards contained within the card system. Without this permission only cards owned by the authenticated principal will be returned. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: + - name: data + in: body + required: true + schema: + required: + - identifiers + type: object + properties: + identifiers: + type: array + description: Identifiers to filter by, in the format value@scheme, scheme may be omitted in which case the scheme is assumed to be crsid + items: + type: string + status: + type: string + description: Status to filter by, if omitted cards of all statuses are returned + enum: + - ISSUED + - REVOKED + - RETURNED + - EXPIRED + updated_at__lte: + type: string + format: date-time + description: Filter updatedAt by IsoDateTime less than + updated_at__gte: + format: date-time + description: Filter updatedAt by IsoDateTime greater than + example: + identifiers: + - wgd23 + - 00001@<mifare_id_scheme> + status: ISSUED + - name: status + in: query + description: Filter cards by their current status (status in the body takes precedence over this query parameter) + type: string + enum: + - ISSUED + - REVOKED + - RETURNED + - EXPIRED + - name: updated_at__lte + in: query + description: Filter updatedAt by IsoDateTime less than + type: string + format: date-time + - name: updated_at__gte + in: query + description: Filter updatedAt by IsoDateTime greater than + type: string + format: date-time + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/CardSummary' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + parameters: [] + /v1beta1/cards/{id}: + get: + operationId: v1beta1_cards_read + summary: Get card detail + description: |+ + + + ## Get Card Detail + + Allows the detail of a single Card to be retrieved by ID. The Card entity returned contains the same information as presented in the filter and list card operations above, but also contains an array of `cardNotes` containing notes made by administrator users related to the current card. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view the card detail of any card contained within the card system. Principals without this permission are only able to view the card detail for a card that they own. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/Card' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + parameters: + - name: id + in: path + description: A UUID string identifying this card. + required: true + type: string + format: uuid + /v1beta1/cards/{id}/back-visualization: + get: + operationId: v1beta1_cards_back_visualization + summary: Returns a representation of the back of the card + description: |+ + + + ## Get card back visualization + + Returns a visualization of the back of this card in png or svg format. + + Currently a placeholder is used to represent the barcode printed on the back of the card, this will be replaced with a valid barcode as a piece of follow-up work. + + Temporary cards cannot be visualized, and will simply return a blank image. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view visualization of any card contained within the card system. Principals without this permission are only able to view the visualization for a card that they own. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: [] + responses: + '200': + description: '' + schema: + type: string + format: binary + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + produces: + - image/png + - image/svg+xml + tags: + - v1beta1 + parameters: + - name: id + in: path + description: A UUID string identifying this card. + required: true + type: string + format: uuid + /v1beta1/cards/{id}/front-visualization: + get: + operationId: v1beta1_cards_front_visualization + summary: Returns a representation of the front of this card + description: |+ + + + ## Get card front visualization + + Returns a visualization of the front of this card in png or svg format. Makes use of the Photo API to fetch the photo of the cardholder used on this card. In cases where this card makes use of an out-of-date photo of the cardholder imported from the legacy card system, the Photo may not be available, in which case a placeholder is displayed. + + Temporary cards cannot be visualized, and will simply return a blank image. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view visualization of any card contained within the card system. Principals without this permission are only able to view the visualization for a card that they own. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: [] + responses: + '200': + description: '' + schema: + type: string + format: binary + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + produces: + - image/png + - image/svg+xml + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/cards + - https://api.apps.cam.ac.uk/card/cards.readonly + parameters: + - name: id + in: path + description: A UUID string identifying this card. + required: true + type: string + format: uuid + /: + get: + operationId: _list + summary: List API Versions + description: Lists the available versions of the API + parameters: [] + responses: + '200': + description: '' + schema: + required: + - v1beta1 + - v1alpha1 + type: object + properties: + v1beta1: + type: string + format: uri + example: <url for version v1beta1> + description: The URI for version v1beta1 of the API + v1alpha1: + type: string + format: uri + example: <url for version v1alpha1> + description: The URI for version v1alpha1 of the API + tags: + - Versions + parameters: [] + /permissions: + get: + operationId: permissions_list + summary: List permissions + description: List the permissions of the current principal + parameters: [] + responses: + '200': + description: '' + schema: + required: + - permissions + type: object + properties: + permissions: + type: array + items: + type: string + example: + - CARD_DATA_READER + description: A list of the permissions the current principal has + tags: + - Permissions + parameters: [] + /v1beta1/available-barcodes: + get: + operationId: v1beta1_available-barcodes_list + summary: List available barcodes + description: |+ + + + ## List Available Barcodes + + Returns a list of barcodes which are available to be used by a new University Card. + + ### Permissions + + Only principals with the `CARD_DATA_READERS` permission are able to list available barcodes. + + parameters: + - name: cursor + in: query + description: The pagination cursor value. + required: false + type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/AvailableBarcode' + count: + type: integer + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/available-barcodes + - https://api.apps.cam.ac.uk/card/available-barcodes.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/available-barcodes + - https://api.apps.cam.ac.uk/card/available-barcodes.readonly + parameters: [] + /v1beta1/available-barcodes/{barcode}: + get: + operationId: v1beta1_available-barcodes_read + summary: Get available barcode detail + description: Returns a single Available Barcode by ID + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/AvailableBarcode' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/available-barcodes + - https://api.apps.cam.ac.uk/card/available-barcodes.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/available-barcodes + - https://api.apps.cam.ac.uk/card/available-barcodes.readonly + parameters: + - name: barcode + in: path + description: A unique value identifying this available barcode. + required: true + type: string + /v1beta1/card-logos: + get: + operationId: v1beta1_card-logos_list + summary: List card logos + description: |+ + + + ## List Card Logos + + Returns a list of card logo objects - representing logos which can be displayed on cards. + + Each logo contains a `contentLink` which links to the image content for this logo. The rest of the object represents metadata about a logo. + + parameters: + - name: cursor + in: query + description: The pagination cursor value. + required: false + type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/CardLogo' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + parameters: [] + /v1beta1/card-logos/{id}: + get: + operationId: v1beta1_card-logos_read + summary: Get card logo detail + description: |+ + + + ## Get Card Logo + + Returns a single card logo by UUID - containing metadata about a logo that can be present on a card. + + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CardLogo' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + parameters: + - name: id + in: path + description: A UUID string identifying this card logo. + required: true + type: string + format: uuid + /v1beta1/card-logos/{id}/content: + get: + operationId: v1beta1_card-logos_content + summary: Get card logo image content + description: |+ + + + ## Get Card Logo Image Content + + Redirects to the image content for a given card logo. Note that this endpoint will redirect to a temporary URL provided by the storage provider. This URL will timeout after a short period of time and therefore should not be persisted. + + parameters: [] + responses: + '302': + description: A successful request which will redirect to the image content for this logo + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-logos + - https://api.apps.cam.ac.uk/card/card-logos.readonly + parameters: + - name: id + in: path + description: A UUID string identifying this card logo. + required: true + type: string + format: uuid + /v1beta1/card-requests: + get: + operationId: v1beta1_card-requests_list + summary: List card requests + description: |+ + + + ## List Card Requests + + Returns a list of card request objects - representing requests for card creation. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view all card requests contained within the card system. Without this permission only card requests owned by the authenticated principal will be returned. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: + - name: updated_at__lte + in: query + description: '' + required: false + type: string + - name: updated_at__gte + in: query + description: '' + required: false + type: string + - name: workflow_state + in: query + description: Filter card requests by their current workflow state + type: string + enum: + - PENDING + - HOLD + - CANCELLED + - CREATING_TODO + - CREATING_INPROGRESS + - CREATING_DONE + - name: destination + in: query + description: '' + required: false + type: string + - name: requestor + in: query + description: '' + required: false + type: string + - name: cardholder_status + in: query + description: '' + required: false + type: string + - name: card_type + in: query + description: Filter by the type of card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + - name: identifier + in: query + description: '' + required: false + type: string + - name: cursor + in: query + description: The pagination cursor value. + required: false + type: string + - name: page_size + in: query + description: Number of results to return per page. + required: false + type: integer + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + next: + type: string + format: uri + x-nullable: true + previous: + type: string + format: uri + x-nullable: true + results: + type: array + items: + $ref: '#/definitions/CardRequestSummary' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + parameters: [] + /v1beta1/card-requests/cardholder-statuses: + get: + operationId: v1beta1_card-requests_cardholder_statuses + summary: Returns all cardholder statuses present on card requests + description: Returns the distinct cardholder statuses present on card requests. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CardRequestDistinctValues' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + parameters: [] + /v1beta1/card-requests/destinations: + get: + operationId: v1beta1_card-requests_destinations + summary: Returns the destinations of all card requests + description: Returns the distinct destinations of all card requests. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CardRequestDistinctValues' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + parameters: [] + /v1beta1/card-requests/requestors: + get: + operationId: v1beta1_card-requests_requestors + summary: Returns the list of people or services who have made a card request + description: Returns the distinct people or services who have made a card request. + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CardRequestDistinctValues' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + parameters: [] + /v1beta1/card-requests/update: + put: + operationId: v1beta1_card-requests_bulk_update + summary: Update multiple card requests + description: | + + + ## Update multiple card requests. + + Allows multiple card requests to be updated in one call. For large number of card requests, this endpoint will be faster than PUT-ing each update. + + Updates are processed in the order they are received. The response includes the detail and HTTP status code which would have been returned from separate PUTs in the same order. + + ### Permissions + + Principals with the `CARD_CREATOR` permission will be able to affect this endpoint. + parameters: + - name: data + in: body + required: true + schema: + type: object + properties: + updates: + type: array + items: + type: object + properties: + id: + description: if od card request + type: string + action: + description: The state to set this card request to. + type: string + enum: + - complete + - add + - start + - abandon + identifiers: + type: array + items: + type: object + properties: + scheme: + description: string + type: string + value: + description: string + type: string + responses: + '200': + description: '' + schema: + type: object + properties: + details: + type: array + items: + type: object + properties: + detail: + type: string + status: + type: number + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + parameters: [] + /v1beta1/card-requests/{id}: + get: + operationId: v1beta1_card-requests_read + summary: Get card request detail + description: |+ + + + ## Get Card Request + + Returns a single card request by UUID - containing metadata about a request for card creation. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view all card requests contained within the card system. Without this permission only card requests owned by the authenticated principal are visible. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: [] + responses: + '200': + description: '' + schema: + $ref: '#/definitions/CardRequest' + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + put: + operationId: v1beta1_card-requests_update + summary: Updates the card request + description: |+ + + + ## Update the card request + + This method allows a client to submit an action in the request body and optional identifier for a given card request. The available actions are `add`, `start`, `abandon` and `complete`. + + + For the `complete` action, the client can also append identifiers which associates the physically created cards to the card record - for example the card UID which is pre-encoded into the card by the manufacturer. + + The `complete` action returns the UUID of the created `card` entity. + + ### Permissions + + Principals with the `CARD_CREATOR` permission will be able to affect this endpoint. + + parameters: + - name: data + in: body + required: true + schema: + type: object + properties: + action: + description: The state to set this card request to. + type: string + enum: + - complete + - add + - start + - abandon + identifiers: + type: array + items: + type: object + properties: + scheme: + description: string + type: string + value: + description: string + type: string + responses: + '200': + description: '' + schema: + type: object + properties: + detail: + description: string + type: string + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + parameters: + - name: id + in: path + description: A UUID string identifying this card request. + required: true + type: string + format: uuid + /v1beta1/card-requests/{id}/back-visualization: + get: + operationId: v1beta1_card-requests_back_visualization + summary: Returns a representation of the back of the card request + description: |+ + + + ## Get card back visualization + + Returns a visualization of the back of this card in png or svg format. + + Currently a placeholder is used to represent the barcode printed on the back of the card, this will be replaced with a valid barcode as a piece of follow-up work. + + Temporary cards cannot be visualized, and will simply return a blank image. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view visualization of any card contained within the card system. Principals without this permission are only able to view the visualization for a card that they own. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: [] + responses: + '200': + description: '' + schema: + type: string + format: binary + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + produces: + - image/svg+xml + - image/png + - image/bmp + tags: + - v1beta1 + parameters: + - name: id + in: path + description: A UUID string identifying this card request. + required: true + type: string + format: uuid + /v1beta1/card-requests/{id}/front-visualization: + get: + operationId: v1beta1_card-requests_front_visualization + summary: Returns a representation of the front of this card request + description: |+ + + + ## Get card front visualization + + Returns a visualization of the front of this card in png or svg format. Makes use of the Photo API to fetch the photo of the cardholder used on this card. In cases where this card makes use of an out-of-date photo of the cardholder imported from the legacy card system, the Photo may not be available, in which case a placeholder is displayed. + + Temporary cards cannot be visualized, and will simply return a blank image. + + ### Permissions + + Principals with the `CARD_DATA_READERS` permission are able to view visualization of any card contained within the card system. Principals without this permission are only able to view the visualization for a card that they own. Ownership is determined based on the principal's identifier matching an identifier contained within a given card record. + + parameters: + - name: height + in: query + description: The desired height of the visualization (in pixels) + type: number + - name: width + in: query + description: The desired width of the visualization (in pixels) + type: number + responses: + '200': + description: '' + schema: + type: string + format: binary + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '404': + description: Object does not exist. + schema: + $ref: '#/definitions/APIException' + '500': + description: An error has occurred - retry the request after a pause. + produces: + - image/svg+xml + - image/png + - image/bmp + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-requests + - https://api.apps.cam.ac.uk/card/card-requests.readonly + parameters: + - name: id + in: path + description: A UUID string identifying this card request. + required: true + type: string + format: uuid + /v1beta1/card-rfid-data-config: + get: + operationId: v1beta1_card-rfid-data-config_list + summary: Returns the card RFID data configuration + description: List the RFID data configuration used to encode the card + parameters: [] + responses: + '200': + description: '' + schema: + required: + - results + type: object + properties: + results: + type: array + items: + required: + - id + - configuration + type: object + properties: + id: + type: string + configuration: + type: array + items: + type: object + '400': + description: Invalid input. + schema: + $ref: '#/definitions/ValidationError' + '401': + description: Authentication credentials are invalid or absent. + '500': + description: An error has occurred - retry the request after a pause. + tags: + - v1beta1 + security: + - API Service OAuth2 Client Credentials: + - https://api.apps.cam.ac.uk/card/card-rfid-data-config.readonly + - API Service OAuth2 Access Code: + - https://api.apps.cam.ac.uk/card/card-rfid-data-config.readonly + parameters: [] +definitions: + Card: + required: + - identifiers + - status + - attributes + - notes + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + selfLink: + title: Self link + type: string + format: uri + readOnly: true + frontVisualizationLink: + title: Front visualization link + type: string + format: uri + readOnly: true + backVisualizationLink: + title: Back visualization link + type: string + format: uri + readOnly: true + identifiers: + type: array + items: + $ref: '#/definitions/CardIdentifier' + issuedAt: + title: Issued at + description: If non-NULL, when the card was issued + type: string + format: date-time + x-nullable: true + issueNumber: + title: Issue number + description: The issue number of the card + type: integer + maximum: 2147483647 + minimum: 0 + x-nullable: true + expiresAt: + title: Expires at + description: If non-NULL, when the card expires + type: string + format: date-time + x-nullable: true + revokedAt: + title: Revoked at + description: If non-NULL, when the card was revoked + type: string + format: date-time + x-nullable: true + returnedAt: + title: Returned at + description: If non-NULL, when the card was returned + type: string + format: date-time + x-nullable: true + status: + title: Status + type: string + enum: + - ISSUED + - REVOKED + - RETURNED + - EXPIRED + cardType: + title: Card type + description: The type of the card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + updatedAt: + title: Updated at + description: When this record was updated + type: string + format: date-time + readOnly: true + attributes: + title: Attributes + description: The attributes of the card - describing what is present on the physical version of the card. This is an untyped block of JSON and the structure may change between card types, as different card types will allow different data to be printed on them. The attributes of temporary cards will not be populated as data relating to what has been printed on temporary cards has not been recorded. + type: object + notes: + type: array + items: + $ref: '#/definitions/CardNote' + CardLogo: + required: + - name + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + name: + title: Name + description: The logo's name + type: string + minLength: 1 + selfLink: + title: Self link + type: string + format: uri + readOnly: true + contentLink: + title: Content link + type: string + format: uri + readOnly: true + imageHeight: + title: Image height + description: The height of the logo in pixels - not populated for svg logos + type: integer + readOnly: true + imageWidth: + title: Image width + description: The width of the logo in pixels - not populated for svg logos + type: integer + readOnly: true + createdAt: + title: Created at + description: When this logo was created + type: string + format: date-time + readOnly: true + CardIdentifier: + required: + - scheme + - value + type: object + properties: + scheme: + title: Scheme + description: The identifier's scheme + type: string + enum: + - v1.person.identifiers.cam.ac.uk + - person.v1.student-records.university.identifiers.cam.ac.uk + - person.v1.human-resources.university.identifiers.cam.ac.uk + - person.v1.board-of-graduate-studies.university.identifiers.cam.ac.uk + - person.v1.legacy-card.university.identifiers.cam.ac.uk + - mifare-identifier.v1.card.university.identifiers.cam.ac.uk + - mifare-number.v1.card.university.identifiers.cam.ac.uk + - card.v1.legacy-card.university.identifiers.cam.ac.uk + - temporary-card.v1.card.university.identifiers.cam.ac.uk + - photo.v1.photo.university.identifiers.cam.ac.uk + - barcode.v1.card.university.identifiers.cam.ac.uk + - institution.v1.legacy-card.university.identifiers.cam.ac.uk + value: + title: Value + description: The identifier's value + type: string + minLength: 1 + CardRequestSummary: + required: + - identifiers + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + selfLink: + title: Self link + type: string + format: uri + readOnly: true + frontVisualizationLink: + title: Front visualization link + type: string + format: uri + readOnly: true + backVisualizationLink: + title: Back visualization link + type: string + format: uri + readOnly: true + identifiers: + type: array + items: + $ref: '#/definitions/CardIdentifier' + cardType: + title: Card type + description: The type of the card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + updatedAt: + title: Updated at + description: When this record was updated + type: string + format: date-time + readOnly: true + workflowState: + title: State + description: Card request state + type: string + enum: + - PENDING + - HOLD + - CANCELLED + - CREATING_TODO + - CREATING_INPROGRESS + - CREATING_DONE + destination: + title: Destination + description: The location the physical card will be delivered to once created + type: string + x-nullable: true + requestor: + title: Requestor + description: Origin of the card request + type: string + x-nullable: true + cardholderStatus: + title: Cardholder status + description: An approximation of the status of the cardholder at the point this card request has been raised. Only used to allow filtering of card requests, rather than as a deterministic indication of a cardholder's status. + type: string + minLength: 1 + errorReason: + title: Error reason + description: ERROR raised by card request + type: string + x-nullable: true + cancelReason: + title: Cancel reason + description: Reason the card request was CANCELLED + type: string + x-nullable: true + holdReason: + title: Hold reason + description: Reason the card request was placed on HOLD + type: string + x-nullable: true + CardRequestDistinctValues: + type: object + properties: + results: + type: array + items: + type: string + minLength: 1 + readOnly: true + CardRequest: + required: + - identifiers + - attributes + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + selfLink: + title: Self link + type: string + format: uri + readOnly: true + frontVisualizationLink: + title: Front visualization link + type: string + format: uri + readOnly: true + backVisualizationLink: + title: Back visualization link + type: string + format: uri + readOnly: true + identifiers: + type: array + items: + $ref: '#/definitions/CardIdentifier' + cardType: + title: Card type + description: The type of the card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + updatedAt: + title: Updated at + description: When this record was updated + type: string + format: date-time + readOnly: true + workflowState: + title: State + description: Card request state + type: string + enum: + - PENDING + - HOLD + - CANCELLED + - CREATING_TODO + - CREATING_INPROGRESS + - CREATING_DONE + destination: + title: Destination + description: The location the physical card will be delivered to once created + type: string + x-nullable: true + requestor: + title: Requestor + description: Origin of the card request + type: string + x-nullable: true + cardholderStatus: + title: Cardholder status + description: An approximation of the status of the cardholder at the point this card request has been raised. Only used to allow filtering of card requests, rather than as a deterministic indication of a cardholder's status. + type: string + minLength: 1 + errorReason: + title: Error reason + description: ERROR raised by card request + type: string + x-nullable: true + cancelReason: + title: Cancel reason + description: Reason the card request was CANCELLED + type: string + x-nullable: true + holdReason: + title: Hold reason + description: Reason the card request was placed on HOLD + type: string + x-nullable: true + rfidData: + type: array + items: + type: object + readOnly: true + attributes: + title: Attributes + description: The attributes of the card - describing what is present on the physical version of the card. This is an untyped block of JSON and the structure may change between card types, as different card types will allow different data to be printed on them. The attributes of temporary cards will not be populated as data relating to what has been printed on temporary cards has not been recorded. + type: object + CardSummary: + required: + - identifiers + - status + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + selfLink: + title: Self link + type: string + format: uri + readOnly: true + frontVisualizationLink: + title: Front visualization link + type: string + format: uri + readOnly: true + backVisualizationLink: + title: Back visualization link + type: string + format: uri + readOnly: true + identifiers: + type: array + items: + $ref: '#/definitions/CardIdentifier' + issuedAt: + title: Issued at + description: If non-NULL, when the card was issued + type: string + format: date-time + x-nullable: true + issueNumber: + title: Issue number + description: The issue number of the card + type: integer + maximum: 2147483647 + minimum: 0 + x-nullable: true + expiresAt: + title: Expires at + description: If non-NULL, when the card expires + type: string + format: date-time + x-nullable: true + revokedAt: + title: Revoked at + description: If non-NULL, when the card was revoked + type: string + format: date-time + x-nullable: true + returnedAt: + title: Returned at + description: If non-NULL, when the card was returned + type: string + format: date-time + x-nullable: true + status: + title: Status + type: string + enum: + - ISSUED + - REVOKED + - RETURNED + - EXPIRED + cardType: + title: Card type + description: The type of the card + type: string + enum: + - MIFARE_PERSONAL + - MIFARE_TEMPORARY + updatedAt: + title: Updated at + description: When this record was updated + type: string + format: date-time + readOnly: true + CardNote: + required: + - text + type: object + properties: + id: + title: Id + type: string + format: uuid + readOnly: true + text: + title: Text + description: The text of the note against a given card + type: string + minLength: 1 + createdBy: + title: Created by + description: The crsid of the user who created the note - not known for legacy data + type: string + maxLength: 8 + minLength: 1 + x-nullable: true + createdAt: + title: Created at + description: When this record was created + type: string + format: date-time + readOnly: true + AvailableBarcode: + required: + - barcode + type: object + properties: + barcode: + title: Barcode + type: string + maxLength: 5 + minLength: 1 + selfLink: + title: Self link + type: string + format: uri + readOnly: true + createdAt: + title: Created at + description: When this record was created + type: string + format: date-time + readOnly: true + APIException: + title: Generic API Error + description: A description of an error that has occurred. + required: + - detail + type: object + properties: + detail: + description: Error details + type: string + example: + detail: Not found. + ValidationError: + title: Validation Error + description: Error messages for each field that triggered a validation error + type: object + properties: + non_field_errors: + description: List of validation errors not related to any field + type: array + items: + type: string + additionalProperties: + description: A list of error messages for the field + type: array + items: + type: string + example: + status: + - Select a valid choice. Bad_status is not one of the available choices. diff --git a/setup.py b/setup.py index 81eee42..1a52d99 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ PACKAGE_DESCRIPTION = ( "A module containing helpers and shared code related to identity systems within UIS, " "University of Cambridge." ) -PACKAGE_VERSION = "1.0.1" +PACKAGE_VERSION = "1.0.2-rc1" PACKAGE_URL = "https://gitlab.developers.cam.ac.uk/uis/devops/iam/identity-lib" -- GitLab