diff --git a/static/api-specs/nerm/parameters/_index.yaml b/static/api-specs/nerm/parameters/_index.yaml index 3576a3d8919..7a2d9d09c92 100644 --- a/static/api-specs/nerm/parameters/_index.yaml +++ b/static/api-specs/nerm/parameters/_index.yaml @@ -57,4 +57,6 @@ workflow_session_id: result: $ref: './query/result.yaml' metadata: - $ref: './query/metadata.yaml' \ No newline at end of file + $ref: './query/metadata.yaml' +after_id: + $ref: './query/after_id.yaml' \ No newline at end of file diff --git a/static/api-specs/nerm/parameters/query/after_id.yaml b/static/api-specs/nerm/parameters/query/after_id.yaml new file mode 100644 index 00000000000..5b521c547da --- /dev/null +++ b/static/api-specs/nerm/parameters/query/after_id.yaml @@ -0,0 +1,8 @@ +name: after_id +in: query +description: Represents the ID where the query should begin from. If blank, it represents the first ID. When used, forces sorting by ID ascending and does not allow use of `offset`. When after_id is specified it changes the mode of the API such that any filter parameters other than profile_type_id, limit, and offset are not supported and will be either silently ignored or result in an HTTP 400 error. For example you can not include and after_id along with an archived=false in the same request. +required: false +schema: + type: string + format: uuid + example: 4eaa719f-4312-4c5b-9264-d0eb04d4a02a \ No newline at end of file diff --git a/static/api-specs/nerm/paths/profiles.yaml b/static/api-specs/nerm/paths/profiles.yaml index 9b8728013ab..d7fd01f29fd 100644 --- a/static/api-specs/nerm/paths/profiles.yaml +++ b/static/api-specs/nerm/paths/profiles.yaml @@ -11,6 +11,7 @@ get: - $ref: "../parameters/query/profile_type_id.yaml" - $ref: "../parameters/query/status.yaml" - $ref: "../parameters/query/metadata.yaml" + - $ref: "../parameters/query/after_id.yaml" responses: '200': $ref: "../responses/Profiles_Meta.yaml" diff --git a/static/api-specs/nerm/responses/Profiles_Meta.yaml b/static/api-specs/nerm/responses/Profiles_Meta.yaml index 799402f2745..e3990db0dc2 100644 --- a/static/api-specs/nerm/responses/Profiles_Meta.yaml +++ b/static/api-specs/nerm/responses/Profiles_Meta.yaml @@ -9,4 +9,4 @@ content: items: $ref: '../schemas/GET/Profile.yaml' _metadata: - $ref: '../schemas/Metadata.yaml' \ No newline at end of file + $ref: '../schemas/MetadataWithAfterId.yaml' \ No newline at end of file diff --git a/static/api-specs/nerm/schemas/MetadataWithAfterId.yaml b/static/api-specs/nerm/schemas/MetadataWithAfterId.yaml new file mode 100644 index 00000000000..86e640e0b51 --- /dev/null +++ b/static/api-specs/nerm/schemas/MetadataWithAfterId.yaml @@ -0,0 +1,30 @@ +type: object +properties: + limit: + type: integer + description: The maximum number of records to return in the search + example: /endpoint?limit=10 + format: int32 + offset: + type: integer + description: The number of records to skip before starting to return results. + example: /endpoint?offset=60 + format: int32 + total: + type: integer + description: The total number of records available matching the search criteria. + example: /endpoint?total=10 + format: int32 + next: + type: string + description: The ID of the first record in the next set of results + example: /endpoint?limit=10&offset=60 + previous: + type: string + description: The ID of the last record in the previous set of results + example: /endpoint?limit=10&offset=40 + after_id: + type: string + format: uuid + example: 4eaa719f-4312-4c5b-9264-d0eb04d4a02a + description: The ID from which the search will start, ignoring all records before it. \ No newline at end of file