### HTTP GET API Example URIs Source: https://restfulapi.net/http-methods/ This section provides example URIs for HTTP GET requests, which are used to retrieve resources. Examples include fetching a collection of users, applying pagination parameters, retrieving a specific user by ID, and accessing a sub-resource like a user's address. ```APIDOC HTTP GET http://www.appdomain.com/users HTTP GET http://www.appdomain.com/users?size=20&page=5 HTTP GET http://www.appdomain.com/users/123 HTTP GET http://www.appdomain.com/users/123/address ``` -------------------------------- ### Example MAC Token Parameters Source: https://tools.ietf.org/html/rfc6749 Illustrative example of nonce and MAC parameters used in an OAuth 2.0 Bearer Token usage context, specifically for MAC token authentication. Developers should consult RFC6750 and OAuth-HTTP-MAC specifications. ```Example nonce="274312:dj83hs9s", mac="kDZvddkndxvhGRXZhvuDjEWhGeE=" ``` -------------------------------- ### C# Example: Get Job Types with HttpClient Source: https://context7_llms Demonstrates how to make a GET request to the '/v1/jobTypes' endpoint using C# HttpClient, including setting 'Accept' and 'Authorization' headers with a bearer token. ```C# var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://api.bigchange.com/v1/jobTypes"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### Example JSON for API Problem Details Source: https://context7_llms An example JSON payload demonstrating the structure of an API problem details response, typically indicating an 'out of credit' error with specific details. ```JSON { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### C# Example: Retrieve Note Types using HttpClient Source: https://context7_llms Demonstrates how to make a GET request to the `/v1/noteTypes/:noteTypeId` endpoint using C# HttpClient. It includes setting the Accept header and the Authorization header with a bearer token. ```csharp var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://api.bigchange.com/v1/noteTypes/:noteTypeId"); request.Headers.Add("Accept", "application/json"); request.Headers.Add("Authorization", "Bearer "); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync()); ``` -------------------------------- ### HTTP GET Request and Sample JSON Response Source: https://restfulapi.net/http-methods/ Demonstrates an HTTP GET request to retrieve a user resource and the corresponding JSON response payload, showing a typical resource representation with ID, username, and email. ```APIDOC HTTP GET /users/1 produces below response: { "id": 1, "username": "admin", "email": "[email protected]"} ``` -------------------------------- ### Example HTTP GET Request for OAuth 2.0 Authorization Source: https://tools.ietf.org/html/rfc6749 Illustrates how a client directs the user-agent to the authorization endpoint using an HTTP GET request. It shows the query parameters appended to the authorization endpoint URI. ```HTTP GET /authorize?response_type=code&client_id=s6BhdRkqt3&state=xyz &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 Host: server.example.com ``` -------------------------------- ### Example Problem Details JSON Response Source: https://context7_llms A sample JSON response adhering to the Problem Details (RFC 7807) specification, indicating an 'out of credit' error. This example is applicable for both general and server-side errors. ```JSON { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### Example JSON for API Problem Details Response Source: https://context7_llms Illustrates the structure of a standard API problem details response, typically used for conveying error information. This example shows a 'not enough credit' scenario with a 403 status. ```json { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### Example HTTP Authorization Request for OAuth 2.0 Implicit Grant Source: https://tools.ietf.org/html/rfc6749 Demonstrates how a client constructs an HTTP GET request to the authorization endpoint, including the required `response_type`, `client_id`, and recommended `state` and `redirect_uri` parameters for the Implicit Grant flow. ```HTTP GET /authorize?response_type=token&client_id=s6BhdRkqt3&state=xyz &redirect_uri=https%3A%2F%2Fclient%2Eexample%2Ecom%2Fcb HTTP/1.1 Host: server.example.com ``` -------------------------------- ### Example HTTP Request for Accessing Protected Resource with Bearer Token Source: https://tools.ietf.org/html/rfc6749 Demonstrates how a client accesses a protected resource using an HTTP GET request, including the `Authorization` header with a bearer token. ```APIDOC GET /resource/1 HTTP/1.1 Host: example.com Authorization: Bearer mF_9.B5f-4.1JqM ``` -------------------------------- ### Example HTTP POST Request for OAuth 2.0 Access Token Source: https://tools.ietf.org/html/rfc6749 An example HTTP POST request to the token endpoint, demonstrating the basic structure for requesting an access token using TLS. ```HTTP POST /token HTTP/1.1 ``` -------------------------------- ### HTTP DELETE Request Examples Source: https://restfulapi.net/http-methods/ Illustrates example URIs for performing HTTP DELETE operations on both single resources (e.g., a specific user) and nested resources (e.g., an account belonging to a user) within a RESTful API. ```APIDOC HTTP DELETE http://www.appdomain.com/users/123 HTTP DELETE http://www.appdomain.com/users/123/accounts/456 ``` -------------------------------- ### HTTP PATCH Request for Partial Resource Update Source: https://restfulapi.net/http-methods/ Shows an example of an HTTP PATCH request payload used to partially update a resource. This specific example demonstrates changing a user's email address using the 'replace' operation as defined by JSON Patch. ```APIDOC HTTP PATCH /users/1 [{ "op": "replace", "path": "/email", "value": "[email protected]" }] ``` -------------------------------- ### Complete OAuth 2.0 Access Token Successful HTTP Response Example Source: https://tools.ietf.org/html/rfc6749 Provides a complete example of a successful HTTP 200 OK response from the authorization server, including necessary HTTP headers (Content-Type, Cache-Control, Pragma) and the JSON body containing the access token, refresh token, and other related parameters. ```HTTP HTTP/1.1 200 OK Content-Type: application/json;charset=UTF-8 Cache-Control: no-store Pragma: no-cache ``` ```JSON { "access_token":"2YotnFZFEjr1zCsicMWpAA", "token_type":"example", "expires_in":3600, "refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA", "example_parameter":"example_value" } ``` -------------------------------- ### BigChange Developer Portal API Documentation References Source: https://developers.bigchange.com/docs/rest/auth-proxy/get-an-access-token This section outlines the primary API documentation categories available within the BigChange Developer Portal. It provides direct links to the comprehensive guides for REST API, Data as a Service (DaaS), and Web Services, enabling developers to quickly navigate to relevant integration resources. ```APIDOC API Documentation Categories: - REST API: /docs/rest/api-reference - Data as a Service (DaaS): /docs/daas/daas-reference - Web Services: /docs/web-services/introduction ``` -------------------------------- ### Summary of HTTP Methods and CRUD Operations Source: https://restfulapi.net/http-methods/ A comprehensive summary table detailing the application of common HTTP methods (POST, GET, PUT, PATCH, DELETE) to CRUD operations for both collection resources (e.g., /users) and single resources (e.g., /users/123), including expected HTTP status codes and important considerations for each method. ```APIDOC HTTP Method | CRUD | Collection Resource (e.g. /users) | Single Resource (e.g. /users/123) ------------|------|-----------------------------------|------------------------------------ POST | Create | 201 (Created), 'Location' header with link to /users/{id} containing new ID | Avoid using POST on a single resource GET | Read | 200 (OK), list of users. Use pagination, sorting, and filtering to navigate big lists | 200 (OK), single user. 404 (Not Found), if ID not found or invalid PUT | Update/Replace | 405 (Method not allowed), unless you want to update every resource in the entire collection | 200 (OK) or 204 (No Content). Use 404 (Not Found), if ID is not found or invalid PATCH | Partial Update/Modify | 405 (Method not allowed), unless you want to modify the collection itself | 200 (OK) or 204 (No Content). Use 404 (Not Found), if ID is not found or invalid DELETE | Delete | 405 (Method not allowed), unless you want to delete the whole collection — use with caution | 200 (OK). 404 (Not Found), if ID not found or invalid ``` -------------------------------- ### Example OAuth 2.0 Access Token JSON Response Source: https://tools.ietf.org/html/rfc6749 Illustrates a successful OAuth 2.0 access token response body in JSON format, showing required and optional parameters like access_token, token_type, and expires_in. This is a simplified example. ```JSON { "access_token":"2YotnFZFEjr1zCsicMWpAA", "token_type":"example", "expires_in":3600, "example_parameter":"example_value" } ``` -------------------------------- ### Example ProblemDetails JSON Error Response Source: https://context7_llms An example JSON payload demonstrating the structure of a ProblemDetails object, typically returned for API errors such as insufficient credit or forbidden access (e.g., HTTP 403). It includes fields like type, title, status, detail, and instance. ```JSON { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### HTTP POST API Usage and Example URIs Source: https://restfulapi.net/http-methods/ This section details HTTP POST requests, primarily used for creating new subordinate resources or adding new resources to a collection. It emphasizes that POST is neither safe nor idempotent and responses are generally not cacheable unless explicitly controlled. Example URIs illustrate creating new users or accounts associated with a user, along with appropriate response codes like 201 (Created), 200 (OK), or 204 (No Content). ```APIDOC HTTP POST http://www.appdomain.com/users HTTP POST http://www.appdomain.com/users/123/accounts ``` -------------------------------- ### API Response Schema and Example for 200 OK Note Type Source: https://context7_llms Defines the successful response structure for retrieving a note type, including its unique identifier, name, default owner, and creation timestamp. An example JSON payload is provided. ```APIDOC id int64 The unique identifier of the note type Example: 5514123 name string The name of the note type Example: Complaint defaultOwnedByUserId int64nullable The default owner for notes of this type Example: 5514123 createdAt date-time The UTC timestamp of when this note type was created Example: 2022-11-29T16:50:16.0000000+00:00 ``` ```JSON { "id": 5514123, "name": "Complaint", "defaultOwnedByUserId": 5514123, "createdAt": "2022-11-29T16:50:16.0000000+00:00" } ``` -------------------------------- ### HTTP PUT API Usage and Example URIs Source: https://restfulapi.net/http-methods/ This section covers HTTP PUT requests, which are used to update an existing resource or create a new one if it doesn't exist. Responses are not cacheable. It outlines appropriate response codes such as 201 (Created) for new resources or 200 (OK) / 204 (No Content) for modifications. Example URIs demonstrate updating a specific user or an account belonging to a user, and the section highlights the difference between POST and PUT in terms of request URIs. ```APIDOC HTTP PUT http://www.appdomain.com/users/123 HTTP PUT http://www.appdomain.com/users/123/accounts/456 ``` -------------------------------- ### Encoding Example for application/x-www-form-urlencoded Source: https://tools.ietf.org/html/rfc6749 Illustrates the encoding process for the 'application/x-www-form-urlencoded' media type, showing how specific Unicode code points are transformed into an octet sequence (hexadecimal) and then further URL-encoded for payload representation. ```APIDOC 20 25 26 2B C2 A3 E2 82 AC +%25%26%2B%C2%A3%E2%82%AC ``` -------------------------------- ### Example Client Error Problem Details JSON Response with Errors Object Source: https://context7_llms A sample JSON response for a client-side error, demonstrating the Problem Details (RFC 7807) structure with an empty 'errors' object, which can be used for validation errors. ```JSON { "errors": {}, "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### Global Website Styling and Responsive Adjustments Source: https://restfulapi.net/http-methods/ This extensive CSS snippet provides the core styling for a website, including hover effects, input field appearances, button styles, and responsive adjustments for various screen sizes. It manages layout, spacing, and visual consistency across different sections of the site. ```CSS a:hover{color:var(--contrast-3);}.footer-bar .widget_nav_menu .current-menu-item a{color:var(--contrast-3);}input[type="text"],input[type="email"],input[type="url"],input[type="password"],input[type="search"],input[type="tel"],input[type="number"],textarea,select{color:#666666;background-color:#fafafa;border-color:#cccccc;}input[type="text"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="password"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="number"]:focus,textarea:focus,select:focus{color:#666666;background-color:#ffffff;border-color:#bfbfbf;}button,html input[type="button"],input[type="reset"],input[type="submit"],a.button,a.wp-block-button__link:not(.has-background){color:var(--base-3);background-color:var(--contrast);}button:hover,html input[type="button"]:hover,input[type="reset"]:hover,input[type="submit"]:hover,a.button:hover,button:focus,html input[type="button"]:focus,input[type="reset"]:focus,input[type="submit"]:focus,a.button:focus,a.wp-block-button__link:not(.has-background):active,a.wp-block-button__link:not(.has-background):focus,a.wp-block-button__link:not(.has-background):hover{color:var(--base-3);background-color:var(--contrast-3);}a.generate-back-to-top{background-color:rgba( 0,0,0,0.4 );color:#ffffff;}a.generate-back-to-top:hover,a.generate-back-to-top:focus{background-color:rgba( 0,0,0,0.6 );color:#ffffff;}:root{--gp-search-modal-bg-color:var(--base-3);--gp-search-modal-text-color:var(--contrast);--gp-search-modal-overlay-bg-color:rgba(0,0,0,0.2);}@media (max-width: 768px){.main-navigation .menu-bar-item:hover > a, .main-navigation .menu-bar-item.sfHover > a{background:none;color:var(--contrast);}}.nav-below-header .main-navigation .inside-navigation.grid-container, .nav-above-header .main-navigation .inside-navigation.grid-container{padding:0px 20px 0px 20px;}.site-main .wp-block-group__inner-container{padding:40px;}.separate-containers .paging-navigation{padding-top:20px;padding-bottom:20px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-40px;width:calc(100% + 80px);max-width:calc(100% + 80px);}.sidebar .widget, .page-header, .widget-area .main-navigation, .site-main > *{margin-bottom:40px;}.separate-containers .site-main{margin:40px;}.both-right .inside-left-sidebar,.both-left .inside-left-sidebar{margin-right:20px;}.both-right .inside-right-sidebar,.both-left .inside-right-sidebar{margin-left:20px;}.separate-containers .featured-image{margin-top:40px;}.separate-containers .inside-right-sidebar, .separate-containers .inside-left-sidebar{margin-top:40px;margin-bottom:40px;}.rtl .menu-item-has-children .dropdown-menu-toggle{padding-left:20px;}.rtl .main-navigation .main-nav ul li.menu-item-has-children > a{padding-right:20px;}.widget-area .widget{padding:10px 20px 25px 20px;}.footer-widgets-container{padding:60px 40px 60px 40px;}.inside-site-info{padding:40px 20px 40px 20px;}@media (max-width:768px){.separate-containers .inside-article, .separate-containers .comments-area, .separate-containers .page-header, .separate-containers .paging-navigation, .one-container .site-content, .inside-page-header{padding:50px 20px 50px 20px;}.site-main .wp-block-group__inner-container{padding:50px 20px 50px 20px;}.inside-header{padding-right:25px;padding-left:25px;}.footer-widgets-container{padding-right:25px;padding-left:25px;}.inside-site-info{padding-right:10px;padding-left:10px;}.entry-content .alignwide, body:not(.no-sidebar) .entry-content .alignfull{margin-left:-20px;width:calc(100% + 40px);max-width:calc(100% + 40px);}.one-container .site-main .paging-navigation{margin-bottom:40px;}}/* End cached CSS */.is-right-sidebar{width:25%;}.is-left-sidebar{width:15%;}.site-content .content-area{width:60%;}@media (max-width: 768px){.main-navigation .menu-toggle,.sidebar-nav-mobile:not(#sticky-placeholder){display:block;}.main-navigation ul,.gen-sidebar-nav,.main-navigation:not(.slideout-navigation):not(.toggled) .main-nav > ul,.has-inline-mobile-toggle #site-navigation .inside-navigation > *:not(.navigation-search):not(.main-nav){display:none;}.nav-align-right .inside-navigation,.nav-align-center .inside-navigation{justify-content:space-between;}.has-inline-mobile-toggle .mobile-menu-control-wrapper{display:flex;flex-wrap:wrap;}.has-inline-mobile-toggle .inside-header{flex-direction:row;text-align:left;flex-wrap:wrap;}.has-inline-mobile-toggle .header-widget,.has-inline-mobile-toggle #site-navigation{flex-basis:100%;}.nav-float-left .has-inline-mobile-toggle #site-navigation{order:10;}} .dynamic-author-image-rounded{border-radius:100%;}.dynamic-featured-image, .dynamic-author-image{vertical-align:middle;}.one-container.blog .dynamic-content-template:not(:last-child), .one-container.archive .dynamic-content-template:not(:last-child){padding-bottom:0px;}.dynamic-entry-excerpt > p:last-child{margin-bottom:0px;} .page-hero{background-color:rgba(34,34,34,0.5);c ``` -------------------------------- ### Make Authenticated GET Request to BigChange API with cURL Source: https://context7_llms This cURL example demonstrates how to make an authenticated GET request to a BigChange API endpoint. It requires an access token obtained via OAuth 2.0 and a customer ID to access specific customer data, passed as a Bearer token in the authorization header and a customer-id header respectively. ```cURL curl --request GET \ --url https://api.bigchange.com/v1/contacts \ --header 'authorization: Bearer ACCESS_TOKEN' \ --header 'content-type: application/json' \ --header 'customer-id: 14532' ``` -------------------------------- ### Define Global JavaScript Configuration Variables Source: https://restfulapi.net/http-methods/ This JavaScript block defines several global configuration objects used by the website's plugins and themes. It includes settings for Prism syntax highlighting, GeneratePress theme menus, navigation search, back-to-top functionality, and extensive settings for the wpDiscuz comment system, covering various messages, validation rules, and social login options. Note that the wpDiscuzAjaxObj appears truncated in the source. ```JavaScript var prism_settings = {"pluginUrl":"https:\/\/restfulapi.net\/wp-content\/plugins\/code-syntax-block\/"}; var generatepressMenu = {"toggleOpenedSubMenus":true,"openSubMenuLabel":"Open Sub-Menu","closeSubMenuLabel":"Close Sub-Menu"}; var generatepressNavSearch = {"open":"Open Search Bar","close":"Close Search Bar"}; var generatepressBackToTop = {"smooth":true}; var wpdiscuzAjaxObj = {"wc_hide_replies_text":"Hide Replies","wc_show_replies_text":"View Replies","wc_msg_required_fields":"Please fill out required fields","wc_invalid_field":"Some of field value is invalid","wc_error_empty_text":"please fill out this field to comment","wc_error_url_text":"url is invalid","wc_error_email_text":"email address is invalid","wc_invalid_captcha":"Invalid Captcha Code","wc_login_to_vote":"You Must Be Logged In To Vote","wc_deny_voting_from_same_ip":"You are not allowed to vote for this comment","wc_self_vote":"You cannot vote for your comment","wc_vote_only_one_time":"You've already voted for this comment","wc_voting_error":"Voting Error","wc_banned_user":"You are banned","wc_comment_edit_not_possible":"Sorry, this comment is no longer possible to edit","wc_comment_not_updated":"Sorry, the comment was not updated","wc_comment_not_edited":"You've not made any changes","wc_msg_input_min_length":"Input is too short","wc_msg_input_max_length":"Input is too long","wc_spoiler_title":"Spoiler Title","wc_cannot_rate_again":"You cannot rate again","wc_not_allowed_to_rate":"You're not allowed to rate here","wc_confirm_rate_edit":"Are you sure you want to edit your rate?","wc_follow_user":"Follow this user","wc_unfollow_user":"Unfollow this user","wc_follow_success":"You started following this comment author","wc_follow_canceled":"You stopped following this comment author.","wc_follow_email_confirm":"Please check your email and confirm the user following request.","wc_follow_email_confirm_fail":"Sorry, we couldn't send confirmation email.","wc_follow_login_to_follow":"Please login to follow users.","wc_follow_impossible":"We are sorry, but you can't follow this user.","wc_follow_not_added":"Following failed. Please try again later.","is_user_logged_in":"","commentListLoadType":"0","commentListUpdateType":"0","commentListUpdateTimer":"600","liveUpdateGuests":"0","wordpressThreadCommentsDepth":"5","wordpressIsPaginate":"","commentTextMaxLength":"0","replyTextMaxLength":"0","commentTextMinLength":"10","replyTextMinLength":"10","storeCommenterData":"100000","socialLoginAgreementCheckbox":"0","enableFbLogin":"0","fbUseOAuth2":"0","enableFbShare":"0","facebookAppID":"","facebookUseOAuth2":"0","enableGoogleLogin":"0","googleClientID":"","googleClientSecret":"","cookiehash":"a21cf746f837f71681edc9e7cee3e405","isLoadOnlyParentComments":"0","scrollToComment":"1","commentFormView":"collapsed","enableDropAnimation":"1","isNativeAjaxEnabled":"1","userInteractionCheck":"1","enableBubble":"0","bubbleLiveUpdate":"0","bubbleHintTimeout":"45","bubbleHintHideTimeout":"10","cookieHideBubbleHint":"wpdiscuz_hide_bubble_hint","bubbleHintShowOnce":"1","bubbleHintCookieExpires":"7","bubbleShowNewCommentMessage":"1","bubbleLocation":"content_left","firstLoadWithAjax":"1","wc_copied_to_clipboard":"Copied to ``` -------------------------------- ### Google Analytics and Breeze Prefetch Configuration Source: https://restfulapi.net/http-methods/ This JavaScript code initializes Google Analytics tracking and configures the Breeze prefetch mechanism for optimizing website performance by preloading local URLs and ignoring specific remote paths. ```JavaScript var breeze_prefetch = {"local_url":"https:\/\/restfulapi.net","ignore_remote_prefetch":"1","ignore_list":["\/ads.txt","wp-admin","wp-login.php"]}; window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-GKHN4ZGH3M'); ``` -------------------------------- ### Example HTTP Request for Accessing Protected Resource with MAC Token Source: https://tools.ietf.org/html/rfc6749 Shows an HTTP GET request to a protected resource using a Message Authentication Code (MAC) token, including the `Authorization` header with MAC details. ```APIDOC GET /resource/1 HTTP/1.1 Host: example.com Authorization: MAC id="h480djs93hd8", ``` -------------------------------- ### General CSS Styles for Website Layout and Responsiveness Source: https://restfulapi.net/versioning/ This snippet contains various CSS rules for styling a website, including responsive adjustments for containers, grids, images, and post layouts. It addresses padding, width, display properties, and media queries for different screen sizes, ensuring proper rendering across devices. ```CSS .gb-container-7cb8f23a > .gb-inside-container{padding-top:160px;padding-bottom:80px;}.gb-container-862c047f > .gb-inside-container{padding-right:25px;padding-bottom:80px;padding-left:25px;}.gb-grid-wrapper > .gb-grid-column-862c047f{width:100%;}.gb-container-b83a6043 > .gb-inside-container{padding-top:40px;}.gb-grid-wrapper > .gb-grid-column-5d04ba48{width:100%;}.gb-container-efa2e9db{width:100%;display:none !important;}.gb-grid-wrapper > .gb-grid-column-efa2e9db{width:100%;}:root{--gb-container-width:2000px;}.gb-container .wp-block-image img{vertical-align:middle;}.gb-grid-wrapper .wp-block-image{margin-bottom:0;}.gb-highlight{background:none;}.gb-shape{line-height:0;}.gb-container-link{position:absolute;top:0;right:0;bottom:0;left:0;z-index:99;} /* GeneratePress Site CSS */ /* Volume Remastered CSS */ .widget ul li { font-size: 17px; } /* Featured post in blog */ .featured-column.grid-100 { width: 100%; } .featured-column.grid-100:not(.has-post-thumbnail) .gb-grid-wrapper > .gb-grid-column:first-child { display: none; } /* Custom Post Navigation remove empty classes */ .featured-navigation .gb-grid-column:empty { flex: 0 1; } @media(min-width: 769px) { .featured-navigation .gb-grid-column:not(:empty) { flex: 1 0; } } /* Single Post Hero image responsive controls */ @media(max-width: 1024px) and (min-width: 769px) { .page-hero-block:before { background-size: cover; } .featured-column, .featured-column img.wp-post-image { width: 100% !important; } } @media(max-width: 768px) { .page-hero-block:before { background: none; } } /* Post Archives - force post meta to vertically align bottom */ .generate-columns-container .post>.gb-container, .generate-columns-container .post>.gb-container>.gb-inside-container, .post-summary>.gb-inside-container { display: flex; flex-direction: column; height: 100%; } .post-summary { flex: 1; } .post-summary>.gb-inside-container>*:last-child { margin-top: auto; } /* Add border radius to post archive images */ .generate-columns-container .dynamic-featured-image { border-radius: 4px; } /* End GeneratePress Site CSS */ ``` -------------------------------- ### HTTP 405 Method Not Allowed Status Code Source: https://en.wikipedia.org/wiki/List_of_HTTP_status_codes The 405 (Method Not Allowed) status code indicates that the request method used is not supported for the target resource. Examples include a GET request on a form requiring POST, or a PUT request on a read-only resource. ```APIDOC 405 Method Not Allowed A request method is not supported for the requested resource; for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. ``` -------------------------------- ### Initialize Google Analytics and Breeze Prefetch Configuration Source: https://restfulapi.net/versioning/ This JavaScript snippet initializes the Google Analytics data layer and configures `breeze_prefetch` settings. It sets up `gtag` for tracking and defines local URL and ignore lists for prefetching, optimizing website performance and analytics. ```JavaScript var breeze_prefetch = {"local_url":"https:\/\/restfulapi.net","ignore_remote_prefetch":"1","ignore_list":["\/ads.txt","wp-admin","wp-login.php"]}; window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-GKHN4ZGH3M'); ``` -------------------------------- ### REST API: HTTP GET Method Source: https://restfulapi.net/http-methods/ Documentation for the HTTP GET method in REST APIs, used for retrieving resource representations without modifying them. GET requests are safe and idempotent. It also details standard response codes like 200 (OK), 404 (NOT FOUND), and 400 (BAD REQUEST). ```APIDOC HTTP Method: GET Purpose: Retrieve resource representation/information only. Do not modify state. Characteristics: - Safe method (does not change resource state). - Idempotent (multiple identical requests produce the same result until another API changes state). Response Codes: - 200 (OK): Resource found, returned with response body (usually XML or JSON). - 404 (NOT FOUND): Resource not found on server. - 400 (BAD REQUEST): Request itself is not correctly formed. ``` -------------------------------- ### General Website CSS Styles Source: https://restfulapi.net/http-methods/ This snippet contains various CSS rules for styling a website, including container padding, grid column widths, image alignment, font sizes, featured post layouts, and responsive adjustments for hero images and post archives. ```CSS .gb-container-862c047f > .gb-inside-container{padding-right:25px;padding-bottom:80px;padding-left:25px;}.gb-grid-wrapper > .gb-grid-column-862c047f{width:100%;}.gb-container-b83a6043 > .gb-inside-container{padding-top:40px;}.gb-grid-wrapper > .gb-grid-column-5d04ba48{width:100%;}.gb-container-efa2e9db{width:100%;display:none !important;}.gb-grid-wrapper > .gb-grid-column-efa2e9db{width:100%;}:root{--gb-container-width:2000px;}.gb-container .wp-block-image img{vertical-align:middle;}.gb-grid-wrapper .wp-block-image{margin-bottom:0;}.gb-highlight{background:none;}.gb-shape{line-height:0;}.gb-container-link{position:absolute;top:0;right:0;bottom:0;left:0;z-index:99;} /* GeneratePress Site CSS */ /* Volume Remastered CSS */ .widget ul li { font-size: 17px; } /* Featured post in blog */ .featured-column.grid-100 { width: 100%; } .featured-column.grid-100:not(.has-post-thumbnail) .gb-grid-wrapper > .gb-grid-column:first-child { display: none; } /* Custom Post Navigation remove empty classes */ .featured-navigation .gb-grid-column:empty { flex: 0 1; } @media(min-width: 769px) { .featured-navigation .gb-grid-column:not(:empty) { flex: 1 0; } } /* Single Post Hero image responsive controls */ @media(max-width: 1024px) and (min-width: 769px) { .page-hero-block:before { background-size: cover; } .featured-column, .featured-column img.wp-post-image { width: 100% !important; } } @media(max-width: 768px) { .page-hero-block:before { background: none; } } /* Post Archives - force post meta to vertically align bottom */ .generate-columns-container .post>.gb-container, .generate-columns-container .post>.gb-container>.gb-inside-container, .post-summary>.gb-inside-container { display: flex; flex-direction: column; height: 100%; } .post-summary { flex: 1; } .post-summary>.gb-inside-container>*:last-child { margin-top: auto; } /* Add border radius to post archive images */ .generate-columns-container .dynamic-featured-image { border-radius: 4px; } /* End GeneratePress Site CSS */ ``` -------------------------------- ### Example OAuth 2.0 Invalid Request Error Response Source: https://tools.ietf.org/html/rfc6749 An example HTTP response demonstrating an 'invalid_request' error, including the HTTP status, headers, and the JSON-formatted error body. ```JSON HTTP/1.1 400 Bad Request Content-Type: application/json;charset=UTF-8 Cache-Control: no-store Pragma: no-cache { "error":"invalid_request" } ``` -------------------------------- ### Get Note Type API Endpoint Reference Source: https://context7_llms API documentation for retrieving details of a single note type, specifying the GET method, endpoint path, required scope, and parameters. ```APIDOC Endpoint: GET https://api.bigchange.com/v1/noteTypes/:noteTypeId Description: Retrieve the details of a single note type (required scope notes:read) Request: Path Parameters: noteTypeId: Type: int64 Required: true Possible values: >= 1 Description: The unique identifer of the note type Header Parameters: Customer-Id: Type: int64 Required: true Description: The customer identifier ``` -------------------------------- ### wpDiscuz General Plugin Configuration Source: https://restfulapi.net/http-methods/ Defines core settings for the wpDiscuz plugin, including reCAPTCHA keys, file upload limits, AJAX endpoints, and various user interface messages. This object likely represents a global configuration variable used throughout the plugin's frontend. ```javascript { "inlineFeedbackAttractionType":"disable", "loadRichEditor":"1", "wpDiscuzReCaptchaSK":"6LfGc74pAAAAAN9U3FRGc2qdSZdoMTo_ZYfstfZk", "wpDiscuzReCaptchaTheme":"light", "wpDiscuzReCaptchaVersion":"2.0", "wc_captcha_show_for_guest":"1", "wc_captcha_show_for_members":"0", "wpDiscuzIsShowOnSubscribeForm":"0", "wmuEnabled":"0", "wmuInput":"wmu_files", "wmuMaxFileCount":"1", "wmuMaxFileSize":"5242880", "wmuPostMaxSize":"104857600", "wmuIsLightbox":"0", "wmuMimeTypes":[], "wmuPhraseConfirmDelete":"Are you sure you want to delete this attachment?", "wmuPhraseNotAllowedFile":"Not allowed file type", "wmuPhraseMaxFileCount":"Maximum number of uploaded files is 1", "wmuPhraseMaxFileSize":"Maximum upload file size is 5MB", "wmuPhrasePostMaxSize":"Maximum post size is 100MB", "wmuPhraseDoingUpload":"Uploading in progress! Please wait.", "msgEmptyFile":"File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.", "msgPostIdNotExists":"Post ID not exists", "msgUploadingNotAllowed":"Sorry, uploading not allowed for this post", "msgPermissionDenied":"You do not have sufficient permissions to perform this action", "wmuKeyImages":"images", "wmuSingleImageWidth":"auto", "wmuSingleImageHeight":"200", "previewTemplate":"
\\r\\n
\\r\\n \\r\\n
[PREVIEW_FILENAME]<\\/div>\\r\\n\\r\\n <\\/div>\\r\\n<\\/div>\\r\\n", "isUserRated":"0", "version":"7.6.30", "wc_post_id":"46", "isCookiesEnabled":"1", "loadLastCommentId":"0", "dataFilterCallbacks":[], "phraseFilters":[], "scrollSize":"32", "url":"https:\/\/restfulapi.net\/wp-admin\/admin-ajax.php", "customAjaxUrl":"https:\/\/restfulapi.net\/wp-content\/plugins\/wpdiscuz\/utils\/ajax\/wpdiscuz-ajax.php", "bubbleUpdateUrl":"https:\/\/restfulapi.net\/wp-json\/wpdiscuz\/v1\/update", "restNonce":"f51642a161", "is_rate_editable":"0", "menu_icon":"https:\/\/restfulapi.net\/wp-content\/plugins\/wpdiscuz\/assets\/img\/plugin-icon\/wpdiscuz-svg.svg", "menu_icon_hover":"https:\/\/restfulapi.net\/wp-content\/plugins\/wpdiscuz\/assets\/img\/plugin-icon\/wpdiscuz-svg_hover.svg", "is_email_field_required":"1" } ``` -------------------------------- ### Initialize UI Interaction for Mouse and Keyboard Source: https://restfulapi.net/http-methods/ This JavaScript snippet adds event listeners to the document body to detect user input methods (mouse or keyboard) and applies a CSS class accordingly. It helps in distinguishing between mouse and keyboard navigation for styling purposes. ```JavaScript !function(){"use strict";if("querySelector"in document&&"addEventListener"in window){var e=document.body;e.addEventListener("pointerdown",(function(){e.classList.add("using-mouse")}),{passive:!0}),e.addEventListener("keydown",(function(){e.classList.remove("using-mouse")}),{passive:!0})}}(); ``` -------------------------------- ### HTTP 403 Forbidden API Response Schema and Example Source: https://context7_llms Defines the schema for a 403 Forbidden response, typically using `ProblemDetails` or `HttpValidationProblemDetails`, and provides an example JSON payload for unauthorized access attempts. ```APIDOC Status: 403 Forbidden Content-Type: application/problem+json Schema: oneOf: - ProblemDetails - HttpValidationProblemDetails type: type: string nullable: true description: A URI reference [RFC3986] that identifies the problem type example: https://example.com/probs/out-of-credit title: type: string nullable: true description: A short, human-readable summary of the problem type example: You do not have enough credit status: type: int32 nullable: true description: The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem example: 403 detail: type: string nullable: true description: A human-readable explanation specific to this occurrence of the problem example: Your current balance is 30, but that costs 50 instance: type: string nullable: true description: A URI reference that identifies the specific occurrence of the problem example: /account/12345/msgs/abc errors: type: object properties: property name*: type: array items: type: string type: type: string nullable: true description: A URI reference [RFC3986] that identifies the problem type example: https://example.com/probs/out-of-credit title: type: string nullable: true description: A short, human-readable summary of the problem type example: You do not have enough credit status: type: int32 nullable: true description: The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem example: 403 detail: type: string nullable: true description: A human-readable explanation specific to this occurrence of the problem example: Your current balance is 30, but that costs 50 instance: type: string nullable: true description: A URI reference that identifies the specific occurrence of the problem example: /account/12345/msgs/abc errors: type: object properties: property name*: type: array items: type: string Example (auto): { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ``` -------------------------------- ### OAuth 2.0 Error Redirection HTTP Example Source: https://tools.ietf.org/html/rfc6749 An example HTTP 302 Found response demonstrating a client redirection after an OAuth 2.0 error, including the error and state parameters in the URI fragment. ```HTTP HTTP/1.1 302 Found Location: https://client.example.com/cb#error=access_denied&state=xyz ``` -------------------------------- ### Initialize Docusaurus Theme from URL or Local Storage Source: https://developers.bigchange.com/docs/rest/api-reference/get-a-note-type This self-executing JavaScript function sets the Docusaurus theme for the site. It first attempts to retrieve the theme from the URL query parameter `docusaurus-theme`, then from `localStorage` under the key 'theme'. If neither is found, it defaults to 'light'. The chosen theme is applied by setting the `data-theme` attribute on the `documentElement`. ```JavaScript !function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}() ``` -------------------------------- ### Example HTTP Redirect for OAuth 2.0 Authorization Error Source: https://tools.ietf.org/html/rfc6749 An example HTTP 302 Found response demonstrating how an authorization server redirects the user-agent to the client's callback URI with error parameters. ```HTTP HTTP/1.1 302 Found Location: https://client.example.com/cb?error=access_denied&state=xyz ``` -------------------------------- ### HTTP 400 Bad Request API Response Schema and Example Source: https://context7_llms Defines the schema for a 400 Bad Request response, typically using `ProblemDetails` or `HttpValidationProblemDetails`, and provides an example JSON payload for common client-side errors. ```APIDOC Status: 400 Bad Request Content-Type: application/problem+json Schema: oneOf: - ProblemDetails - HttpValidationProblemDetails type: type: string nullable: true description: A URI reference [RFC3986] that identifies the problem type example: https://example.com/probs/out-of-credit title: type: string nullable: true description: A short, human-readable summary of the problem type example: You do not have enough credit status: type: int32 nullable: true description: The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem example: 403 detail: type: string nullable: true description: A human-readable explanation specific to this occurrence of the problem example: Your current balance is 30, but that costs 50 instance: type: string nullable: true description: A URI reference that identifies the specific occurrence of the problem example: /account/12345/msgs/abc errors: type: object properties: property name*: type: array items: type: string type: type: string nullable: true description: A URI reference [RFC3986] that identifies the problem type example: https://example.com/probs/out-of-credit title: type: string nullable: true description: A short, human-readable summary of the problem type example: You do not have enough credit status: type: int32 nullable: true description: The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem example: 403 detail: type: string nullable: true description: A human-readable explanation specific to this occurrence of the problem example: Your current balance is 30, but that costs 50 instance: type: string nullable: true description: A URI reference that identifies the specific occurrence of the problem example: /account/12345/msgs/abc errors: type: object properties: property name*: type: array items: type: string Example (auto): { "type": "https://example.com/probs/out-of-credit", "title": "You do not have enough credit", "status": 403, "detail": "Your current balance is 30, but that costs 50", "instance": "/account/12345/msgs/abc" } ```