API Proxy'lere politika ekleme, silme, güncelleme, listeleme işlemleri için kullanılan servislerdir.


1. Get all existing policies of specified API Proxy

Açıklama/Amaç: Parametre olarak ismi gönderilen API Proxy'de yer alan politikalar listelenir.

Yetkilendirme: Servislere erişim için erişmek isteyen kullanıcının proje içerisinde "

Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/

HTTP Method: GET

Request Headers: 

HeaderValue
Authorization

<ACCESS_TOKEN>

Bu uç noktaya erişim için Token alınması gereklidir.

Nasıl token alınacağı ile ilgili detaylı bilgi için Yetkilendirme API'si sayfasını ziyaret edebilirsiniz.

Acceptapplication/json


Request Path Parameters:

Parameter

Value

projectNameSorgulanmak istenen API Proxy'nin bulunduğu projenin tam adı
apiProxyNameSorgulanmak istenen API Proxy'nin tam adı


Request Body: (none)

Response:

StatusStatus CodeDescriptionBody
Başarılı200

successful operation

{
    "status": "SUCCESS",
    "resultList": [
        {
            "name": "Address",
            "type": "SOAP",
            "relativePath": "/address",
            "soapToRest": false,
            "requestPolicyList": [
                {
                    "type": "policy-throttling",
                    "active": true
                } 
            ],

            "responsePolicyList": [
                {
                    "type": "policy-api-call",
                    "active": true
                } 
            ],
            "errorPolicyList": [
                {
                    "type": "policy-script",
                    "active": true
                },
                {
                    "type": "policy-script",
                    "description": "sample description",
                    "active": true
                }
            ],
            "endpointList": [
                {
                    "endpoint": "/UpdateAddress",
                    "active": true,
                    "httpMethod": "POST",

                  "requestPolicyList": [
                  {
                    "type": "policy-script",
                    "active": true
                  } 
                ],
                }
            ]
        }
    ],
    "resultCount": 1
}

Hatalı400bad request{
    "error""...",
    "error_description""..."
}
Hatalı401not authorized for this operation

{
    "error""unauthorized_client",
    "error_description""..."
}

Hatalı500internal error{
    "error""...",
    "error_description""..."
}


2. Add a policy to specified API Proxy

Açıklama/Amaç: Belirtilen API Proxy'e yeni bir politika eklenmesini sağlar.

Yetkilendirme: Servislere erişim için erişmek isteyen kullanıcının proje içerisinde "Manage Proxies" ve "Deploy/Undeploy Proxies" yetkisine sahip olan bir rolünün olması gereklidir. 

Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/

HTTP Method: POST

Request Headers: 

HeaderValue
Authorization

<ACCESS_TOKEN>

Bu uç noktaya erişim için Token alınması gereklidir.

Nasıl token alınacağı ile ilgili detaylı bilgi için Yetkilendirme API'si sayfasını ziyaret edebilirsiniz.

Acceptapplication/json
Content-Typeapplication/json


Request Path Parameters:

Parameter

Value

projectNamePolitika eklenecek API Proxy'nin bulunduğu projenin tam adı
apiProxyNamePolitika eklenecek API Proxy'nin tam adı
policyNameEklenecek politikanın tam adı


Request Body:

{
  "operationMetadata": {
    "targetScope": "ALL",
    "targetPipeline": "REQUEST",
    "deploy": "true",
    "deployTargetEnvironmentNameList": [
      "test"
    ],
    "order": "3"
  },
  "policy": {
    "type": "policy-time-restriction",
    "description": "This policy ensures that access to the API is only available on Mondays.",
    "active": "true",
    
	...
	Policy specific attributes
	...
  }
}
JS

İşlem Metadata bilgilerini içeren operationMetadata alanının özellikleri:

AlanDurumAlabileceği DeğerlerAçıklama
targetScope

Zorunlu

ALL,
ENDPOINT

Politikanın API Proxy geneline mi (ALL) yoksa bir endpoint'ine mi (ENDPOINT) ekleneceğini belirtir.


targetEndpointKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)Metin değerHedef endpoint bilgisidir.
targetEndpointHTTPMethodKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)GET, POST, PUT, HEAD, OPTIONS, DELETE, PATCH, TRACE, ALLHedef endpoint'in HTTP Metod bilgisidir.
targetPipelineZorunluREQUEST, RESPONSE, ERRORPolitikanın hedefteki hangi hatta ekleneceği bilgisidir. 
orderİsteğe BağlıNumerik değer

Gönderildiğinde politika hedef pipeline'daki ilgili sıraya eklenir.

Gönderilmediğinde politika hedef pipeline'nın sonuna eklenir. 

deployİsteğe BağlıBoolean değerGönderildiğinde ve değeri "true" olduğunda ilgili API Proxy'nin hedef ortama yüklenmesini sağlar.
deployTargetEnvironmentNameList

