Skip to content

Latest commit

 

History

History
77 lines (47 loc) · 25.7 KB

File metadata and controls

77 lines (47 loc) · 25.7 KB
id add-collection
title Add collection
description Create a new collection under user's account.
sidebar_label Add collection
hide_title true
hide_table_of_contents true
api
description tags parameters requestBody responses method path servers security securitySchemes jsonRequestBodyExample info postman
Create a new collection under user's account.
Collections
content
application/json
schema
type properties required additionalProperties
object
name
type description example
string
The name of the new collection to be created.
Woman in Quran
name
false
200 400 401 403 404 422 429 500 502 503 504
description content headers
Request has been handled successfully.
application/json
schema
type properties additionalProperties
object
success data
type example
boolean
true
type properties required additionalProperties title
object
id updatedAt name
type example
string
cmnduweg30007sms01nch1s3z
type format example
string
date-time
2023-01-21T07:28:13.023Z
type example
string
Woman in Quran
id
updatedAt
name
false
Collection
false
X-Mutation-At
description schema
Unix timestamp (milliseconds) of the latest mutation for the user. Clients should store this value and include it in subsequent mutation requests for optimistic concurrency control.
type example
string
1731636500303
description content
The request is missing required parameters or is invalid.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The request is missing required headers or is invalid
type example
string
invalid_request
type example
boolean
false
false
description content
The request is unauthorized.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The request requires user authentication
type example
string
unauthorized
type example
boolean
false
false
description content
Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The server understood the request, but refuses to authorize it
type example
string
forbidden
type example
boolean
false
false
description content
Not Found. The resource being accessed does not exist.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The requested resource could not be found
type example
string
not_found
type example
boolean
false
false
description content
Validation Error. The request includes one or more invalid params. Please check the request params and try again.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The request was well-formed but was unable to be followed due to semantic errors
type example
string
unprocessable_entity
type example
boolean
false
false
description content
Too many requests, please try again later.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
Too many requests, please try again later
type example
string
rate_limit_exceeded
type example
boolean
false
false
description content
Server Error. Something went wrong, try again later.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The server encountered an internal error and was unable to complete your request
type example
string
internal_server_error
type example
boolean
false
false
description content
Invalid response from the upstream server
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The server was acting as a gateway or proxy and received an invalid response from the upstream server
type example
string
bad_gateway
type example
boolean
false
false
description content
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance
type example
string
service_unavailable
type example
boolean
false
false
description content
The server did not receive a timely response from the upstream server.
application/json
schema
type properties additionalProperties
object
message type success
type example
string
The server was acting as a gateway or proxy and did not receive a timely response from the upstream server
type example
string
gateway_timeout
type example
boolean
false
false
post
/v1/collections
url description
Pre-production Server
url description
Production Server
x-auth-token x-client-id
x-auth-token x-client-id
type in name description
apiKey
header
x-auth-token
The JWT access token required for accessing the endpoints.
type in name description
apiKey
header
x-client-id
Your client id
name
Woman in Quran
title version description
User-related APIs
1.0.0
Quran.Foundation user-related APIs enable your app to seamlessly integrate with Quran.Foundation's user-centric features, providing access to personalized notes, bookmarks, goals, streaks, reading sessions, and more. This differentiates them from [content APIs](/docs/category/content-apis) that focus on non-user-specific resources like translations, tafsirs, and verses. ## How to get access We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to [get an access token](/docs/tutorials/oidc/getting-started-with-oauth2#obtaining-oauth-20-client-credentials) to make requests to our APIs. Then follow the steps mentioned [here](/docs/tutorials/oidc/getting-started-with-oauth2). ## Pagination We are using cursor based pagination. The pagination query params consist of `first`,`after`, `before` and `last`. Example - `first: 10` will give you first 10 items - `first: 10, after: xyz` will give you first 10 items after the item with id `xyz` - `last: 10` will give you the last 10 items - `last: 10, before: xyz` will give you the last 10 items before the item with id `xyz` The only possible combinations are `first + after` or `last + before`. They should not be used together
name description url header method body
Add collection
content type
Create a new collection under user's account.
text/plain
path host query variable
v1
collections
{{baseUrl}}
key value
Content-Type
application/json
key value
Accept
application/json
POST
mode raw options
raw
""
raw
language
json
sidebar_class_name post api-method
info_path docs/user_related_apis_prelive/user-related-apis
custom_edit_url

import ApiTabs from "@theme/ApiTabs"; import MimeTabs from "@theme/MimeTabs"; import ParamsItem from "@theme/ParamsItem"; import ResponseSamples from "@theme/ResponseSamples"; import SchemaItem from "@theme/SchemaItem"; import SchemaTabs from "@theme/SchemaTabs"; import DiscriminatorTabs from "@theme/DiscriminatorTabs"; import TabItem from "@theme/TabItem";

Add collection

Create a new collection under user's account.

<TabItem label={"application/json"} value={"application/json-schema"}>

Details<summary style={{"textAlign":"left"}}>Request Body<div style={{"textAlign":"left","marginLeft":"1rem"}}><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The name of the new collection to be created.","example":"Woman in Quran"}}>
<TabItem label={"200"} value={"200"}>

Request has been handled successfully.

Response Headers
  • X-Mutation-At string

    Unix timestamp (milliseconds) of the latest mutation for the user. Clients should store this value and include it in subsequent mutation requests for optimistic concurrency control.

Schema
    data object

The request is missing required parameters or is invalid.

Schema

    The request is unauthorized.

    Schema

      Forbidden error. Can either be due to access token not being passed, having been expired or the caller trying to access a resource without enough permissions.

      Schema

        Not Found. The resource being accessed does not exist.

        Schema

          Validation Error. The request includes one or more invalid params. Please check the request params and try again.

          Schema

            Too many requests, please try again later.

            Schema

              Server Error. Something went wrong, try again later.

              Schema

                Invalid response from the upstream server

                Schema

                  The server is currently unable to handle the request due to a temporary overload or scheduled maintenance

                  Schema

                    The server did not receive a timely response from the upstream server.

                    Schema