### Property Manager API - Prerequisites and Setup Source: https://techdocs.akamai.com/property-mgr/reference/api-get-started Before using the Property Manager API, ensure you have the necessary permissions, authentication credentials, and understand account management for bulk operations. Enable the 'Property Manager' API service with READ-WRITE access. ```APIDOC ## Getting Started with Property Manager API ### Description This section outlines the essential steps and prerequisites for utilizing the Property Manager API (PAPI). It covers permission management, authentication credential creation, handling bulk operations, enabling the API service, and gathering necessary data like contracts, groups, and products. ### Prerequisites * **Permissions**: Manage API function permissions in <>. Refer to [the access control model](https://techdocs.akamai.com/iam/docs/about-access-control-model) for details. * **Authentication Credentials**: [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) before using the API. * **Bulk Operations**: For bulk search operations across many accounts, follow the procedure in [Manage many accounts with one API client](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). * **API Service Enablement**: Enable the **Property Manager** API service and set the access level to **READ-WRITE**. * **Prerequisite Data**: Gather the following data used throughout the API: * [Contract](https://techdocs.akamai.com/property-mgr/reference/get-contracts) * [Group](https://techdocs.akamai.com/property-mgr/reference/get-groups) * [Product](https://techdocs.akamai.com/property-mgr/reference/get-products) ### Client Tool Configuration * **Message Body Size**: Client tools like `edgegrid-curl` and `edgegrid-python` default to a 2048-byte message body size. For PAPI, this needs to be increased to 128K. * **edgegrid-curl**: Set `max-body:131072` in the `.egcurl` file. * **edgegrid-python**: Pass `max_body:131072` in the `EdgeGridAuth()` call. ### Additional Information * **Known Issues**: Review the API's [Known issues](https://techdocs.akamai.com/property-mgr/reference/known-issues). * **Authentication**: Code examples in the API reference do not include authentication syntax. See [Authenticate with EdgeGrid](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid) for language-specific authentication guidance. ### Support and Feedback * Provide feedback or ask questions in the [Akamai Developer Discussion Forum](https://discuss.akamai.com/). * Contact your <> account representative for support. ``` -------------------------------- ### SaaS Dynamic Origin Regex Substitution Pattern Example Source: https://techdocs.akamai.com/property-mgr/docs/saas-dynamic-origin Demonstrates a basic Perl Compatible Regular Expression (PCRE) syntax for substituting patterns to identify SaaS dynamic origins. This example shows how to capture a lowercase string and replace it with a customer ID prefix. ```regex s/([a-z]+)/cust-ID/ ``` -------------------------------- ### Criteria Configuration Example Source: https://techdocs.akamai.com/property-mgr/reference/criteria This example demonstrates how to configure a rule with a 'contentType' criteria to apply the 'gzipResponse' behavior to specific text-based content types. ```APIDOC ## POST /config/set-property ### Description This endpoint allows for the configuration of property rules, including the definition of criteria to conditionally apply behaviors. The example below shows how to set up a rule that compresses text content. ### Method POST ### Endpoint /config/set-property ### Request Body - **rules** (object) - Required - The main object containing all rule configurations. - **name** (string) - Required - The name of the rule set. - **options** (object) - Optional - Rule set options. - **behaviors** (array) - Optional - An array of behaviors to apply at the rule set level. - **children** (array) - Required - An array of nested rule objects. - **name** (string) - Required - The name of the child rule. - **criteria** (array) - Optional - An array of criteria objects that determine when the child rule's behaviors execute. - **name** (string) - Required - The name of the criteria (e.g., 'contentType', 'random'). - **options** (object) - Required - Options specific to the criteria type. - **matchOperator** (string) - Optional - Operator for matching values (e.g., 'IS_ONE_OF', 'IS_NOT_ONE_OF'). - **matchWildcard** (boolean) - Optional - Enables wildcard matching ('*', '?'). - **matchCaseSensitive** (boolean) - Optional - Specifies if matching is case-sensitive. - **values** (array) - Optional - An array of strings to match against for criteria like 'contentType'. - **bucket** (integer) - Optional - For 'random' criteria, the percentage (0-100) of requests to match. - **criteriaMustSatisfy** (string) - Optional - Specifies if 'any' or 'all' criteria must be met. - **behaviors** (array) - Required - An array of behaviors to apply if the criteria are met. - **name** (string) - Required - The name of the behavior (e.g., 'gzipResponse'). - **options** (object) - Required - Options specific to the behavior type. ### Request Example ```json { "rules": { "name": "default", "options": { "is_secure": false }, "behaviors": [ { "name": "origin", "options": { "originType": "CUSTOMER", "hostname": "example.com", "forwardHostHeader": "REQUEST_HOST_HEADER", "cacheKeyHostname": "ORIGIN_HOSTNAME", "compress": true, "tcipEnabled": false, "httpPort": 80 } }, { "name": "cpCode", "options": { "value": { "id": 12345, "name": "main site" } } } ], "children": [ { "name": "Compress Text Content", "criteria": [ { "name": "contentType", "options": { "matchOperator": "IS_ONE_OF", "matchWildcard": true, "matchCaseSensitive": false, "values": [ "text/html*", "text/css*", "application/x-javascript*" ] } } ], "behaviors": [ { "name": "gzipResponse", "options": { "behavior": "ALWAYS" } } ] } ] } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success status of the operation. - **propertyName** (string) - The name of the property that was configured. - **version** (integer) - The new version number of the property. #### Response Example ```json { "status": "success", "propertyName": "example.com", "version": 5 } ``` ``` -------------------------------- ### Property Version Response Example (JSON) Source: https://techdocs.akamai.com/property-mgr/reference/put-include-version-rules An example JSON response for a property version, including account ID, contract ID, group ID, include details, and the rule structure with behaviors. ```json { "accountId": "act_A-CCT3456", "contractId": "ctr_C-0N7RAC7", "etag": "a9dfe78cf93090516bde891d009eaf57", "groupId": "grp_12345", "includeId": "inc_173136", "includeName": "my.new.include.com", "includeType": "MICROSERVICES", "includeVersion": 3, "ruleFormat": "v2022-10-18", "rules": { "options": { "is_secure": false }, "behaviors": [ { "options": { "cacheKeyHostname": "ORIGIN_HOSTNAME", "compress": true, "enableTrueClientIp": false, "forwardHostHeader": "REQUEST_HOST_HEADER", "hostname": "origin.com", "httpPort": 80, "originType": "CUSTOMER" }, "name": "origin" } ] } } ``` -------------------------------- ### Request Schema Interface Example (GET) Source: https://techdocs.akamai.com/property-mgr/reference/api-errors This example demonstrates how to use the Request schema interface to retrieve schema objects that describe expected data structures for API operations. It shows a GET request to fetch the schema for creating a new edge hostname, which helps in understanding and validating request data. ```http GET /papi/v1/schemas/request/EdgeHostnamesPostRequestV0.json ``` -------------------------------- ### Example Property Rules Configuration (JSON) Source: https://techdocs.akamai.com/property-mgr/reference/put-include-version-rules This JSON object demonstrates a typical configuration for property rules, including origin settings, CP code assignment, and other behavior options. It serves as an example for setting property versions via the API. ```json { "rules": { "options": { "is_secure": false }, "behaviors": [ { "options": { "cacheKeyHostname": "ORIGIN_HOSTNAME", "compress": true, "enableTrueClientIp": false, "forwardHostHeader": "REQUEST_HOST_HEADER", "hostname": "origin.test.com", "httpPort": 80, "originType": "CUSTOMER" }, "name": "origin" }, { "options": { "value": { "id": 12345, "name": "my CP code" } }, "name": "cpCode" } ], "children": [], "criteria": [], "name": "default" } } ``` -------------------------------- ### Configure Scheduled Invalidation (JSON Example) Source: https://techdocs.akamai.com/property-mgr/reference/latest-schedule-invalidation Example of how to configure the scheduleInvalidation behavior using JSON. This demonstrates setting the start time, enabling repeat invalidations, specifying the repeat interval, and choosing the refresh method. ```json { "name": "scheduleInvalidation", "options": { "start": "2024-12-31T23:59:59Z", "repeat": true, "repeatInterval": "86400", "refreshMethod": "PURGE" } } ``` -------------------------------- ### Set Up Rule for Custom Site Source: https://techdocs.akamai.com/property-mgr/reference/validation-best-practices This section provides an example of how to set up a rule for a custom site, assigning a specific CP code. ```APIDOC ## Use Case: Set Up a Rule for Your Custom Site ### Description Adds a rule to a property to match a custom hostname and assign a specific CP code for traffic reporting and billing. ### Method PUT ### Endpoint `/websites/techdocs_akamai_property-mgr/api/versions/1.0/properties/{propertyId}/rules` ### Request Body #### Request Body - **name** (string) - Required - The name of the rule. - **criteria** (array) - Required - A list of criteria for the rule. - **name** (string) - Required - The type of criteria (e.g., `hostname`). - **options** (object) - Required - Options for the criteria. - **matchOperator** (string) - Required - The matching operator (e.g., `IS_ONE_OF`). - **values** (array) - Required - A list of values to match. - **behaviors** (array) - Required - A list of behaviors to apply when the criteria match. - **name** (string) - Required - The name of the behavior (e.g., `cpCode`). - **options** (object) - Required - Options for the behavior. - **value** (object) - Required - The CP code details. - **id** (integer) - Required - The CP code ID. - **name** (string) - Required - The CP code name. ### Request Example ```json { "name": "Custom Site", "criteria": [ { "name": "hostname", "options": { "matchOperator": "IS_ONE_OF", "values": [ "custom.example.com" ] } } ], "behaviors": [ { "name": "cpCode", "options": { "value": { "id": 54321, "name": "custom site" } } } ] } ``` ### Response #### Success Response (200) Indicates the rule was successfully added or updated. #### Response Example ```json { "message": "Rule updated successfully." } ``` ``` -------------------------------- ### Get Domain Validation Challenges (JSON Example) Source: https://techdocs.akamai.com/property-mgr/reference/add-hn-with-default-cert-advanced-methods-saas This snippet shows an example of the 'authorization' object returned when requesting domain validation challenges. It includes the status, expiration, and the 'http01' object containing the URL and body for manual HTTP validation. This is useful for understanding the data structure provided by the API. ```json { "status": "ATTEMPTING_VALIDATION", "validUntil": "2024-07-25T16:17:37Z", "http01": { "url": "http://www.example.com/.well-known/acme-challenge/UMb99-08TaSYHSi2isWraUeTA7g8MYHgN4Oqsrf5j78", "body": "UMb99-08TaSYHSi2isWraUeTA7g8MYHgN4OMJg80sy8.V9Ciog4m_UaWKzrrmmphysbein7h_WNKIbsjuHsuJsyO", "result": { "src": "CPS", "message": "Validation tokens mismatch for www.example.com", "timestamp": "2024-07-25T16:17:37Z" } }, “dns01”: {...} } ``` -------------------------------- ### Hostname Activations Example Data Source: https://techdocs.akamai.com/property-mgr/reference/get-property-hostname-activations This JSON object represents an example response for hostname activations. It includes account and contract details, along with a list of hostname activations, each with its own properties like activation type, network, and status. It also contains pagination information. ```json { "example": { "accountId": "act_A-CCT5678", "contractId": "ctr_K-0N7RAK71", "currentItemCount": 2, "groupId": "grp_54321", "hostnameActivations": { "items": [ { "activationType": "ACTIVATE", "hostnameActivationId": "atv_1696985", "network": "STAGING", "note": "Sample activation", "notifyEmails": [ "you@example.com", "them@example.com" ], "propertyId": "prp_173136", "propertyName": "example.com", "propertyVersion": 1, "status": "ACTIVE", "submitDate": "2014-03-05T02:22:12Z", "updateDate": "2014-03-04T21:12:57Z" }, { "activationType": "ACTIVATE", "hostnameActivationId": "atv_1696986", "network": "PRODUCTION", "note": "Sample activation", "notifyEmails": [ "you@example.com", "them@example.com" ], "propertyId": "prp_173136", "propertyName": "example.com", "propertyVersion": 1, "status": "PENDING", "submitDate": "2014-03-02T02:22:12Z", "updateDate": "2014-03-01T21:12:57Z" } ] }, "nextLink": "/papi/v1/properties/prp_173136/hostnames-activation?offset=2&groupId=grp_15225&contractId=ctr_K-0N7RAK7&limit=2", "totalItems": 4 } } ``` -------------------------------- ### Hostname Certificate DV Proceed Response Example Source: https://techdocs.akamai.com/property-mgr/reference/post-property-hostnames-certificate-proceed This example demonstrates the JSON structure of a successful response from the hostname certificate DV proceed endpoint. It lists domains that were paused and the reasons for the pause, which are crucial for troubleshooting. ```json { "domains": [ { "domain": "example.com", "reason": "NOT_ACTIVE" }, { "domain": "www.example.com", "reason": "DOMAIN_NOT_FOUND" }, { "domain": "www.example.com", "reason": "PROCEED_NOT_ALLOWED" } ] } ``` -------------------------------- ### Example of supportedHttpMethods Option Source: https://techdocs.akamai.com/property-mgr/reference/deprecated-early-data-advanced This example shows the JSON configuration for the 'supportedHttpMethods' option, which allows specifying an array of HTTP methods for early data processing. Supported methods include GET, PUT, POST, DELETE, HEAD, and OPTIONS. ```json { "displayType": "string array", "options": ["GET", "HEAD", "OPTIONS", "POST", "PUT", "DELETE"], "tag": "select" } ``` -------------------------------- ### Successful Property Version Creation Response Source: https://techdocs.akamai.com/property-mgr/reference/post-property-versions This example shows the response received upon successfully creating a new property version. It provides a `versionLink` which is a hypermedia link to the newly created resource, allowing for further operations. ```json { "versionLink": "/papi/v0/properties/prp_173136/versions/2?contractId=ctr_C-0N7RAC71&groupId=grp_15225" } ``` -------------------------------- ### Get Available Behaviors - OpenAPI Specification Source: https://techdocs.akamai.com/property-mgr/reference/get-available-behaviors This OpenAPI definition describes the GET operation for retrieving available behaviors within a property version. It specifies request parameters like `PAPI-Use-Prefixes`, `contractId`, `groupId`, and `accountSwitchKey`, and provides an example JSON response containing behavior details, contract ID, group ID, product ID, and rule format. ```json { "externalDocs": { "description": "See documentation for Akamai's Property Manager API", "url": "https://techdocs.akamai.com/property-mgr/reference" }, "info": { "license": { "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title": "Properties", "version": "v0" }, "openapi": "3.1.0", "paths": { "/properties/{propertyId}/versions/{propertyVersion}/available-behaviors": { "get": { "description": "Lists the set of [behaviors](https://techdocs.akamai.com/property-mgr/reference/ga-behaviors) you may apply within a property version's rules. The available set depends on the product under which you created the property and any additional modules enabled under your account.", "externalDocs": { "description": "See documentation for this operation in Akamai's Property Manager API", "url": "https://techdocs.akamai.com/property-mgr/reference/get-available-behaviors" }, "operationId": "get-available-behaviors", "parameters": [ { "description": "__Enum__ Sets whether to represent [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) in response data. Set to `false` when exchanging PAPI data with other APIs.", "in": "header", "name": "PAPI-Use-Prefixes", "required": true, "schema": { "enum": [ "true", "false" ], "example": "false", "type": "string" }, "x-akamai": { "file-path": "parameters/papi-use-prefixes-header.yaml" } }, { "description": "Unique identifier for the contract. The parameter is optional if a property belongs to only one contract. Otherwise you need to specify it along with the `groupId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `ctr_` prefix.", "in": "query", "name": "contractId", "required": false, "schema": { "example": "ctr_K-0N7RAK71", "type": "string" }, "x-akamai": { "file-path": "parameters/contract-id-optional.yaml" } }, { "description": "Unique identifier for the group. The parameter is optional if a property belongs to only one group. Otherwise you need to specify it along with the `contractId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `grp_` prefix.", "in": "query", "name": "groupId", "required": false, "schema": { "example": "grp_54321", "type": "string" }, "x-akamai": { "file-path": "parameters/group-id-optional.yaml" } }, { "description": "For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).", "in": "query", "name": "accountSwitchKey", "required": false, "schema": { "example": "1-5C0YLB:1-8BYUX", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "behaviors": { "items": [ { "name": "cpCode", "schemaLink": "/papi/v0/schemas/products/prd_Alta/latest#/definitions/catalog/behaviors/cpCode" }, { "name": "origin", "schemaLink": "/papi/v0/schemas/products/prd_Alta/latest#/definitions/catalog/behaviors/origin" } ] }, "contractId": "ctr_C-0N7RAC71", "groupId": "grp_12345", "productId": "prd_Alta", "ruleFormat": "v2022-10-18" }, "schema": { "$schema": "http://json-schema.org/draft-04/schema#", "additionalProperties": false, "properties": { "behaviors": { "properties": { "items": { "items": { "properties": { "name": { "type": "string" }, "schemaLink": { "type": "string" } }, "type": "object" }, "type": "array" } }, "type": "object" }, "contractId": { "type": "string" }, "groupId": { "type": "string" }, "productId": { "type": "string" }, "ruleFormat": { "type": "string" } }, "type": "object" } } } } } } } } } ``` -------------------------------- ### Bulk Activation Request Example (JSON) Source: https://techdocs.akamai.com/property-mgr/reference/post-bulk-activations This JSON object represents a request to activate multiple property versions in bulk. It includes an array of property activation details and default settings applicable to all activations in the batch. ```json { "activatePropertyVersions": [ { "network": "STAGING", "note": "Some activation note", "propertyId": "prp_1", "propertyVersion": 2 }, { "network": "STAGING", "note": "Sample activation", "notifyEmails": [ "someoneElse@somewhere.com" ], "propertyId": "prp_15", "propertyVersion": 3 }, { "acknowledgeAllWarnings": false, "acknowledgeWarnings": [ "msg_123", "msg_234" ], "network": "PRODUCTION", "note": "created by xyz", "propertyId": "prp_3", "propertyVersion": 11 } ], "defaultActivationSettings": { "acknowledgeAllWarnings": true, "fastPush": true, "notifyEmails": [ "you@example.com", "them@example.com" ], "useFastFallback": false } } ``` -------------------------------- ### Property Manager API - Onboarding Workflow Source: https://techdocs.akamai.com/property-mgr/reference/add-hn-with-default-cert-advanced-methods-multi-cdn This section details the workflow for onboarding a property using the Property Manager API (PAPI). It covers steps from DNS configuration and obtaining necessary identifiers to creating a property and setting optional variables. ```APIDOC ## Property Manager API - Onboarding Workflow ### Description This workflow guides you through the process of creating a property with a Default Domain Validated (DV) certificate using the Property Manager API (PAPI). It includes steps for DNS setup, retrieving contract and group information, creating CP codes, and finally, creating the property itself. Optional steps for setting property variables are also covered. ### Steps 1. **Add the origin layer to your DNS** * Get the IP address of your existing origin. * Create an `A` record in your DNS pointing to the origin IP. 2. **Get contracts, groups, and products** * These identifiers are crucial for specifying the modules and features available within your property. * **List contracts:** [https://techdocs.akamai.com/v1.0/recipes/list-contracts](https://techdocs.akamai.com/v1.0/recipes/list-contracts) * **List groups:** [https://techdocs.akamai.com/v1.0/recipes/list-groups-1](https://techdocs.akamai.com/v1.0/recipes/list-groups-1) * **List products:** [https://techdocs.akamai.com/v1.0/recipes/list-products](https://techdocs.akamai.com/v1.0/recipes/list-products) 3. **Create a CP code** * CP codes are used to track web traffic handled by edge servers and are necessary for billing and reporting. * **Create a new CP code:** [https://techdocs.akamai.com/v1.0/recipes/create-a-new-cp-code](https://techdocs.akamai.com/v1.0/recipes/create-a-new-cp-code) 4. **Create a property** * A property acts as a container for your product configuration, controlling content delivery. * **Create a new property:** [https://techdocs.akamai.com/v1.0/recipes/create-a-new-property](https://techdocs.akamai.com/v1.0/recipes/create-a-new-property) 5. **Set variables for your property (optional)** * Define system variables or create your own for values used repeatedly within the property's rule tree. * **Built-in system variables:** [https://techdocs.akamai.com/property-mgr/docs/built-vars](https://techdocs.akamai.com/property-mgr/docs/built-vars) * **Declare a variable:** [https://techdocs.akamai.com/property-mgr/reference/declare-a-variable](https://techdocs.akamai.com/property-mgr/reference/declare-a-variable) ### Prerequisites * **Security Level Determination:** Understand whether Enhanced or Standard TLS security is required. Refer to [Understand the levels of security](https://techdocs.akamai.com/property-mgr/docs/prepare-your-edge-certificates#understand-the-levels-of-security). * **PAPI Authentication:** Set up authentication credentials using tokens generated in your API client tool. See [Set up authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials). * **Manual DNS Validation Access:** If using Manual DNS validation, ensure you have write access to your primary DNS servers. * **Domain Ownership Verification:** If your account requires mandatory domain validation, prove ownership of domains by pre-validating them or using challenges during hostname addition/update. Refer to [Prove domain ownership](https://techdocs.akamai.com/property-mgr/reference/prove-domain-ownership), [Add property version hostnames](https://techdocs.akamai.com/property-mgr/reference/patch-property-version-hostnames), or [Update property version hostnames](https://techdocs.akamai.com/property-mgr/reference/put-property-version-hostnames). ``` -------------------------------- ### Get DNS Validation Challenge - JSON Source: https://techdocs.akamai.com/property-mgr/reference/add-hn-with-default-cert-advanced-methods-multi-cdn Retrieves the DNS validation challenge details, specifically the value for a TXT record, required for manual DNS-based domain validation. This method is recommended for wildcard hostnames or multi-CDN setups. ```json { "status": "ATTEMPTING_VALIDATION", "validUntil": "2024-07-25T16:17:37Z", "http01": {...}, "dns01": { "value": "unique-value-for-DNS-TXT-record", "result": { "src": "CPS", "message": "", "timestamp": "2024-07-25T16:17:37Z" } } ``` -------------------------------- ### 405 Method Not Allowed Source: https://techdocs.akamai.com/property-mgr/reference/405 This error occurs when an unsupported HTTP method is used for a specific resource. For example, attempting to use PUT or DELETE on a URL that only supports GET requests. ```APIDOC ## 405 Method Not Allowed ### Description This error typically occurs when the URL you are calling responds to certain HTTP methods (e.g., GET) but not the one you are attempting to use (e.g., PUT or DELETE). ### Method Any method not supported by the resource (e.g., PUT, DELETE, POST). ### Endpoint Any valid Akamai Property Manager API endpoint. ### Response #### Error Response (405) - **type** (string) - A URI that identifies the error type. - **title** (string) - A short, human-readable summary of the problem. - **detail** (string) - A more specific explanation of the problem. - **instance** (string) - A URI that identifies the specific occurrence of the problem. - **status** (integer) - The HTTP status code. ### Response Example ```json { "type": "https://problems.luna.akamaiapis.net/papi/v1/http/method-not-allowed", "title": "Method not allowed", "detail": "The system does not support the method you provided for this resource.", "instance": "/papi/v1/properties?contractId=1-12345&groupId=12345#abc12345abcc02a7", "status": 405 } ``` ``` -------------------------------- ### Configure EdgeGrid Client for Max Body Size Source: https://techdocs.akamai.com/property-mgr/reference/api-get-started Adjusts the maximum message body size for Akamai's EdgeGrid client tools to accommodate PAPI's requirements. This is crucial for operations involving larger data payloads. The configuration method varies depending on the specific tool used. ```bash # For edgegrid-curl, set max-body in the .egcurl file max-body:131072 ``` ```python # For edgegrid-python, pass max_body during EdgeGridAuth initialization from akamai.edgegrid import EdgeGridAuth auth = EdgeGridAuth( client_token='YOUR_CLIENT_TOKEN', client_secret='YOUR_CLIENT_SECRET', access_token='YOUR_ACCESS_TOKEN', max_body=131072 # Set max body size to 128K ) ``` -------------------------------- ### List Include Activations (OpenAPI) Source: https://techdocs.akamai.com/property-mgr/reference/get-include-activations This OpenAPI definition snippet describes the GET operation for retrieving all activations for a given include ID across production and staging networks. It specifies required and optional parameters like `PAPI-Use-Prefixes`, `contractId`, `groupId`, and `accountSwitchKey`, and provides an example JSON response structure. ```json { "paths": { "/includes/{includeId}/activations": { "get": { "description": "__Limited availability__ This lists all activations for all versions of an include, on both production and staging networks.", "externalDocs": { "description": "See documentation for this operation in Akamai's Property Manager API", "url": "https://techdocs.akamai.com/property-mgr/reference/get-include-activations" }, "operationId": "get-include-activations", "parameters": [ { "description": "__Enum__ Sets whether to represent [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) in response data. Set to `false` when exchanging PAPI data with other APIs.", "in": "header", "name": "PAPI-Use-Prefixes", "required": true, "schema": { "enum": [ "true", "false" ], "example": "false", "type": "string" }, "x-akamai": { "file-path": "parameters/papi-use-prefixes-header.yaml" } }, { "description": "Unique identifier for the contract. The parameter is optional if a property belongs to only one contract. Otherwise you need to specify it along with the `groupId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `ctr_` prefix.", "in": "query", "name": "contractId", "required": false, "schema": { "example": "ctr_K-0N7RAK71", "type": "string" }, "x-akamai": { "file-path": "parameters/contract-id-optional.yaml" } }, { "description": "Unique identifier for the group. The parameter is optional if a property belongs to only one group. Otherwise you need to specify it along with the `contractId`. In other operations that don't specify a `propertyId` URL parameter, this parameter is always required. See [ID prefixes](https://techdocs.akamai.com/property-mgr/reference/id-prefixes) for details on omitting the value's `grp_` prefix.", "in": "query", "name": "groupId", "required": false, "schema": { "example": "grp_54321", "type": "string" }, "x-akamai": { "file-path": "parameters/group-id-optional.yaml" } }, { "description": "For customers who manage more than one account, this [runs the operation from another account](https://techdocs.akamai.com/developer/docs/manage-many-accounts-with-one-api-client). The Identity and Access Management API provides a [list of available account switch keys](https://techdocs.akamai.com/iam-api/reference/get-client-account-switch-keys).", "in": "query", "name": "accountSwitchKey", "required": false, "schema": { "example": "1-5C0YLB:1-8BYUX", "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "example": { "accountId": "act_A-CCT1234", "activations": { "items": [ { "activationType": "ACTIVATE", "fmaActivationState": "received", "includeActivationId": "5e597860-1107-461e-8dbe-4e7526e8dd02", "includeId": "inc_173036", "includeName": "example.inc.com", "includeVersion": 1, "network": "STAGING", "note": "Sample activation", "notifyEmails": [ "you@example.com", "them@example.com" ], "status": "PENDING", "submitDate": "2022-03-02T02:22:12Z", "updateDate": "2022-03-01T21:12:57Z" } ] }, "contractId": "ctr_C-0N7RAC7", "groupId": "grp_12345" }, "schema": { "$ref": "#/components/schemas/IncludeActivationsResponse" } } } } } } } } } ``` -------------------------------- ### DNS Resolution Example (Shell) Source: https://techdocs.akamai.com/property-mgr/reference/modify-property-hostnames This shell command demonstrates how DNS resolution works after a hostname has been assigned and activated. It shows the CNAME records mapping the custom domain to an Akamai edge hostname, and then to an Akamai IP address, illustrating the traffic flow. ```shell $ host -v custom.example.com Trying "custom.example.com" ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14682 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;custom.example.com. IN A ;; ANSWER SECTION: custom.example.com. 300 IN CNAME custom.example.com.edgekey.net. custom.example.com.edgekey.net. 3701 IN CNAME e79.x.akamaiedge.net. e79.x.akamaiedge.net. 11 IN A 72.246.8.105 ``` -------------------------------- ### 429 Too Many Requests Error Example Source: https://techdocs.akamai.com/property-mgr/reference/get-contracts Provides an example of the error response for a 429 Too Many Requests status code, typically indicating rate limiting. This example shows details for exceeding the include limit per contract. ```json { "detail": "Too many includes exist on contract ctr_1-12345. You must delete an include before continuing.", "instance": "/papi/v1/includes?contractId=ctr_K-0N7RAK7&groupId=grp_12345#abc12345abcc02a7", "instanceKey": "1-12345", "limit": 500, "limitKey": "INCLUDES_PER_CONTRACT", "remaining": 0, "status": 429, "title": "Too many includes", "type": "https://problems.luna.akamaiapis.net/papi/v1/limit-exceeded" } ``` -------------------------------- ### 429 Too Many Requests Error Example Source: https://techdocs.akamai.com/property-mgr/reference/get-custom-behavior Provides an example of a 429 Too Many Requests error response, adhering to the Problem Details format. This specific example illustrates a rate limiting scenario related to the number of includes per contract. ```json { "type": "https://problems.luna.akamaiapis.net/papi/v1/limit-exceeded", "title": "Too many includes", "status": 429, "detail": "Too many includes exist on contract ctr_1-12345. You must delete an include before continuing.", "instance": "/papi/v1/includes?contractId=ctr_K-0N7RAK7&groupId=grp_12345#abc12345abcc02a7", "instanceKey": "1-12345", "limit": 500, "limitKey": "INCLUDES_PER_CONTRACT", "remaining": 0 } ``` -------------------------------- ### Example User-Agent String for Samsung Device Source: https://techdocs.akamai.com/property-mgr/docs/device-characterization-forward-in-header This example demonstrates a typical user-agent string for a Samsung Galaxy S3 device. Unlike Apple devices, this string includes specific model information, which can be used for more granular device identification. ```text Samsung Galaxy S3: Mozilla/5.0 (Linux; U; Android 4.1.1; en-us; SGH-T999 Build/JRO03L) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30 ``` -------------------------------- ### Test Activated Hostname with Curl Source: https://techdocs.akamai.com/property-mgr/reference/add-hostnames-to-the-hostname-bucket This snippet demonstrates how to test an activated hostname using the curl command. It includes resolving the hostname to a specific IP address for testing purposes. Ensure you replace `www.example.com` with your actual hostname and `1.2.3.4` with the correct IP address. ```bash $ curl -v https://www.example.com/ --resolve "www.example.com:443:1.2.3.4" ``` -------------------------------- ### Chaining setVariable Behaviors for Variable Modification Source: https://techdocs.akamai.com/property-mgr/reference/modify-a-variable This example demonstrates chaining two `setVariable` behaviors to modify a user variable. The first behavior extracts the 'Accept-Language' header, applies a `SUBSTRING` transform to get the first two letters, and assigns it to `PMUSER_LANG`. The second behavior takes the existing `PMUSER_LANG` value, reassigns it, and applies an `UPPER` transform to convert it to uppercase. This showcases how to perform sequential transformations. ```json { "name": "setVariable", "options": { "variableName": "PMUSER_LANG", "valueSource": "EXTRACT", "extractLocation": "CLIENT_REQUEST_HEADER", "headerName": "Accept-Language", "transform": "SUBSTRING", "startIndex": "1", "endIndex": "2" } }, { "name": "setVariable", "options": { "variableName": "PMUSER_LANG", "valueSource": "EXPRESSION", "variableValue": "{{user.PMUSER_LANG}}", "transform": "UPPER" } } ``` -------------------------------- ### 401 Unauthorized Error Example Source: https://techdocs.akamai.com/property-mgr/reference/get-property-hostname-activation Example of a 401 Unauthorized error response, indicating that authentication credentials are required and have failed or have not been provided. ```APIDOC ## GET /papi/v1/properties (Example 401 Error) ### Description This example shows a 401 Unauthorized error response, typically occurring when authentication is missing or invalid. ### Method GET ### Endpoint /papi/v1/properties ### Query Parameters - **contractId** (string) - Required - The contract ID to filter properties. - **groupId** (integer) - Required - The group ID to filter properties. ### Response #### Error Response (401) - **detail** (string) - Diagnostic instructions to locate and fix the problem. - **instance** (string) - Unique value generated with each API call. - **status** (integer) - The HTTP status code (401). - **title** (string) - A summary of the error case. - **type** (string) - Identifies the error case, often a URI. #### Response Example ```json { "detail": "The request requires authentication.", "instance": "/papi/v1/properties?contractId=ctr_C-0N7RAC71&groupId=grp_12345#abc12345abcc02a7", "status": 401, "title": "Unauthorized", "type": "https://problems.luna.akamai.com/papi/v0/http/unauthorized" } ``` ``` -------------------------------- ### Property Configuration Parameters Source: https://techdocs.akamai.com/property-mgr/reference/deprecated-tiered-distribution-customization This section details the parameters available for configuring website properties, including location for Cloud Wrapper migration and timing for map migration. ```APIDOC ## Property Configuration Parameters ### Description This section details the parameters available for configuring website properties, including location for Cloud Wrapper migration and timing for map migration. ### Parameters #### Request Body Parameters - **location** (string) - Optional - Location from which Cloud Wrapper migration is performed. User should choose the existing Cloud Wrapper location. The new Cloud Wrapper location (to which migration has to happen) is expected to be updated as part of the main "Cloud Wrapper" behavior. This parameter is visible only if `migrationWithinCwMapsEnabled` is true. - **migrationStartDate** (string (epoch timestamp)) - Optional - Specifies when to start migrating the map. This parameter is visible only if `mapMigrationEnabled` is true. - **migrationEndDate** (string (epoch timestamp)) - Optional - Specifies when the map migration should end. This parameter is visible only if `mapMigrationEnabled` is true. ### Request Example ```json { "location": "existing-cloud-wrapper-location", "migrationStartDate": "1678886400", "migrationEndDate": "1679886400" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success or failure of the operation. - **message** (string) - Provides details about the operation's outcome. #### Response Example ```json { "status": "success", "message": "Property configuration updated successfully." } ``` ```