Koşullu

("deploy" değeri "true" olduğunda zorunludur)

Metin değer

Api Proxy'nin hangi ortam(lar)a yükleme yapılacağını belirtir.


Ortak Politika bilgilerini içeren alanlar:

AlanDurumAlabileceği DeğerlerAçıklama
type

Zorunlu

policy-api-authentication
policy-api-based-quota
policy-api-based-throttling
policy-api-call
policy-auth-basic
policy-auth-clear-text
policy-auth-digest
policy-auth-jwt
policy-auth-mtls
policy-auth-oauth2
policy-black-ip
policy-business-rule
policy-content-filter
policy-decryption
policy-digital-sign
policy-digital-sign-verification
policy-encryption
policy-jose-implementation
policy-jose-validation
policy-json-schema-validation
policy-json-transformation
policy-max-message-size
policy-min-message-size
policy-redaction
policy-request-protocol-transformation
policy-response-protocol-transformation
policy-saml-validation
policy-script
policy-time-restriction
policy-white-ip
policy-ws-security-from-target
policy-ws-security-sts-token
policy-ws-security-to-target
policy-xml-schema-validation
policy-xml-transformation

Politikanın tipini tutar. 

descriptionİsteğe BağlıMetin değerPolitikanın açıklamasıdır.
activeZorunluBoolean değerPolitikanın aktif olup olmadığı bilgisidir.

Politikaya ait diğer alanlar politikanın tipine göre değişir.


Response:

StatusStatus CodeDescriptionBody
Başarılı200

successful operation

{
    "status""SUCCESS"
}

Hatalı400bad request{
    "error""...",
    "error_description""..."
}
Hatalı401not authorized for this operation

{
    "error""unauthorized_client",
    "error_description""..."
}

Hatalı500internal error{
    "error""...",
    "error_description""..."
}


3. Update an existing policy at specified API Proxy

Açıklama/Amaç: Belirtilen API Proxy'de yer alan politikanın güncellenmesini sağlar. Güncellenecek olan politika hedefteki hatta politika adı ile bulunur.

Yetkilendirme: Servislere erişim için erişmek isteyen kullanıcının proje içerisinde "Manage Proxies" ve "Deploy/Undeploy Proxies" yetkisine sahip olan bir rolünün olması gereklidir. 

Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/

HTTP Method: PUT

Request Headers: 

HeaderValue
Authorization

<ACCESS_TOKEN>

Bu uç noktaya erişim için Token alınması gereklidir.

Nasıl token alınacağı ile ilgili detaylı bilgi için Yetkilendirme API'si sayfasını ziyaret edebilirsiniz.

Acceptapplication/json
Content-Typeapplication/json


Request Path Parameters:

Parameter

Value

projectNamePolitikası güncellenecek API Proxy'nin bulunduğu projenin tam adı
apiProxyNamePolitikası güncellenecek API Proxy'nin tam adı
policyNameGüncellenecek politikanın tam adı


Request Body:

{
  "operationMetadata": {
    "targetScope": "ALL",
    "targetPipeline": "REQUEST",
    "deploy": "true",
    "deployTargetEnvironmentNameList": [
      "test"
    ],
    "order": "3"
  },
  "policy": {
    "type": "policy-time-restriction",
    "description": "This policy ensures that access to the API is only available on Mondays.",
    "active": "true",
    
	...
	Policy specific attributes
	...
  }
}
JS

İşlem Metadata bilgilerini içeren operationMetadata alanının özellikleri:

AlanDurumAlabileceği DeğerlerAçıklama
targetScope

Zorunlu

ALL,
ENDPOINT

Politikanın API Proxy genelinde mi (ALL) yoksa bir endpoint'de mi (ENDPOINT) aranacağını belirtir.


targetEndpointKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)Metin değerHedef endpoint bilgisidir.
targetEndpointHTTPMethodKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)GET, POST, PUT, HEAD, OPTIONS, DELETE, PATCH, TRACE, ALLHedef endpoint'in HTTP Metod bilgisidir.
targetPipelineZorunluREQUEST, RESPONSE, ERRORPolitikanın hedefteki hangi hatta aranacağı bilgisidir. 
orderİsteğe BağlıNumerik değer

Gönderildiğinde politika hedef pipeline'daki ilgili sırade değilse sırası güncellenir.

Gönderilmediğinde sırası olduğu haliyle bırakılır. 

deployİsteğe BağlıBoolean değerGönderildiğinde ve değeri "true" olduğunda ilgili API Proxy'nin hedef ortama yüklenmesini sağlar.
deployTargetEnvironmentNameList

Koşullu

("deploy" değeri "true" olduğunda zorunludur)

