• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. API Reference
  4. Keystone
  5. Project Management
  6. Setting the Status of a Specified Project

Setting the Status of a Specified Project

Function Description

This interface is used to set the status of a specified project. The project statuses include Normal and Suspended.

URI

  • URI format

    PUT /v3-ext/projects/{project_id}

  • URI parameter description

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID.

Request

  • Request header parameter description

    Parameter

    Mandatory

    Type

    Description

    Content-Type

    Yes

    String

    Fill application/json;charset=utf8 in this field.

    X-Auth-Token

    Yes

    String

    Authenticated token with the Security Administrator permission.

  • Request body parameter description

    Parameter

    Mandatory

    Type

    Description

    status

    Yes

    String

    Project status. The value can be suspended or normal.

    NOTE:
    • suspended: indicates that the project is suspended.
    • normal: indicates that the project is normal.
  • Sample request
    curl -i -k -H 'Accept:application/json' -H 'Content-Type:application/json;charset=utf8' -X "X-Auth-Token:$token" -X PUT -d '{"project": {"status":"suspended"}}'https://10.145.93.56:31943/v3-ext/projects/5c9f5525d9d24c5bbf91e74d86772029

Response

No response body.

Status Codes

Status Code

Description

204

The request is successful.

400

The server failed to process the request.

401

You must enter a username and password to access the requested page.

403

You are forbidden to access the requested page.

404

The server could not find the requested page.

500

Failed to complete the request because of an internal service error.

503

Failed to complete the request because the service is unavailable.