organizations - Keyrock command

This command allows you to manage organizations for Keyrock.

Common Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--help show help (default: true)

List organizations

This command lists all organizations.

ngsi organizations [command options] list [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--verbose, -v verbose (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: true)

Examples

Request:

ngsi organizations list --pretty
{
  "organizations": [
    {
      "role": "owner",
      "Organization": {
        "id": "f1f2fd72-12ee-4ced-bbe8-1d99803fa0ca",
        "name": "test",
        "description": "test organizations",
        "image": "default",
        "website": null
      }
    },
    {
      "role": "owner",
      "Organization": {
        "id": "f672e00e-9f19-430b-8e0b-06b3ac7a8e4d",
        "name": "test",
        "description": "test organizations",
        "image": "default",
        "website": null
      }
    }
  ]
}

Get an organization

This command gets an organization.

ngsi organization [command options] get [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--oid VALUE, -o VALUE organization id (required)
--pretty, -P pretty format (default: false)
--help show help (default: true)

Examples

Request:

ngsi organizations get --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d --pretty
{
  "organization": {
    "id": "f672e00e-9f19-430b-8e0b-06b3ac7a8e4d",
    "name": "test",
    "description": "test organizations",
    "website": null,
    "image": "default"
  }
}

Create an organization

This command creates an organization.

ngsi organization [command options] create [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--name VALUE, -n VALUE organization name (required)
--description VALUE, -d VALUE description
--website VALUE, -w VALUE website
--verbose, -v verbose (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: true)

Examples

Request:

ngsi organizations create --name test --description "test organizations"
f672e00e-9f19-430b-8e0b-06b3ac7a8e4d

Update an organization

This command updates an organization.

ngsi organization [command options] update [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--oid VALUE, -o VALUE organization id (required)
--name VALUE, -n VALUE organization name
--description VALUE, -d VALUE description
--website VALUE, -w VALUE website
--verbose, -v verbose (default: false)
--pretty, -P pretty format (default: false)
--help show help (default: true)

Examples

Request:

ngsi organizations update --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d --website https://www.letsfiware.jp/ --pretty
{
  "values_updated": {
    "website": "https://www.letsfiware.jp/"
  }
}

Delete an organization

This command deletes an organization.

ngsi organization [command options] delete [options]

Options

Options Description
--host VALUE, -h VALUE broker or server host VALUE (required)
--oid VALUE, -o VALUE organization id (required)
--help show help (default: true)

Examples

Request:

ngsi organizations delete --oid f672e00e-9f19-430b-8e0b-06b3ac7a8e4d