> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Script for Application

Use this API to retrieve script details for the specified application.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Cookie Consent",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Cookie Consent APIs are used to integrate external systems and streamline the flow of data with Cookie Consent in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Scripts",
      "description": "The Scripts APIs are used to manage publishing of scripts to websites.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
      }
    }
  ],
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "paths": {
    "/api/cmp/v1/applications/{id}/script-details": {
      "get": {
        "operationId": "getAppScriptDetails",
        "summary": "Get Script for Application",
        "description": "Use this API to retrieve script details for the specified application.",
        "tags": [
          "Scripts"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "ID of the Application to retrieve a script of",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationScriptDetailsPublicDto"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "OAUTH2": [
              "COOKIE",
              "COOKIE_READ"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApplicationScriptDetailsPublicDto": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Unique identifier of this Application.",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "name": {
            "description": "The name of this mobile Application.",
            "type": "string",
            "example": "CashPro Mobile-iOS",
            "maxLength": 255,
            "minLength": 1
          },
          "version": {
            "description": "The version of the script",
            "type": "string",
            "example": "202212.1.0",
            "maxLength": 50,
            "minLength": 1
          },
          "geoRuleId": {
            "description": "Unique identifier of the geo rule.",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "geoRuleName": {
            "description": "Name of the geo rule.",
            "type": "string",
            "example": "Europe Rule",
            "maxLength": 255,
            "minLength": 1
          },
          "platform": {
            "description": "The platform of this Application.",
            "type": "string",
            "example": "IOS",
            "enum": [
              "IOS",
              "ANDROID",
              "APPLETV",
              "ANDROIDTV",
              "FIRETV",
              "ROKU",
              "SAMSUNGTV",
              "LGTV",
              "VIZIOTV",
              "HBBTV",
              "PANASONICTV",
              "PS5",
              "YOUVIEW"
            ]
          },
          "lastPublishedStatus": {
            "description": "The status of the SDK publication",
            "type": "string",
            "example": "PUBLISHED",
            "enum": [
              "DRAFT",
              "PUBLISHED",
              "PUBLISHING",
              "FAILED",
              "WAITING"
            ]
          },
          "lastPublishedDate": {
            "description": "Last date publish date (timezone UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-01-15T14:30:45"
          },
          "lastPublishedVersion": {
            "description": "Version of the latest publish",
            "type": "string",
            "example": "202212.1.0",
            "maxLength": 50,
            "minLength": 1
          },
          "lastPublishedBy": {
            "description": "User who triggered the latest publish",
            "type": "string",
            "example": "Adithya H.",
            "maxLength": 255,
            "minLength": 1
          },
          "solution": {
            "description": "The type of the SDK published within the application.",
            "type": "string",
            "example": "ONETRUST_SDK",
            "enum": [
              "API",
              "ONETRUST_SDK"
            ]
          },
          "publishedVersions": {
            "description": "The published version of this script.",
            "type": "array",
            "items": {
              "type": "string"
            },
            "example": [
              "202602.1.0",
              "202212.1.1"
            ],
            "uniqueItems": true
          }
        }
      }
    },
    "securitySchemes": {
      "OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "COOKIE": "Cookie Scope gives the user access to read/write operations inside the Cookie Consent module.",
              "COOKIE_READ": "Cookie Read Scope gives the user read-only access to the Cookie Consent module."
            }
          }
        }
      }
    }
  }
}
```