Metin değer

Api Proxy'nin hangi ortam(lar)a yükleme yapılacağını belirtir.


Ortak Politika bilgilerini içeren alanlar:

AlanDurumAlabileceği DeğerlerAçıklama
type

Zorunlu

policy-api-authentication
policy-api-based-quota
policy-api-based-throttling
policy-api-call
policy-auth-basic
policy-auth-clear-text
policy-auth-digest
policy-auth-jwt
policy-auth-mtls
policy-auth-oauth2
policy-black-ip
policy-business-rule
policy-content-filter
policy-decryption
policy-digital-sign
policy-digital-sign-verification
policy-encryption
policy-jose-implementation
policy-jose-validation
policy-json-schema-validation
policy-json-transformation
policy-max-message-size
policy-min-message-size
policy-redaction
policy-request-protocol-transformation
policy-response-protocol-transformation
policy-saml-validation
policy-script
policy-time-restriction
policy-white-ip
policy-ws-security-from-target
policy-ws-security-sts-token
policy-ws-security-to-target
policy-xml-schema-validation
policy-xml-transformation

Politikanın tipini tutar. 

descriptionİsteğe BağlıMetin değerPolitikanın açıklamasıdır.
activeZorunluBoolean değerPolitikanın aktif olup olmadığı bilgisidir.

Politikaya ait diğer alanlar politikanın tipine göre değişir.


Response:

StatusStatus CodeDescriptionBody
Başarılı200

successful operation

{
    "status""SUCCESS"
}

Hatalı400bad request{
    "error""...",
    "error_description""..."
}
Hatalı401not authorized for this operation

{
    "error""unauthorized_client",
    "error_description""..."
}

Hatalı500internal error{
    "error""...",
    "error_description""..."
}


4. Delete a policy from specified API Proxy

Açıklama/Amaç: Belirtilen API Proxy'de yer alan politikanın silinmesini sağlar. Silinecek olan politika hedefteki hatta politika adı ile bulunur.

Yetkilendirme: Servislere erişim için erişmek isteyen kullanıcının proje içerisinde "Manage Proxies" ve "Deploy/Undeploy Proxies" yetkisine sahip olan bir rolünün olması gereklidir. 

Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/projects/{projectName}/apiProxies/{apiProxyName}/policies/{policyName}/

HTTP Method: DELETE

Request Headers: 

HeaderValue
Authorization

<ACCESS_TOKEN>

Bu uç noktaya erişim için Token alınması gereklidir.

Nasıl token alınacağı ile ilgili detaylı bilgi için Yetkilendirme API'si sayfasını ziyaret edebilirsiniz.

Acceptapplication/json
Content-Typeapplication/json


Request Path Parameters:

Parameter

Value

projectNamePolitikası silinecek API Proxy'nin bulunduğu projenin tam adı
apiProxyNamePolitikası silinecek API Proxy'nin tam adı
policyNameSilinecek politikanın tam adı


Request Body:

{
  "operationMetadata": {
    "targetScope": "ALL",
    "targetPipeline": "REQUEST",
    "deploy": "true",
    "deployTargetEnvironmentNameList": [
      "test"
    ]
  } 
}
JS

İşlem Metadata bilgilerini içeren operationMetadata alanının özellikleri:

AlanDurumAlabileceği DeğerlerAçıklama
targetScope

Zorunlu

ALL,
ENDPOINT

Politikanın API Proxy genelinde mi (ALL) yoksa bir endpoint'de mi (ENDPOINT) aranacağını belirtir.


targetEndpointKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)Metin değerHedef endpoint bilgisidir.
targetEndpointHTTPMethodKoşullu ("targetScope" değeri "ENDPOINT" olduğunda zorunludur.)GET, POST, PUT, HEAD, OPTIONS, DELETE, PATCH, TRACE, ALLHedef endpoint'in HTTP Metod bilgisidir.
targetPipelineZorunluREQUEST, RESPONSE, ERRORPolitikanın hedefteki hangi hatta aranacağı bilgisidir. 
deployİsteğe BağlıBoolean değerGönderildiğinde ve değeri "true" olduğunda ilgili API Proxy'nin hedef ortama yüklenmesini sağlar.
deployTargetEnvironmentNameList

Koşullu

("deploy" değeri "true" olduğunda zorunludur)

Metin değer

Api Proxy'nin hangi ortam(lar)a yükleme yapılacağını belirtir.



Response:

StatusStatus CodeDescriptionBody
Başarılı200

successful operation

{
    "status""SUCCESS"
}

Hatalı400bad request{
    "error""...",
    "error_description""..."
}
Hatalı401not authorized for this operation

{
    "error""unauthorized_client",
    "error_description""..."
}

Hatalı500internal error{
    "error""...",
    "error_description""..."
}